Fixes #3433: allows to continue deployment on target node var lookup error #159
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.
Fixe for http://www.rudder-project.org/redmine/issues/3433
I'm really not sur that this fix is correct. Not the code, but the semantic of the fix, for two reason:
1/ I'm wondering if it could lead to inconsistency in list sizes.
Suppose we are in the middle of deployment, and that a node is removed in the middle of it. Can't we have one generated list of nodes (hostname for ex) of size n, and the next of size-1, and so mismatching array size in cfengine.
Actually, I'm wondering what prevent it now.
2/ Perhaps the generated promises will just be wrong. We want to apply some config depending of hostnames of nodes in a group (for a cluster, for example). If for some reason, one the hostname is not lookupable when deploying, the node will be ignored (and the config false). Isn't it better to fail the deployment in that case ?
Perhaps we are looking for the bad fixe, and what we really want is a consistency check at LDAP level, saying that you can't have node ID in groups not in ou=node (or something alike).
Fell free to refuse the pull request!