cloud-install fails with multiple IP addresses
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openstack-installer |
New
|
Undecided
|
Unassigned |
Bug Description
cloud-install fails completely when multiple IP addresses exist on the machine. Generally looking at the code, it is not remotely equipped to handle this situation and multiple cleanups would be required.
The specific error I receive is:
2015-07-07 13:41:52 + /usr/share/
2015-07-07 13:41:52 Traceback (most recent call last):
2015-07-07 13:41:52 File "/usr/share/
2015-07-07 13:41:52 if args >= 3 else ip_range(network)
2015-07-07 13:41:52 File "/usr/share/
2015-07-07 13:41:52 ip_low, ip_high = ip_range_
2015-07-07 13:41:52 File "/usr/lib/
2015-07-07 13:41:52 address)
2015-07-07 13:41:52 ValueError: '10.48.134.5/25' does not appear to be an IPv4 or IPv6 address
This particular part can be fixed (and the installer continues a few steps) by changing common/
ipNetwork()
{
ip addr show $1 | awk '/^ inet / { print $2 }' | head -n1
}
However there are numerous other related issues with this code:
- ipNetwork() as well as various other functions including ipAddress(), ipNetmask(), getInterfaces() etc make no attempt to filter a single IP and/or interface. A quick fix as above would be to use |head -n1, however usage should be reviewed to ensure no where actually wants multiple IPs.
- Due to getInterfaces(), the interface 'em1' is listed 4 times under the "Select network interface" menu (once for each IP).
- The various functions use a mixture of deprecated "ifconfig", "ip" and "route". It would make most sense to simply use "ip" (iproute2) for everything. Possible issues that may arise from this is handling of alias interface names (e.g. em1:6) that may or may not exist depending on which tool is used. Another possible issue is that some IP networks, such as those used with Infiniband (IPoIB) have larger MAC addresses that ifconfig cannot show correctly.
What version of the installer are you using?