Forum Discussion

William_Them_99's avatar
William_Them_99
Icon for Nimbostratus rankNimbostratus
Oct 13, 2005

Data Group List Naming Anomaly

 

I created a few data group lists in order to be able to perform exact strings matches with the "matchclass" function. The three data groups were named with hyphens, such as:

 

 

verisign-issuer-strings

 

 

The GUI accepted everything and allowed me to save the data groups. The iRule editor also accepted these names in the "matchclass" statement (referenced via $::verisign-issuer-strings). However, when the BIGIP executed the iRule containing references to these data groups, I received errors in the log like this:

 

 

can't read "::verisign": no such variable

 

 

So it looks like it truncated the name of the data group right at the first hyphen, and thus could not find it. When I changed all the hyphens in the data group list names to underscores, all worked well.

 

 

Is this a bug? The underscore workaround is fine with me, but if the iRule code can't handle it, it might be a good addition to the GUI to not allow hyphens in the name.

 

 

Thanks.
  • It's actually a TCL thing in variable substitution

    Check out the Section 7 in the TCL docs on Variable Substitution

    http://tmml.sourceforge.net/doc/tcl/Tcl.html

    Click here

    As stated there:

    [7] Variable substitution.

    If a word contains a dollar-sign (``$'') then Tcl performs variable substitution: the dollar-sign and the following characters are replaced in the word by the value of a variable. Variable substitution may take any of the following forms:

    $name

    Name is the name of a scalar variable; the name is a sequence of one or more characters that are a letter, digit, underscore, or namespace separators (two or more colons).

    $name(index)

    Name gives the name of an array variable and index gives the name of an element within that array. Name must contain only letters, digits, underscores, and namespace separators, and may be an empty string. Command substitutions, variable substitutions, and backslash substitutions are performed on the characters of index.

    ${name}

    Name is the name of a scalar variable. It may contain any characters whatsoever except for close braces.

    There may be any number of variable substitutions in a single word. Variable substitution is not performed on words enclosed in braces.

    Try enclosing the data group name in braces and you should be set.

    $::{verisign-issuer-strings}

    -Joe
  •  

    Thanks for the thorough response Joe, I appreciate it. This will let me keep a consistent naming scheme throughout the GUI.

     

     

    Thanks again.
  • Have you seen any best practice guides for naming conventions for the various objects in BigIP? e.g. VIPs, classes, pools, rules, ssl certs, profiles, variables, etc?

     

     

    Thanks

     

    -Brian