Don't filter nodes if logdriver==none#2396
Merged
Merged
Conversation
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 Report
@@ 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 |
nishanttotla
reviewed
Oct 5, 2017
| } | ||
|
|
||
| if f.t.Spec.LogDriver != nil { | ||
| if f.t.Spec.LogDriver != nil && f.t.Spec.LogDriver.Name != "none" { |
Contributor
There was a problem hiding this comment.
@cpuguy83 do we need to check for "None" too or is this a case-sensitive keyword?
Member
Author
There was a problem hiding this comment.
We could check lower, but it is case sensitive in docker at least.
Contributor
There was a problem hiding this comment.
Okay, in that case we can leave it as is for now.
Member
There was a problem hiding this comment.
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
nishanttotla
approved these changes
Oct 5, 2017
Contributor
nishanttotla
left a comment
There was a problem hiding this comment.
LGTM
(just one comment)
Member
Author
|
Right, nil means default.
…On Thu, Oct 5, 2017 at 3:51 PM, Sebastiaan van Stijn < ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In manager/scheduler/filter.go
<#2396 (comment)>:
> @@ -169,7 +169,7 @@ func (f *PluginFilter) Check(n *NodeInfo) bool {
}
}
- if f.t.Spec.LogDriver != nil {
+ if f.t.Spec.LogDriver != nil && f.t.Spec.LogDriver.Name != "none" {
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
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2396 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAwxZtgam9J2CHfWgQLKgbFAfEtQwWj2ks5spTMvgaJpZM4PvOfE>
.
--
- Brian Goff
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.