Bug #12930
closedDuring an upgrade of Rudder, if a new generic method appears in ncf, that is also on local method, all is broken
Description
I upgraded from 4.2 to 4.3,
I dropped the Windows nodes, and at generation I got the following errors:
⇨ Policy update error for process '51' at 2018-07-10 16:57:59 ⇨ Cannot write configuration node ⇨ Exit code=1 for hook: '/opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check'. stdout: stderr: '/var/rudder/ncf/common/30_generic_methods/condition_from_variable_match.cf:17:0: error: Duplicate definition of bundle condition_from_variable_match with type agent /var/rudder/ncf/local/30_generic_methods/condition_from_variable_match.cf:17:0: error: Duplicate definition of bundle condition_from_variable_match with type agent ' ; Exit code=1 for hook: '/opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check'. stdout: stderr: '/var/rudder/ncf/common/30_generic_methods/condition_from_variable_match.cf:17:0: error: Duplicate definition of bundle condition_from_variable_match with type agent /var/rudder/ncf/local/30_generic_methods/condition_from_variable_match.cf:17:0: error: Duplicate definition of bundle condition_from_variable_match with type agent ' ; Exit code=1 for hook: '/opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check'. stdout: stderr: '/var/rudder/ncf/common/30_generic_methods/condition_from_variable_match.cf:17:0: error: Duplicate definition of bundle condition_from_variable_match with type agent /var/rudder/ncf/local/30_generic_methods/condition_from_variable_match.cf:17:0: error: Duplicate definition of bundle condition_from_variable_match with type agent ' ; Exit code=1 for hook: '/opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check'. stdout: stderr: '/var/rudder/ncf/common/30_generic_methods/condition_from_variable_match.cf:17:0: error: Duplicate definition of bundle condition_from_variable_match with type agent /var/rudder/ncf/local/30_generic_methods/condition_from_variable_match.cf:17:0: error: Duplicate definition of bundle condition_from_variable_match with type agent ' ; Exit code=1 for hook: '/opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check'. stdout: stderr: '/var/rudder/ncf/common/30_generic_methods/condition_from_variable_match.cf:17:0: error: Duplicate definition of bundle condition_from_variable_match with type agent /var/rudder/ncf/local/30_generic_methods/condition_from_variable_match.cf:17:0: error: Duplicate definition of bundle condition_from_variable_match with type agent '
Indeed, /var/rudder/ncf/local/30_generic_methods/ contains all generic method description from windows, and their name conflict with the rudder ones, as condition_from_variable_match.cf was included in ncf
Trying to run rudder agent run fails
/var/rudder/ncf/common/30_generic_methods/condition_from_variable_match.cf:17:0: error: Duplicate definition of bundle condition_from_variable_match with type agent /var/rudder/ncf/local/30_generic_methods/condition_from_variable_match.cf:17:0: error: Duplicate definition of bundle condition_from_variable_match with type agen<
and
/var/rudder/cfengine-community/inputs/test_dcs/1.0/rudder_reporting.cf:11:0: error: Conflicting arity in calling bundle log_rudder, expected 5 arguments, 4 given /var/rudder/cfengine-community/inputs/test_dcs/1.0/rudder_reporting.cf:14:0: error: Conflicting arity in calling bundle log_rudder, expected 5 arguments, 4 given /var/rudder/cfengine-community/inputs/test_multiple/1.0/rudder_reporting.cf:11:0: error: Conflicting arity in calling bundle log_rudder, expected 5 arguments, 4 given
rudder agent update don't solve anything
Updated by Nicolas CHARLES over 6 years ago
Purging /var/rudder/ncf/local/30_generic_methods don't solves the issue
⇨ Policy update error for process '52' at 2018-07-10 17:02:31 ⇨ Cannot write configuration node ⇨ Exit code=1 for hook: '/opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check'. stdout: stderr: '/var/rudder/cfengine-community/inputs.new/test_dcs/1.0/test_dcs.cf:9:0: error: Undefined bundle registry_entry_present with type usebundle /var/rudder/cfengine-community/inputs.new/test_dcs/1.0/test_dcs.cf:12:0: error: Undefined bundle windows_component_absent with type usebundle /var/rudder/cfengine-community/inputs.new/test_multiple/1.0/test_multiple.cf:12:0: error: Undefined bundle windows_hotfix_absent with type usebundle
deleting the techniques don't solves the issue (they are not removed :/)
deleting the directives solve the issue
Updated by Vincent MEMBRÉ over 6 years ago
- Target version changed from 4.3.3 to 4.3.4
Updated by Nicolas CHARLES over 6 years ago
- Subject changed from Impossible policy generation after upgrading from 4.2 to 4.3, and removing dsc plugin to During an upgrade of Rudder, if a new generic method appears in ncf, that is also on local method, all is broken
- Description updated (diff)
- Target version changed from 4.3.4 to 4.1.14
Updated by Nicolas CHARLES over 6 years ago
Solution is to add a check in rudder-upgrade, that will look in /var/rudder/configuration-repository/ncf/local/30
if any file there has the same name as in /usr/share/ncf/tree/30 , there we should rename the file in ncf/local (by adding a .old ? ), and put a huge warning message in the output of rudder-upgrade
Updated by Alexis Mousset over 6 years ago
- Assignee set to Alexis Mousset
- Target version changed from 4.1.14 to 414
Updated by Alexis Mousset over 6 years ago
- Target version changed from 414 to 4.1.14
Updated by Alexis Mousset over 6 years ago
- Status changed from New to In progress
Updated by Alexis Mousset over 6 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Alexis Mousset to Nicolas CHARLES
- Pull Request set to https://github.com/Normation/rudder-packages/pull/1611
Updated by Rudder Quality Assistant over 6 years ago
- Assignee changed from Nicolas CHARLES to Alexis Mousset
Updated by Alexis Mousset over 6 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder-packages|b33d11b369bbd78ed71fe5b2c6280f4ea7f52b90.
Updated by François ARMAND over 6 years ago
- Target version changed from 4.1.14 to 4.1.13
Updated by Vincent MEMBRÉ over 6 years ago
- Status changed from Pending release to Released