← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1433524] Re: Nova deletes first preexisting port if second was attached to instance

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => kilo-rc1

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1433524

Title:
  Nova deletes first preexisting port if second was attached to instance

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  based on this change -
  https://github.com/openstack/nova/commit/1153a46738fc3ffff98a1df9d94b5a55fdd58777

  If I boot instance with preexisting port and delete this instance then port remains.
  But If I boot instance with preexisting port and attach one more port then first port is deleted while I delete the instance.

  
  1) Create port with neutron 
  | 81c98edb-06ac-4286-ad7a-2edeb901474b |      | fa:16:3e:5b:1d:c6 | {"subnet_id": "71b456c2-4805-4905-a8d8-9293e162f917", "ip_address": "172.24.4.4"} |
  2) Run instance with this port
  (0):~/devstack$ nova boot ttt --flavor 42 --image aab2d892-636d-4bde-8636-71f8ffd3c51d --nic port-id=81c98edb-06ac-4286-ad7a-2edeb901474b

  port list - 
  ~/devstack$ neutron port-list
  +--------------------------------------+------+-------------------+-----------------------------------------------------------------------------------+
  | id                                   | name | mac_address       | fixed_ips                                                                         |
  +--------------------------------------+------+-------------------+-----------------------------------------------------------------------------------+
  | 81c98edb-06ac-4286-ad7a-2edeb901474b |      | fa:16:3e:5b:1d:c6 | {"subnet_id": "71b456c2-4805-4905-a8d8-9293e162f917", "ip_address": "172.24.4.4"} |
  | a92337de-d3f2-4a5c-beb4-54bd48ec043f |      | fa:16:3e:41:b9:00 | {"subnet_id": "134b9bd5-da87-4b8f-880d-72e24206a721", "ip_address": "10.0.0.1"}   |
  | e59d3841-215a-4352-a212-d5cac5cb7bbe |      | fa:16:3e:06:4b:27 | {"subnet_id": "134b9bd5-da87-4b8f-880d-72e24206a721", "ip_address": "10.0.0.2"}   |
  | fa67a224-907e-4c11-bcae-9d919330c6b8 |      | fa:16:3e:5e:2d:a7 | {"subnet_id": "71b456c2-4805-4905-a8d8-9293e162f917", "ip_address": "172.24.4.2"} |
  +--------------------------------------+------+-------------------+-----------------------------------------------------------------------------------+

  3) Create another port
  (0):~/devstack$ neutron port-create public
  | fixed_ips             | {"subnet_id": "71b456c2-4805-4905-a8d8-9293e162f917", "ip_address": "172.24.4.8"} |
  | id                    | a26c8bc0-ea94-4abb-9ffc-752a594e08e7                                              |

  4) attach port to the instance
  (0):~/devstack$ nova interface-attach --port-id a26c8bc0-ea94-4abb-9ffc-752a594e08e7 ttt

  5) check instance ports -
  (0):~/devstack$ nova interface-list ttt
  +------------+--------------------------------------+--------------------------------------+--------------+-------------------+
  | Port State | Port ID                              | Net ID                               | IP addresses | MAC Addr          |
  +------------+--------------------------------------+--------------------------------------+--------------+-------------------+
  | DOWN       | 81c98edb-06ac-4286-ad7a-2edeb901474b | 1e629e00-28b6-4a67-9940-dee2660a23a8 | 172.24.4.4   | fa:16:3e:5b:1d:c6 |
  | DOWN       | a26c8bc0-ea94-4abb-9ffc-752a594e08e7 | 1e629e00-28b6-4a67-9940-dee2660a23a8 | 172.24.4.8   | fa:16:3e:a1:74:eb |
  +------------+--------------------------------------+--------------------------------------+--------------+-------------------+
  (0):~/devstack$ neutron port-list
  +--------------------------------------+------+-------------------+-----------------------------------------------------------------------------------+
  | id                                   | name | mac_address       | fixed_ips                                                                         |
  +--------------------------------------+------+-------------------+-----------------------------------------------------------------------------------+
  | 81c98edb-06ac-4286-ad7a-2edeb901474b |      | fa:16:3e:5b:1d:c6 | {"subnet_id": "71b456c2-4805-4905-a8d8-9293e162f917", "ip_address": "172.24.4.4"} |
  | a26c8bc0-ea94-4abb-9ffc-752a594e08e7 |      | fa:16:3e:a1:74:eb | {"subnet_id": "71b456c2-4805-4905-a8d8-9293e162f917", "ip_address": "172.24.4.8"} |
  | a92337de-d3f2-4a5c-beb4-54bd48ec043f |      | fa:16:3e:41:b9:00 | {"subnet_id": "134b9bd5-da87-4b8f-880d-72e24206a721", "ip_address": "10.0.0.1"}   |
  | e59d3841-215a-4352-a212-d5cac5cb7bbe |      | fa:16:3e:06:4b:27 | {"subnet_id": "134b9bd5-da87-4b8f-880d-72e24206a721", "ip_address": "10.0.0.2"}   |
  | fa67a224-907e-4c11-bcae-9d919330c6b8 |      | fa:16:3e:5e:2d:a7 | {"subnet_id": "71b456c2-4805-4905-a8d8-9293e162f917", "ip_address": "172.24.4.2"} |
  +--------------------------------------+------+-------------------+-----------------------------------------------------------------------------------+

  6) delete instance and check ports in neutron -

  (0):~/devstack$ neutron port-list
  +--------------------------------------+------+-------------------+-----------------------------------------------------------------------------------+
  | id                                   | name | mac_address       | fixed_ips                                                                         |
  +--------------------------------------+------+-------------------+-----------------------------------------------------------------------------------+
  | a26c8bc0-ea94-4abb-9ffc-752a594e08e7 |      | fa:16:3e:a1:74:eb | {"subnet_id": "71b456c2-4805-4905-a8d8-9293e162f917", "ip_address": "172.24.4.8"} |
  | a92337de-d3f2-4a5c-beb4-54bd48ec043f |      | fa:16:3e:41:b9:00 | {"subnet_id": "134b9bd5-da87-4b8f-880d-72e24206a721", "ip_address": "10.0.0.1"}   |
  | e59d3841-215a-4352-a212-d5cac5cb7bbe |      | fa:16:3e:06:4b:27 | {"subnet_id": "134b9bd5-da87-4b8f-880d-72e24206a721", "ip_address": "10.0.0.2"}   |
  | fa67a224-907e-4c11-bcae-9d919330c6b8 |      | fa:16:3e:5e:2d:a7 | {"subnet_id": "71b456c2-4805-4905-a8d8-9293e162f917", "ip_address": "172.24.4.2"} |
  +--------------------------------------+------+-------------------+-----------------------------------------------------------------------------------+

  
  Expected result - all preexisting ports remain in my system after instance deletion.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1433524/+subscriptions


References