Skip to content

Don't filter nodes if logdriver==none#2396

Merged
nishanttotla merged 1 commit into
moby:masterfrom
cpuguy83:fix_logdriver_none_nodefilter
Oct 5, 2017
Merged

Don't filter nodes if logdriver==none#2396
nishanttotla merged 1 commit into
moby:masterfrom
cpuguy83:fix_logdriver_none_nodefilter

Conversation

@cpuguy83
Copy link
Copy Markdown
Member

@cpuguy83 cpuguy83 commented Oct 5, 2017

The "none" driver is a special keyword to disable logging, so don't
filter nodes if the "none" driver is not listed on the nodes, since it's
not really a driver and doesn't exist.

The "none" driver is a special keyword to disable logging, so don't
filter nodes if the "none" driver is not listed on the nodes, since it's
not really a driver and doesn't exist.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 5, 2017

Codecov Report

Merging #2396 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2396      +/-   ##
==========================================
- Coverage   60.62%   60.61%   -0.02%     
==========================================
  Files         128      128              
  Lines       26309    26309              
==========================================
- Hits        15951    15948       -3     
- Misses       8954     8960       +6     
+ Partials     1404     1401       -3

Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

}

if f.t.Spec.LogDriver != nil {
if f.t.Spec.LogDriver != nil && f.t.Spec.LogDriver.Name != "none" {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpuguy83 do we need to check for "None" too or is this a case-sensitive keyword?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could check lower, but it is case sensitive in docker at least.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, in that case we can leave it as is for now.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also wondered if nil and "none" are the same, but I think they have a different meaning (nil being: use the default?) If not, and the are equal then ideally we should change "none" to nil in the spec

Copy link
Copy Markdown
Contributor

@nishanttotla nishanttotla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

(just one comment)

@nishanttotla nishanttotla merged commit a824e6c into moby:master Oct 5, 2017
@cpuguy83
Copy link
Copy Markdown
Member Author

cpuguy83 commented Oct 5, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants