Project

General

Profile

Actions

Bug #5397

closed

The file_from_template generic method can not use mustache templates on pre-3.6 CFEngine

Added by Matthieu CERDA over 9 years ago. Updated almost 2 years ago.

Status:
Released
Priority:
N/A
Category:
Generic methods
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

If the current ncf version is used on pre-3.6 CFEngine versions, it fails as the template_method attribute does not exist yet.

We should offer a way to offer this method without breaking old CFEngines!


Subtasks 4 (0 open4 closed)

Bug #5401: Create a shell script that list all .cf files compatible with a given cf-agent version.ReleasedBenoît PECCATTEActions
Bug #5403: F is not a posix sed commandReleasedJonathan CLARKEActions
Bug #5404: Script must return full pathRejectedBenoît PECCATTEActions
Bug #5423: Tests don't work on CFengine 3.5RejectedActions

Related issues 2 (0 open2 closed)

Related to Rudder - Bug #5402: Agent can't run because some ncf promises are CFEngine 3.6 specificReleasedJonathan CLARKE2014-08-19Actions
Related to Rudder - Bug #5409: Fisrt promise generation fail on Rudder server ( /var/rudder/ncf/local missing)ReleasedJonathan CLARKE2014-08-19Actions
Actions #1

Updated by Matthieu CERDA over 9 years ago

Note, a workaround exists to solve the problem temporary until it is fixed upstream:

rm /usr/share/ncf/tree/30_generic_methods/file_from_template*
rm /var/rudder/ncf/common/30_generic_methods/file_from_template*
curl https://raw.githubusercontent.com/Normation/ncf/0efb9eb11191fdf31ebb6fba1f4c3a338d925e45/tree/30_generic_methods/file_from_template.cf > /usr/share/ncf/tree/30_generic_methods/file_from_template.cf
cp /usr/share/ncf/tree/30_generic_methods/file_from_template.cf /var/rudder/ncf/common/30_generic_methods/

Actions #2

Updated by Benoît PECCATTE over 9 years ago

  • Status changed from 8 to In progress
  • Target version set to 0.x

First define a new optional attribute to ncf bundles: @agent_version that defines the agent version compatible with this bundle. Currently only >=x.y will be supported.

Then create a shell script that list all .cf files compatible with a given cf-agent version.
This script will be used in body common control to include compatible methods only.

Finally rewrite file_from_template_* to separate 3.5 version and 3.6 version (with mustache suport) and add @agent_version to them.

Actions #3

Updated by Benoît PECCATTE over 9 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Benoît PECCATTE to Jonathan CLARKE
  • Pull Request set to https://github.com/Normation/ncf/pull/100

https://github.com/Normation/ncf/pull/100

The part that adds compatibility string to bundles

Actions #4

Updated by Benoît PECCATTE over 9 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset commit:7ae0f6dbcf02c1205d82c2ead9f097e54213cbc7.

Actions #5

Updated by Jonathan CLARKE over 9 years ago

Applied in changeset commit:17161bad9c6c3fc4448fbf0c58830b29f788f4ee.

Actions #6

Updated by Vincent MEMBRÉ over 7 years ago

  • Status changed from Pending release to Released
Actions #7

Updated by Alexis Mousset almost 2 years ago

  • Target version changed from 0.x to ncf-0.x
  • Priority set to 0
Actions #8

Updated by Alexis Mousset almost 2 years ago

  • Project changed from 41 to Rudder
  • Category set to Generic methods
Actions

Also available in: Atom PDF