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.
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
this is probably because ncf is updated, promises as well, but the ncf used (in /var/rudder/common/ncf) is still not updated
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 ??
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
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.
- Target version changed from 3.2.0 to 2.11.18
- 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
- Status changed from New to In progress
- Assignee set to Jonathan CLARKE
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}}
- Related to Bug #5937: Enforce the content of the local ncf configuration file from techniques added
- 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
- Related to Bug #7810: initial promises don't create /var/rudder/configuration-repository/ncf/ncf.conf added
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
- 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.
- 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
- Related to Bug #11128: error: Fatal CFEngine error: Augment scope, formal and actual parameter mismatch is fatal added
Also available in: Atom
PDF