Project

General

Profile

Actions

Bug #7452

closed

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

Added by Nicolas CHARLES over 8 years ago. Updated over 8 years ago.

Status:
Released
Priority:
1
Category:
System techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

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 2 (0 open2 closed)

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
Actions #1

Updated by Nicolas CHARLES over 8 years ago

actually, it is restored to the wrong version !

Actions #2

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

Actions #3

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

Updated by Jonathan CLARKE over 8 years ago

  • Status changed from New to In progress
Actions #5

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

Actions #6

Updated by Jonathan CLARKE over 8 years ago

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

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

Updated by Jonathan CLARKE over 8 years ago

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

Updated by Jonathan CLARKE over 8 years ago

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

Updated by Vincent MEMBRÉ over 8 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.

Actions #12

Updated by Nicolas CHARLES almost 8 years ago

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

Also available in: Atom PDF