Red Hat Bugzilla – Bug 971518
DHCP host file contains duplicate IP addresses
Last modified: 2016-04-26 13:03:02 EDT
Description of problem:
There are cases when IP addresses may appear more than once in the hosts file, for example:
Version-Release number of selected component (if applicable):
85% of the time
Steps to Reproduce:
1. deploy 10 VM's
2. delete all 10 V's via horizon
Capturing some add'l info from an off-bz email thread.
There doesn't appear to be any end-user impact. Yes, there are entries in the dhcp hosts file where the same ip address is given to multiple MAC addresses, but it looks like these MAC addresses are for machines that have already been deleted and therefore (unless we have a random case of the same MAC being used a 2nd time) there should not be any case where there are ip address conflicts.
If there are ip addr conflicts that from this scenario cause two instances to get the same ip address, that would make this bug higher in severity and we'd definitely want to address it as an async update to RHOS 3.0. For the time being though, since it looks like a cosmetic/cleanup issue, I think this can be resolved in Havana/RHOS 4.0.
The problem will arise if there is an entry that has the same MAC address. This means that a VM may not receive an IP address. The probability of this happening is very low but if it does it is a serious problem.
(In reply to Gary Kotton from comment #3)
> The problem will arise if there is an entry that has the same MAC address.
> This means that a VM may not receive an IP address. The probability of this
> happening is very low but if it does it is a serious problem.
Agreed. Wouldn't that only occur if there was a 'random MAC collision'? i.e. MAC address generation should be statistically unique, so the chances of it happening would be extremely low.
The plugin will ensure that a MAC address of a new port is unique. That is, it is unique for ports that are currently defined. The chance of this happening is pretty low. I am in the process of addressing this - the idea is to validate that the mac address is unique on the dhcp agent. If the mac address is unique then the duplicate ip issue is cosmetic
Verified on Havana running rhel6.5 with:
I've did this twice on different machines. Installed openstack, define a network with subnetwork (I used vlans), and create and terminate 10 instances using horizon, for 13 times in a row.
This is a copy of the host file after the 13'th time:
if the chance to reproducible is 85% after doing it once, therefor the chance that it won't reproducible after 13 time is nano precent.
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.