euca_conf does not properly register new nodes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Eucalyptus |
New
|
Undecided
|
Unassigned | ||
eucalyptus (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
When euca_conf --discover-nodes or --register-nodes adds a new node to the NODES list in eucalyptus.conf, the node will not be added if its name is a substring of a name of any previously added nodes.
The bug in the euca_conf shell script is here:
# NODES list
if ! echo "${NODES}"|grep "${NEWNODE}" > /dev/null ; then
fi
Here, grep will match any matching substring, *even if it does not form a full node name*.
The problem is significant in particular for IP addresses, when it is likely that one IP address to be the substring of another. In my case, it was: 10.0.10.1 and 10.0.10.10. After I added the node 10.0.10.10, euca_conf refused to register 10.0.10.1 in eucalyptus.conf, even if its output was successful.
A quick solution would be to add the "-w" parameter to grep, but I'm not yet sure it works in every situation (e.g. when ${NEWNODE} contains regexp language symbols).