Project

General

Profile

Actions

Bug #3640

closed

Variable definition is not valid

Added by Cedric JARDIN almost 11 years ago. Updated about 9 years ago.

Status:
Rejected
Priority:
N/A
Category:
Techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

Hello,

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

Exemple : Variable name = "test.varia"

ERROR DISPLAYED :

"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 11 years ago

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

Hello,

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: "${generic_variable_definition.foo}".

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 11 years ago

Hello,

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 11 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 11 years ago

This is interresting; the CFEngine documentation explicitely states that variable can contain only letters, digits and underscore ( http://cfengine.com/manuals/cf3-Reference#Syntax )
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 11 years ago

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

Updated by Benoît PECCATTE about 9 years ago

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

Also available in: Atom PDF