-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #6454: networks.conf empty on relay #839
Fixes #6454: networks.conf empty on relay #839
Conversation
Something need to be done for the "policy_server" class too, but it should be done in another issue I think |
//scenario lead to the removal (or non addition) of them | ||
nodes ++ allNodes.collect { case(k,n) if(n._2.size>0 || n._1 == Constants.ROOT_POLICY_SERVER_ID) => k } | ||
// all nodes with server roles or policyServer (ie relay) | ||
nodes ++ allNodes.collect { case(k,n) if(n._2.size>0 || n._1) => k } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, you are always adding k in the node; for there always is a n._1
this looks plain wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
N._1 is a boolean meaning that the node is a policyServer ( either the root server or a relay)
Maybe I should explicit the tuple here by having ( nodeId, ( isPolicyServer, server roles)) inster of (k,n)
The code before was completely wrong ( comparing a boolean and a string)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ho, so it was before in another file ( see PR https://github.com/Normation/rudder/pull/824/files ) and that broke it.
PR updated |
371f9ff
to
8280b13
Compare
nodes ++ allNodes.collect { | ||
case (nodeId,(isPolicyServer, roles)) | ||
if isANodeWithRole(nodeId,isPolicyServer,roles) | ||
=> nodeId |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, please, can you use enclosing { } ?
8280b13
to
6445303
Compare
PR updated |
…ty_on_relay Fixes #6454: networks.conf empty on relay
http://www.rudder-project.org/redmine/issues/6454