Project

General

Profile

Bug #12930

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 5 months ago. Updated 5 months 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
User visibility:
Effort required:
Priority:
0

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

Bug #12933: Improve parent ticket codeReleasedAlexis MOUSSET
Bug #12956: Parent ticket does not solve the issue with broken policy generationReleasedFrançois ARMAND

Associated revisions

Revision b33d11b3 (diff)
Added by Alexis MOUSSET 5 months ago

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

History

#1 Updated by Nicolas CHARLES 5 months 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

#2 Updated by Vincent MEMBRÉ 5 months ago

  • Target version changed from 4.3.3 to 4.3.4

#3 Updated by Nicolas CHARLES 5 months 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

#4 Updated by Nicolas CHARLES 5 months 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

#5 Updated by Alexis MOUSSET 5 months ago

  • Assignee set to Alexis MOUSSET
  • Target version changed from 4.1.14 to 4.2.8

#6 Updated by Alexis MOUSSET 5 months ago

  • Target version changed from 4.2.8 to 4.1.14

#7 Updated by Alexis MOUSSET 5 months ago

  • Status changed from New to In progress

#8 Updated by Alexis MOUSSET 5 months 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

#9 Updated by Normation Quality Assistant 5 months ago

  • Assignee changed from Nicolas CHARLES to Alexis MOUSSET

#10 Updated by Alexis MOUSSET 5 months ago

  • Status changed from Pending technical review to Pending release

#11 Updated by François ARMAND 5 months ago

  • Target version changed from 4.1.14 to 4.1.13

#12 Updated by Vincent MEMBRÉ 5 months 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.

Also available in: Atom PDF