*** This bug is a duplicate of bug 1597596 ***
    https://bugs.launchpad.net/bugs/1597596

Public bug reported:

Attempting to create an instance that uses an existing neutron port,
when the instance creation fails on the first compute node, and gets
rescheduled to another compute node, the rescheduled attempt fails with
a PortInUse exception. In case it matters, I'm using neutron ML2 with
linuxbridge and the port is on a VLAN provider network.

Steps to reproduce (starting with an AZ/aggregate with two functional
compute nodes up and running):

1. Create a neutron port, and make a note of the ID (os port create --network 
XXX myport)
2. Inject a failure on the first node - e.g. by renaming the qemu binary
3. Create an instance, using the port created earlier (openstack server create 
--nic port-id=XXX --image cirros --flavor m1.tiny myvm)

The instance will fail on the first node, and get rescheduled on the
second, where it will fail with:

2018-02-15 22:52:39.347 43784 ERROR nova.compute.manager Traceback (most recent 
call last):
2018-02-15 22:52:39.347 43784 ERROR nova.compute.manager   File 
"/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1415, in 
_allocate_network_async
2018-02-15 22:52:39.347 43784 ERROR nova.compute.manager     
bind_host_id=bind_host_id)
2018-02-15 22:52:39.347 43784 ERROR nova.compute.manager   File 
"/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 855, in 
allocate_for_instance
2018-02-15 22:52:39.347 43784 ERROR nova.compute.manager     context, instance, 
neutron, requested_networks)
2018-02-15 22:52:39.347 43784 ERROR nova.compute.manager   File 
"/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 573, in 
_validate_requested_port_ids
2018-02-15 22:52:39.347 43784 ERROR nova.compute.manager     raise 
exception.PortInUse(port_id=request.port_id)
2018-02-15 22:52:39.347 43784 ERROR nova.compute.manager PortInUse: Port 
9fd24371-e906-4af2-898a-eaef223abca9 is still in use.


I've reproduced this on both Ocata and Pike. It does not seem to happen if the 
port is created by nova (i.e. openstack server create --nic net-id=XXX ...)

This looks a bit like https://bugs.launchpad.net/nova/+bug/1308405 , but
that's supposed to have been fixed long ago.

** Affects: nova
     Importance: Undecided
         Status: New


** Tags: compute neutron

-- 
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/1749838

Title:
  Rescheduled instance with pre-existing port fails with PortInUse
  exception

Status in OpenStack Compute (nova):
  New

Bug description:
  Attempting to create an instance that uses an existing neutron port,
  when the instance creation fails on the first compute node, and gets
  rescheduled to another compute node, the rescheduled attempt fails
  with a PortInUse exception. In case it matters, I'm using neutron ML2
  with linuxbridge and the port is on a VLAN provider network.

  Steps to reproduce (starting with an AZ/aggregate with two functional
  compute nodes up and running):

  1. Create a neutron port, and make a note of the ID (os port create --network 
XXX myport)
  2. Inject a failure on the first node - e.g. by renaming the qemu binary
  3. Create an instance, using the port created earlier (openstack server 
create --nic port-id=XXX --image cirros --flavor m1.tiny myvm)

  The instance will fail on the first node, and get rescheduled on the
  second, where it will fail with:

  2018-02-15 22:52:39.347 43784 ERROR nova.compute.manager Traceback (most 
recent call last):
  2018-02-15 22:52:39.347 43784 ERROR nova.compute.manager   File 
"/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 1415, in 
_allocate_network_async
  2018-02-15 22:52:39.347 43784 ERROR nova.compute.manager     
bind_host_id=bind_host_id)
  2018-02-15 22:52:39.347 43784 ERROR nova.compute.manager   File 
"/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 855, in 
allocate_for_instance
  2018-02-15 22:52:39.347 43784 ERROR nova.compute.manager     context, 
instance, neutron, requested_networks)
  2018-02-15 22:52:39.347 43784 ERROR nova.compute.manager   File 
"/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 573, in 
_validate_requested_port_ids
  2018-02-15 22:52:39.347 43784 ERROR nova.compute.manager     raise 
exception.PortInUse(port_id=request.port_id)
  2018-02-15 22:52:39.347 43784 ERROR nova.compute.manager PortInUse: Port 
9fd24371-e906-4af2-898a-eaef223abca9 is still in use.

  
  I've reproduced this on both Ocata and Pike. It does not seem to happen if 
the port is created by nova (i.e. openstack server create --nic net-id=XXX ...)

  This looks a bit like https://bugs.launchpad.net/nova/+bug/1308405 ,
  but that's supposed to have been fixed long ago.

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to