Bug #3640


Variable definition is not valid

Added by Cedric JARDIN almost 10 years ago. Updated about 8 years ago.

Target version:
UX impact:
User visibility:
Effort required:



In Directive/Generic CFEngine variable Definition, We can't use a "variable name" with one dot inside.

Exemple : Variable name = "test.varia"


"The form contains some errors, please correct them.
Please modify Variable name to match the requested format : Please enter a valid CFengine variable name"

NB => Rudder Version : 2.6.2

Related issues 1 (0 open1 closed)

Related to Rudder - Bug #3642: CFEngine variables name in "CFEngine Generic Variable Definition" Directives no more support "dot" and need a migration script to "undot" existing onesReleasedFrançois ARMAND2013-06-10Actions
Actions #1

Updated by François ARMAND almost 10 years ago

  • Status changed from New to Discussion
  • Assignee set to François ARMAND


Dots are not allowed in in the variable name (that's not allowed by CFEngine itself). But regarding the directive form, I can see what you may have misunderstood given the text:

Configures a generic CFEngine variable in a common bundle, to be used in another Technique. This Technique does nothing by itself, you must reuse the variable(s) you will create here in another Technique with the form: ${generic_variable_definition.variablename}

In the above description, "generic_variable_definition" is to be taken literaly. So if you entered for the field variable name "foo", you will use: "${}".

Does that help? If so, I will update the bug to "change the CFEngine variable directive description so that it is not misleading".

Actions #2

Updated by Cedric JARDIN almost 10 years ago


It was working on Rudder v2.5.3 and we got a lot of variable with dot in their name.

Actions #3

Updated by François ARMAND almost 10 years ago

  • Project changed from 34 to 24
  • Assignee changed from François ARMAND to Nicolas CHARLES

OK... Then I will ask for a Jocker. Nicolas, could you please take a look to that one ?

Actions #4

Updated by Nicolas CHARLES almost 10 years ago

This is interresting; the CFEngine documentation explicitely states that variable can contain only letters, digits and underscore ( )
In the general case, using a dot in a variable fails; however, in the specific case of the Generic CFEngine variable Definition (a definition in a bundle common, refered from another bundle), it works, while it shouldn't.

We fixed the regexp to check the validity of the variable name on May 17th 2013 (ticket #3599), that's why you were able to use dot before this fix.

This CFEngine documentation clearly states that dot is not allowed in variable name, we won't support the dot in variable name.
We strongly suggests that you replace the dot by underscore in the directives based on Generic CFEngine variable Definition and on all directives using this. A migration script will be created for the next release.

Actions #5

Updated by Nicolas CHARLES almost 10 years ago

  • Category set to Techniques
  • Status changed from Discussion to Rejected
Actions #6

Updated by Benoît PECCATTE about 8 years ago

  • Project changed from 24 to Rudder
  • Category changed from Techniques to Techniques

Also available in: Atom PDF