Bug #7794
closedrudder-upgrade edits the wrong ncf.conf file causing transitory invalid promises during upgrades
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
Updated by Nicolas CHARLES over 10 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
Updated by Vincent MEMBRÉ over 10 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 ??
Updated by Vincent MEMBRÉ over 10 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
Updated by Jonathan CLARKE over 10 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.
Updated by Jonathan CLARKE over 10 years ago
- Target version changed from 3.2.0 to 2.11.18
Updated by Jonathan CLARKE over 10 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
Updated by Jonathan CLARKE over 10 years ago
- Status changed from New to In progress
- Assignee set to Jonathan CLARKE
Updated by Jonathan CLARKE over 10 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}}
Updated by Jonathan CLARKE over 10 years ago
- Related to Bug #5937: Enforce the content of the local ncf configuration file from techniques added
Updated by Jonathan CLARKE over 10 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
Updated by Jonathan CLARKE over 10 years ago
- Related to Bug #7810: initial promises don't create /var/rudder/configuration-repository/ncf/ncf.conf added
Updated by Jonathan CLARKE over 10 years ago
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
Applied in changeset rudder-packages|78de2288b70c0a7e677caebb3d09131b62436623.
Updated by Vincent MEMBRÉ over 10 years ago
- Status changed from Pending release to Released
Updated by Nicolas CHARLES over 9 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
Updated by François ARMAND almost 9 years ago
- Related to Bug #11128: error: Fatal CFEngine error: Augment scope, formal and actual parameter mismatch is fatal added