Project

General

Profile

Actions

Bug #7794

closed

rudder-upgrade edits the wrong ncf.conf file causing transitory invalid promises during upgrades

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

Status:
Released
Priority:
N/A
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

I upgraded on Centos6 from Rudder 3.1.6 to 3.2, and when I run the agent on the server or the relay, I get the follwing error message:

R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@6@@Check WebDAV credentials@@None@@2016-01-18 10:02:29+00:00##bf63c43b-10bd-4248-8adc-bc56aa3e023d@#The Rudder WebDAV user and password are OK
   error: While constructing scope '_logger_default'
Formal =  {'message','old_class_prefix'}, Actual =  {'Check if the service httpd is started using ps','service_check_running_httpd','','@{args}'}
   error: Fatal CFEngine error: Augment scope, formal and actual parameter mismatch is fatal

It lasts for about 5 minutes after promises regeneration, and then it works again fine


Subtasks 1 (0 open1 closed)

Bug #7809: rudder-upgrade edits the wrong ncf.conf file causing transitory invalid promises during upgrades (3.2 branch)RejectedVincent MEMBRÉ2016-01-19Actions

Related issues 4 (0 open4 closed)

Related to Rudder - Bug #5937: Enforce the content of the local ncf configuration file from techniquesReleasedJonathan CLARKE2014-12-08Actions
Related to Rudder - Bug #7810: initial promises don't create /var/rudder/configuration-repository/ncf/ncf.conf ReleasedVincent MEMBRÉ2016-01-19Actions
Related to Rudder - Bug #9639: When running rudder-init on a fresh server, we get an error that "/var/rudder/ncf/local/ does not exist"RejectedActions
Related to Rudder - Bug #11128: error: Fatal CFEngine error: Augment scope, formal and actual parameter mismatch is fatalRejectedActions
Actions #1

Updated by Nicolas CHARLES almost 9 years ago

this is probably because ncf is updated, promises as well, but the ncf used (in /var/rudder/common/ncf) is still not updated

Actions #2

Updated by Vincent MEMBRÉ almost 9 years ago

I have a suggestion here ... maybe if ncf common (/var/ncf/common) was a symlink to /usr/share/ncf/tree it would be ok stright away, removing a need to copy these promises to /var/rudder/ncf/common

(that idea can also be extended to /var/rudder/ncf/local be a symlink to /var/rudder/conf-repo/ncf)

What do you think of these ??

Actions #3

Updated by Vincent MEMBRÉ almost 9 years ago

ncf common is updated, but it is still using the old logger (looking for 2 params: Formal = {'message','old_class_prefix'} and it received 4: {'Check if the service httpd is started using ps','service_check_running_httpd','','@{args}'} )

I guess /var/rudder/ncf/common is up to date, but ncf.conf (in /var/rudder/ncf/local is still using the old logger

Actions #4

Updated by Jonathan CLARKE almost 9 years ago

Exactly, Vincent, ncf.conf is not updated.

The problem comes from rudder-upgrade, that cleverly was configured to change the logger we used... but, not so cleverly, in the wrong config file:

sed -i "s%^loggers=\(.*\)logger_rudder\(.*\)$%loggers=\1log_rudder\2%" ${RUDDER_VAR}/ncf/common/ncf.conf

The config file in ncf/common is never read, so this doesn't do anything.

All file edits on ncf.conf are on the wrong file, and have been since 2.11.

Actions #5

Updated by Jonathan CLARKE almost 9 years ago

  • Target version changed from 3.2.0 to 2.11.18
Actions #6

Updated by Jonathan CLARKE almost 9 years ago

  • Subject changed from upgrade from 3.1.6 to 3.2 causes transitory invalid promises to rudder-upgrade edits the wrong ncf.conf file causing transitory invalid promises during upgrades
Actions #7

Updated by Jonathan CLARKE almost 9 years ago

  • Status changed from New to In progress
  • Assignee set to Jonathan CLARKE
Actions #8

Updated by Jonathan CLARKE almost 9 years ago

Also, the port number editing was overly naive:

sed -i "s%^cfengine_port=.*%cfengine_port=5309%" ${RUDDER_VAR}/ncf/common/ncf.conf

The problem being that ncf.conf now (as of #5937) contains two lines matching that, that should not both use port 5309:

# Which port should be for CFEngine connections/data transfers
{{#classes.community_edition}}
cfengine_port=5309
{{/classes.community_edition}}
{{#classes.enterprise_edition}}
cfengine_port=5308
{{/classes.enterprise_edition}}
Actions #9

Updated by Jonathan CLARKE almost 9 years ago

  • Related to Bug #5937: Enforce the content of the local ncf configuration file from techniques added
Actions #10

Updated by Jonathan CLARKE almost 9 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Jonathan CLARKE to Vincent MEMBRÉ
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/870
Actions #11

Updated by Jonathan CLARKE almost 9 years ago

  • Related to Bug #7810: initial promises don't create /var/rudder/configuration-repository/ncf/ncf.conf added
Actions #12

Updated by Jonathan CLARKE almost 9 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
Actions #13

Updated by Vincent MEMBRÉ almost 9 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.11.18, 3.0.13, 3.1.6 and 3.2.0 which were released today.

Actions #14

Updated by Nicolas CHARLES about 8 years ago

  • Related to Bug #9639: When running rudder-init on a fresh server, we get an error that "/var/rudder/ncf/local/ does not exist" added
Actions #15

Updated by François ARMAND over 7 years ago

  • Related to Bug #11128: error: Fatal CFEngine error: Augment scope, formal and actual parameter mismatch is fatal added
Actions

Also available in: Atom PDF