Project

General

Profile

Actions

Bug #12930

closed

During an upgrade of Rudder, if a new generic method appears in ncf, that is also on local method, all is broken

Added by Nicolas CHARLES almost 6 years ago. Updated almost 6 years ago.

Status:
Released
Priority:
N/A
Category:
Web - Compliance & node report
Target version:
Severity:
Critical - prevents main use of Rudder | no workaround | data loss | security
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

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


Subtasks 2 (0 open2 closed)

Bug #12933: Improve parent ticket codeReleasedAlexis MoussetActions
Bug #12956: Parent ticket does not solve the issue with broken policy generationReleasedFrançois ARMANDActions
Actions #1

Updated by Nicolas CHARLES almost 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

Actions #2

Updated by Vincent MEMBRÉ almost 6 years ago

  • Target version changed from 4.3.3 to 4.3.4
Actions #3

Updated by Nicolas CHARLES almost 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
Actions #4

Updated by Nicolas CHARLES almost 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

Actions #5

Updated by Alexis Mousset almost 6 years ago

  • Assignee set to Alexis Mousset
  • Target version changed from 4.1.14 to 414
Actions #6

Updated by Alexis Mousset almost 6 years ago

  • Target version changed from 414 to 4.1.14
Actions #7

Updated by Alexis Mousset almost 6 years ago

  • Status changed from New to In progress
Actions #8

Updated by Alexis Mousset almost 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
Actions #9

Updated by Rudder Quality Assistant almost 6 years ago

  • Assignee changed from Nicolas CHARLES to Alexis Mousset
Actions #10

Updated by Alexis Mousset almost 6 years ago

  • Status changed from Pending technical review to Pending release
Actions #11

Updated by François ARMAND almost 6 years ago

  • Target version changed from 4.1.14 to 4.1.13
Actions #12

Updated by Vincent MEMBRÉ almost 6 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.1.13, 4.2.7 and 4.3.3 which were released today.

Actions

Also available in: Atom PDF