create ports having the same address
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ironic |
Fix Released
|
High
|
Haomeng,Wang |
Bug Description
First, create a port AA:BB:CC:DD:EE:FF.
$ ironic port-create --node_id a823094e-
+--
| Property | Value |
+--
| extra | {} |
| uuid | 708087bc-
| node_id | a823094e-
| address | AA:BB:CC:DD:EE:FF |
+--
Next, try to create a port with the same address. It fails since the address already exists (OK).
$ ironic port-create --node_id a823094e-
MAC address already exists.
However, if use "-" instead of ":", we can do it (BAD).
$ ironic port-create --node_id a823094e-
+--
| Property | Value |
+--
| extra | {} |
| uuid | 7e1a3ee3-
| node_id | a823094e-
| address | AA-BB-CC-DD-EE-FF |
+--
$ ironic port-list
+--
| UUID | Address |
+--
| 7e1a3ee3-
| 708087bc-
+--
Changed in ironic: | |
assignee: | nobody → Haomeng,Wang (whaom) |
Changed in ironic: | |
importance: | Undecided → High |
Changed in ironic: | |
milestone: | none → icehouse-1 |
status: | Fix Committed → Fix Released |
Changed in ironic: | |
milestone: | icehouse-1 → 2014.1 |
We should follow "The standard (IEEE 802) format for printing MAC-48 addresses" - http:// en.wikipedia. org/wiki/ MAC_address, the MAC address hexadecimal digits are separated by hyphens (-) or colons (:), so have to make sure we store one Single format(such as colons) in the database, convert to colons if the input MAC is separated by hyphens, compare the existing MAC with same delimiter, then the comparison logic is working.
I will submit the code change to review.