Bug #7452
closedNew version of ncf_conf.cache may not be properly updated on nodes after an upgrade
Description
I upgraded on 3.2, and got 1 node out of 3 that did not upgrade its ncf.conf.cache file, resulting in the following errors
2015-11-24T09:55:02+0000 error: /default/rudder_directives/methods/'Configure network parameters/Configure network parameters'/default/Network_configuration/methods/'method_call'/default/file_ensure_keys_values/methods/'report'/default/_log/methods/'wrapper for _logger_default'/default/_logger_default: While constructing scope '_logger_default' Formal = {'message','old_class_prefix'}, Actual = {'Ensure lines in format key=values into /etc/sysconfig/network','file_ensure_keys_values__etc_sysconfig_network','${class_prefix}','@{args}'} 2015-11-24T09:55:02+0000 error: /default/rudder_directives/methods/'Configure network parameters/Configure network parameters'/default/Network_configuration/methods/'method_call'/default/file_ensure_keys_values/methods/'report'/default/_log/methods/'wrapper for _logger_default'/default/_logger_default: Fatal CFEngine error: Augment scope, formal and actual parameter mismatch is fatal
The /var/rudder/ncf/local/ncf.conf is correct, so I don't know why it fails
Interestingly, the 2 nodes that succeedeed at updating it are both policy_server, and don't any meta techniques applied to them
Updated by Nicolas CHARLES almost 9 years ago
actually, it is restored to the wrong version !
Updated by Nicolas CHARLES almost 9 years ago
verbose outputs tells me on the node:
2015-11-24T10:04:27+0000 verbose: /default/configuration/methods/'expand'/default/expand_configuration/files/'/var/cfengine/ncf.conf.cache'[0]: Rendering '/var/cfengine/ncf.conf.cache' using template '/var/rudder/ncf/common/10_ncf_internals/../ncf.conf' with method 'mustache'
Updated by Nicolas CHARLES almost 9 years ago
Ok, the issue is that it refers to /var/rudder/configuration-repository/ncf/ncf.conf files, which does not exists on a node
in site.cf, the definition should be
bundle common ncf_configuration { vars: policy_server:: "ncf_configuration_file" string => "${g.rudder_ncf_origin_local}/ncf.conf"; !policy_server:: "ncf_configuration_file" string => "${g.rudder_ncf}/local/ncf.conf";
Updated by Jonathan CLARKE almost 9 years ago
- Status changed from New to In progress
Updated by Jonathan CLARKE almost 9 years ago
- Target version changed from 3.2.0~beta1 to 2.11.17
Nicolas CHARLES wrote:
Ok, the issue is that it refers to /var/rudder/configuration-repository/ncf/ncf.conf files, which does not exists on a node
in site.cf, the definition should be[...]
Yes, this has in fact never worked properly, therefore I'm retargeting the change to it's original branch - 2.11.
However, the fix is simpler than you suggest, we just need to always use "${g.rudder_ncf}/local/ncf.conf". This will also work on policy_servers because they populate "${g.rudder_ncf}/local/" in update.cf, so before the ncf configuration is needed.
Updated by Jonathan CLARKE almost 9 years ago
- Related to Bug #5937: Enforce the content of the local ncf configuration file from techniques added
Updated by Jonathan CLARKE almost 9 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Jonathan CLARKE to Nicolas CHARLES
- Pull Request set to https://github.com/Normation/rudder-techniques/pull/780
Updated by Jonathan CLARKE almost 9 years ago
- Status changed from Pending technical review to In progress
- Assignee changed from Nicolas CHARLES to Jonathan CLARKE
Updated by Jonathan CLARKE almost 9 years ago
- Status changed from In progress to Pending release
- % Done changed from 0 to 100
Applied in changeset rudder-techniques|3e51817c3a3d82af5b2c70cc7d5e5af4281faede.
Updated by Nicolas CHARLES almost 9 years ago
Applied in changeset rudder-techniques|130d87b01497ae8ff2e87ad5f011901e4362786e.
Updated by Vincent MEMBRÉ almost 9 years ago
- Status changed from Pending release to Released
Updated by Nicolas CHARLES over 8 years ago
- Related to Bug #8338: Invalid path for rudder_ncf in Windows added