Bug 726108 - ccs and ccp cannot work with objects containing comma character - ','
Summary: ccs and ccp cannot work with objects containing comma character - ','
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: condor-wallaby-tools
Version: Development
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: 2.1
: ---
Assignee: Robert Rati
QA Contact: Daniel Horák
URL:
Whiteboard:
Depends On:
Blocks: 743350
TreeView+ depends on / blocked
 
Reported: 2011-07-27 14:55 UTC by Lubos Trilety
Modified: 2012-01-23 17:27 UTC (History)
3 users (show)

Fixed In Version: condor-wallaby-tools-4.1-5
Doc Type: Bug Fix
Doc Text:
The remote configuration tools incorrectly split entity names on any commas in the name, and proceeded to treat those names as separate entities. This update corrects the parser so that it allows for names which include commas, with the result that the remote configuration tools now properly identify a name which contains a comma as long as the name is surrounded by quotes escaped with backslash characters, i.e. \".
Clone Of:
Environment:
Last Closed: 2012-01-23 17:27:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:0045 0 normal SHIPPED_LIVE Red Hat Enterprise MRG Grid 2.1 bug fix and enhancement update 2012-01-23 22:22:58 UTC

Description Lubos Trilety 2011-07-27 14:55:25 UTC
Description of problem:
Both condor_configure_store and condor_configure_pool were not able to work with object containing ','. Such object name is parsed by tools as two names.

E.g.
# wallaby show-param "p,p"
Console Connection Established...
p,p
  kind:  "string"
  default:  ""
  description:  ""
  must_change:  false
  requires_restart:  false
  visibility_level:  0
  depends:  []
  conflicts:  []

# ccs --list-all-params | grep ','
  p,p

# ccs -e -p 'p,p'
Error: Failed to find parameter "p" (134218753, Parameter named p not found)
Error: Failed to find parameter "p" (134218753, Parameter named p not found)

# ccp -a -n `hostname` -p 'p,p'
Value for "p": 1
Value for "p": 2
Apply these changes [Y/n] ? 
Error: Problem adding parameters (134218753, Invalid parameters for the identity group for lt-rhel5_32.mrg-qe-12.lab.eng.brq.redhat.com:  ["p"])

Version-Release number of selected component (if applicable):
condor-wallaby-tools-4.1-4


Expected results:
condor-wallaby-tools are able to work with object names containing comma character

Additional info:

Comment 1 Matthew Farrellee 2011-08-30 15:55:13 UTC
FYI, a comma (,) is not a valid character in a Condor configuration parameter name.

$ echo "TEST,ING = 1" > condor_config.bogus
$ CONDOR_CONFIG=condor_config.bogus condor_config_val -dump
Configuration Error File <condor_config.bogus>, Line 1: Illegal Identifier: <TEST,ING>
Configuration Error Line 1 while reading global config source condor_config.bogus

Comment 2 Robert Rati 2011-08-30 21:03:43 UTC
./condor_configure_store -l -n \"node,n\" -p \"param,p\",p1 -s '"subsys, s1"' -g \"group,g\" -f \"feat,f\"

ccs and ccp will now work with items that contain a comma, but there must be escaped quotes around the item name like the example above.

Fix on branch:
BZ726108-allow-comma-in-list

Comment 4 Robert Rati 2011-08-31 19:22:02 UTC
ccs will disallow creation of params with a comma in them, but neither ccs nor ccp will prevent acting upon a param with a comma that already exists.

Comment 5 Robert Rati 2011-09-06 20:42:44 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
C: Trying to configure an entity with a comma in the name using the remote configuration tools.
C: The tools would split he entity name on the comma and treat it as two separate entities.
F: Parse names differently and allow for names with a comma.
R: The remote configuration tools will properly identify entity names with a comma so long as the name is surrounded by escaped quotes (\")

Comment 7 Daniel Horák 2011-10-25 07:35:48 UTC
Reproduced on RHEL 5.7 i386:
# rpm -q condor-wallaby-tools
  condor-wallaby-tools-4.1-4.el5

# wallaby add-param "p,p"
  Adding the following parameter: p,p with {}
  Console Connection Established...

# wallaby show-param "p,p"
  Console Connection Established...
  p,p
    kind:  "string"
    default:  ""
    description:  ""
    must_change:  false
    requires_restart:  false
    visibility_level:  0
    depends:  []
    conflicts:  []

# condor_configure_store --list-all-params | grep ','
    p,p

# condor_configure_store -e -p 'p,p'
  Error: Failed to find parameter "p" (134218753, Parameter named p not found)
  Error: Failed to find parameter "p" (134218753, Parameter named p not found)

# condor_configure_store -e -p \'p,p\'
  Error: Failed to find parameter "'p" (134218753, Parameter named 'p not found)
  Error: Failed to find parameter "p'" (134218753, Parameter named p' not found)

# condor_configure_pool -a -n $(hostname) -p 'p,p'
  Value for "p": 1
  Value for "p": 2

  Apply these changes [Y/n] ? 
  Error: Problem adding parameters (134218753, Invalid parameters for the identity group for dhcp-37-137.lab.eng.brq.redhat.com:  ["p"])

# condor_configure_pool -a -n $(hostname) -p \'p,p\'
  Value for "'p": 1
  Value for "p'": 2

  Apply these changes [Y/n] ? 
  Error: Problem adding parameters (134218753, Invalid parameters for the identity group for dhcp-37-137.lab.eng.brq.redhat.com:  ["p'", "'p"])
q
# condor_configure_store -l -n \"node,n\" -p \"param,p\",p1 -s '"subsys, s1"' -g \"group,g\" -f \"feat,f\"
  Error: Failed to find node ""node"
  Error: Failed to find node "n""
  Error: Failed to find parameter ""param" (134218753, Parameter named "param not found)
  Error: Failed to find parameter "p"" (134218753, Parameter named p" not found)
  Error: Failed to find parameter "p1" (134218753, Parameter named p1 not found)
  Error: Failed to find feature ""feat" (67109889, Feature named "feat not found)
  Error: Failed to find feature "f"" (67109889, Feature named f" not found)
  Error: Failed to find group ""group" (33555457, Group named "group not found)
  Error: Failed to find group "g"" (33555457, Group named g" not found)
  Error: Failed to find subsystem ""subsys" (1, ERROR: undefined method `impl' for nil:NilClass)
  Error: Failed to find subsystem "s1"" (1, ERROR: undefined method `impl' for nil:NilClass)



Verified on RHEL 5.7 i386:
# rpm -q condor-wallaby-tools
  condor-wallaby-tools-4.1.1-1.el5

# condor_configure_store --list-all-params | grep ','
  p,p

# condor_configure_store -e -p \'p,p\'
  Parameter name "p,p" is not allowed because it contains a comma

# condor_configure_pool -a -n $(hostname) -p \'p,p\'
  Value for "p,p": abc
  Apply these changes [Y/n] ? 
  Configuration applied
  Create a named snapshot of this configuration [y/N] ?
  Activate the changes [y/N] ?
  Configuration not activated

# condor_configure_store -l -n \"node,n\" -p \"param,p\",p1 -s '"subsys, s1"' -g \"group,g\" -f \"feat,f\"
  Error: Failed to find node "node,n"
  Parameter name "param,p" is not allowed because it contains a comma
  Error: Failed to find parameter "p1" (134218753, Parameter named p1 not found)
  Error: Failed to find feature "feat,f" (67109889, Feature named feat,f not found)
  Error: Failed to find group "group,g" (33555457, Group named group,g not found)
  Error: Failed to find subsystem "subsys, s1" (1, ERROR: undefined method `impl' for nil:NilClass)

ccs and ccp will now work properly with with items containing comma character.

Output on platforms RHEL 5.7 x86_64 RHEL 6.1 i386 and RHEL 6.1 x86_64 is similar.

>>> VERIFIED

Comment 8 Douglas Silas 2011-11-16 14:54:07 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,4 +1 @@
-C: Trying to configure an entity with a comma in the name using the remote configuration tools.
+The remote configuration tools incorrectly split entity names on any commas in the name, and proceeded to treat those names as separate entities. This update corrects the parser so that it allows for names which include commas, with the result that the remote configuration tools now properly identify a name which contains a comma as long as the name is surrounded by quotes escaped with a forward slash character (\").-C: The tools would split he entity name on the comma and treat it as two separate entities.
-F: Parse names differently and allow for names with a comma.
-R: The remote configuration tools will properly identify entity names with a comma so long as the name is surrounded by escaped quotes (\")

Comment 9 Douglas Silas 2011-11-17 11:27:43 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-The remote configuration tools incorrectly split entity names on any commas in the name, and proceeded to treat those names as separate entities. This update corrects the parser so that it allows for names which include commas, with the result that the remote configuration tools now properly identify a name which contains a comma as long as the name is surrounded by quotes escaped with a forward slash character (\").+The remote configuration tools incorrectly split entity names on any commas in the name, and proceeded to treat those names as separate entities. This update corrects the parser so that it allows for names which include commas, with the result that the remote configuration tools now properly identify a name which contains a comma as long as the name is surrounded by quotes escaped with backslash characters, i.e. \".

Comment 10 errata-xmlrpc 2012-01-23 17:27:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2012-0045.html


Note You need to log in before you can comment on or make changes to this bug.