Project

General

Profile

Bug #7794

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

Added by Nicolas CHARLES about 4 years ago. Updated about 4 years ago.

Status:
Released
Priority:
N/A
Category:
Packaging
Target version:
Severity:
User visibility:
Effort required:
Priority:

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

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

Related issues

Related to Rudder - Bug #5937: Enforce the content of the local ncf configuration file from techniquesReleased2014-12-08Actions
Related to Rudder - Bug #7810: initial promises don't create /var/rudder/configuration-repository/ncf/ncf.conf Released2016-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

Associated revisions

Revision 78de2288 (diff)
Added by Jonathan CLARKE about 4 years ago

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

Revision d2444a6e
Added by Vincent MEMBRÉ about 4 years ago

Merge pull request #870 from jooooooon/bug_7794/rudder_upgrade_edits_the_wrong_ncf_conf_file_causing_transitory_invalid_promises_during_upgrades

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

History

#1

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

#2

Updated by Vincent MEMBRÉ about 4 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 ??

#3

Updated by Vincent MEMBRÉ about 4 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

#4

Updated by Jonathan CLARKE about 4 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.

#5

Updated by Jonathan CLARKE about 4 years ago

  • Target version changed from 3.2.0 to 2.11.18
#6

Updated by Jonathan CLARKE about 4 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
#7

Updated by Jonathan CLARKE about 4 years ago

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

Updated by Jonathan CLARKE about 4 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}}
#9

Updated by Jonathan CLARKE about 4 years ago

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

Updated by Jonathan CLARKE about 4 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
#11

Updated by Jonathan CLARKE about 4 years ago

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

Updated by Jonathan CLARKE about 4 years ago

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

Updated by Vincent MEMBRÉ about 4 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.

#14

Updated by Nicolas CHARLES over 3 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
#15

Updated by François ARMAND over 2 years ago

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

Also available in: Atom PDF