Project

General

Profile

Bug #7452

New version of ncf_conf.cache may not be properly updated on nodes after an upgrade

Added by Nicolas CHARLES over 5 years ago. Updated about 5 years ago.

Status:
Released
Priority:
1
Category:
System techniques
Target version:
Severity:
User visibility:
Effort required:
Priority:

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


Related issues

Related to Rudder - Bug #5937: Enforce the content of the local ncf configuration file from techniquesReleasedJonathan CLARKE2014-12-08Actions
Related to Rudder - Bug #8338: Invalid path for rudder_ncf in WindowsReleasedAlexis MOUSSET2016-05-19Actions
#1

Updated by Nicolas CHARLES over 5 years ago

actually, it is restored to the wrong version !

#2

Updated by Nicolas CHARLES over 5 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'

#3

Updated by Nicolas CHARLES over 5 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";
#4

Updated by Jonathan CLARKE over 5 years ago

  • Status changed from New to In progress
#5

Updated by Jonathan CLARKE over 5 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.

#6

Updated by Jonathan CLARKE over 5 years ago

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

Updated by Jonathan CLARKE over 5 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
#8

Updated by Jonathan CLARKE over 5 years ago

  • Status changed from Pending technical review to In progress
  • Assignee changed from Nicolas CHARLES to Jonathan CLARKE
#9

Updated by Jonathan CLARKE over 5 years ago

  • Status changed from In progress to Pending release
  • % Done changed from 0 to 100
#11

Updated by Vincent MEMBRÉ about 5 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.11.17, 3.0.12 and 3.1.5 which were released today.

#12

Updated by Nicolas CHARLES almost 5 years ago

  • Related to Bug #8338: Invalid path for rudder_ncf in Windows added

Also available in: Atom PDF