Menu

#4675 When a character equals sign ("=") is included in group name, there is no way to change it back, or remove it

2.10
closed
None
object definition
5
2015-07-27
2015-05-22
GONG Jie
No

A character equals sign ("=") is included in the group name by accident. After that, there is no way to change it back, or remove the group definition.

[root@c910f02c03p27 log]# mkdef -t group badnode members=c910f03c02p03              
1 object definitions have been created or modified.
[root@c910f02c03p27 log]# lsdef -t group badnode
Object name: badnode
    grouptype=static
    members=c910f03c02p03
[root@c910f02c03p27 log]# chdef -t group badnode -n badnode=c910f03c02p03
Changed the object name from badnode to badnode=c910f03c02p03.
[root@c910f02c03p27 log]# chdef -t group badnode=c910f03c02p03 -n badnode
Error: No object names were provided.

Usage: chdef - Change xCAT data object definitions.

  chdef [-h | --help ] [-t object-types]

  chdef [-t object-types] [-o object-names] [-n new-name] [node]

  chdef [-V | --verbose] [-t object-types] [-o object-names] [-d | --dynamic]
    [-z | --stanza] [-m | --minus] [-p | --plus]
    [-w attr==val [-w attr=~val] ... ] [noderange] [attr=val [attr=val...]]

    [-u [provmethod=<install|netboot|statelite>]|[profile=<xxx>]|[osvers=value]|[osarch=value]]

The following data object types are supported by xCAT.

auditlog
boottarget
eventlog
firmware
group
kit
kitcomponent
kitrepo
monitoring
network
node
notification
osdistro
osdistroupdate
osimage
policy
rack
route
site
zone

Use the '-h' option together with the '-t' option to
get a list of valid attribute names for each object type.

[root@c910f02c03p27 log]# lsdef -t group badnode=c910f03c02p03 
all  (group)
bad  (group)
badnode  (group)
badnode=c910f03c02p03  (group)
cec  (group)
compute  (group)
diskfull100g  (group)
diskfull10g  (group)
diskfull1g  (group)
diskfull40g  (group)
diskfull80g  (group)
f02c01compute  (group)
f02c02compute  (group)
f02c03compute  (group)
f02c04compute  (group)
f02c05compute  (group)
f02c06compute  (group)
f02c07compute  (group)
f02c08compute  (group)
f02c09compute  (group)
f03c01compute  (group)
f03c02compute  (group)
hmc  (group)
lpar  (group)
p7compute  (group)
p8compute  (group)
vios  (group)
[root@c910f02c03p27 log]# rmdef -t group badnode=c910f03c02p03
Error: No object names were provided.

Usage: rmdef - Remove xCAT data object definitions.

  rmdef [-h | --help ] [-t object-types]

  rmdef [-V | --verbose] [-t object-types] [-a | --all] [-f | --force]
    [-o object-names] [-w attr=val,[attr=val...] [noderange]


The following data object types are supported by xCAT.

auditlog
boottarget
eventlog
firmware
group
kit
kitcomponent
kitrepo
monitoring
network
node
notification
osdistro
osdistroupdate
osimage
policy
rack
route
site
zone

Use the '-h' option together with the '-t' option to
get a list of valid attribute names for each object type.

[root@c910f02c03p27 log]# rmdef -t group badnode\=c910f03c02p03
Error: No object names were provided.

Usage: rmdef - Remove xCAT data object definitions.

  rmdef [-h | --help ] [-t object-types]

  rmdef [-V | --verbose] [-t object-types] [-a | --all] [-f | --force]
    [-o object-names] [-w attr=val,[attr=val...] [noderange]


The following data object types are supported by xCAT.

auditlog
boottarget
eventlog
firmware
group
kit
kitcomponent
kitrepo
monitoring
network
node
notification
osdistro
osdistroupdate
osimage
policy
rack
route
site
zone

Use the '-h' option together with the '-t' option to
get a list of valid attribute names for each object type.

Discussion

  • GONG Jie

    GONG Jie - 2015-05-22
    • summary: When a character equals sign ("=") is included in group name, there is no way to change it back --> When a character equals sign ("=") is included in group name, there is no way to change it back, or remove it
     
  • Guang Cheng Li

    Guang Cheng Li - 2015-05-25

    The character "=" is not allowed in the xCAT object names, you could not mkdef any object with the character "=" in the name, chdef -n is the only way to name the xCAT object with "=" in the name, could add a check with chdef -n to avoid this.

    Need to discuss with the team on which characters are allowed in xCAT objects. RFC 952 http://tools.ietf.org/html/rfc952 should be a good reference for us to define the rule of xCAT objects naming.

     
  • Guang Cheng Li

    Guang Cheng Li - 2015-05-25
     
  • Guang Cheng Li

    Guang Cheng Li - 2015-05-25
    • assigned_to: Guang Cheng Li
     
  • Guang Cheng Li

    Guang Cheng Li - 2015-06-08

    Updated the xcatdb manpage to indicate that the xCAT objects could only contain alpha characters, numbers and "-", through commit e16453569dc8e696b7217f40ac6e722a519272e2:

    man xcatdb
    ...
    
           xCAT Object Name Format is defined by the following regex:
    
            ^([A-Za-z-]+)([0-9]+)(([A-Za-z-]+[A-Za-z0-9-]*)*)
    
           In plain English, an object name is in xCAT Object Name Format if starting from the begining there are:
    
           o one or more alpha characters of any case and any number of "-" in any combination
    
           o followed by one or more numbers
    
           o then optionally followed by one alpha character of any case  or "-"
    
           o followed by any combination of case mixed alphanumerics and "-"
    
     
  • Guang Cheng Li

    Guang Cheng Li - 2015-06-08

    based on the team discussion, the fix is not to allow chdef to change the object name to include "=".

    Fixed in 2.10:
    commit 0f2de76f020fcad060d2bb3c4de6213235fa01c5

     
  • Guang Cheng Li

    Guang Cheng Li - 2015-06-08
    • status: open --> pending
     
  • GONG Jie

    GONG Jie - 2015-07-27
    • status: pending --> closed
     
  • GONG Jie

    GONG Jie - 2015-07-27

    This bug is already fixed and verified. I will close this bug.

     
MongoDB Logo MongoDB