← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1602357] Re: Nova is not marking virtual interfaces as deleted in db on instance delete

 

Reviewed:  https://review.openstack.org/341102
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=92a388a1e34559b2ce69d31fdef996ff029495a6
Submitter: Jenkins
Branch:    master

commit 92a388a1e34559b2ce69d31fdef996ff029495a6
Author: Matt Riedemann <mriedem@xxxxxxxxxx>
Date:   Tue Jul 12 13:17:34 2016 -0400

    neutron: delete VIFs when deallocating networking
    
    In e2eb6659a426bae05a54b93ebf31ff3247125258 we started creating
    VirtualInterface objects for instances/ports when allocating
    networking in the neutronv2 API code. This is used to support
    virtual device tagging.
    
    We need to delete the VIFs when deallocating the networking for
    the instance though otherwise we can hit unique constraint failures
    when trying to re-use an existing port from one instance to another
    since the VIF has a unique constraint on the address which is the
    port's MAC and uuid when using neutron.
    
    Change-Id: I2254bad0df3ccc00cd5c9438fa2684e705442e2d
    Closes-Bug: #1602357


** Changed in: nova
       Status: In Progress => Fix Released

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

Title:
  Nova is not marking virtual interfaces as deleted in db on instance
  delete

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  On nova instance delete, the virtual interface records associated with
  the instance are not getting marked as deleted on instance delete.
  This leads to a DBDuplicateEntry traceback in n-cond.log when the port
  is attempted to be used on another instance.

  Steps to reproduce:
  1. Boot up an instance with a network port.
  2. Update the port with "device_id" blank.
  3. Delete the nova instance.
  4. Attempt to boot a new instance with the port.

  Log entry of traceback:
  n-cond.log:2016-07-07 20:19:24.587 TRACE nova.db.sqlalchemy.api DBDuplicateEntry: (pymysql.err.IntegrityError) (1062, u"Duplicate entry 'fa:16:3e:45:4c:1a/44aa08c2-85e5-4d70-878d-7723d96484d1-0' for key 'uniq_virtual_interfaces0address0deleted'") [SQL: u'INSERT INTO virtual_interfaces (created_at, updated_at, deleted_at, deleted, address, network_id, instance_uuid, uuid, tag) VALUES (%(created_at)s, %(updated_at)s, %(deleted_at)s, %(deleted)s, %(address)s, %(network_id)s, %(instance_uuid)s, %(uuid)s, %(tag)s)'] [parameters: {'instance_uuid': '34ca6eea-8921-4c1e-8c52-c1873e15898d', 'uuid': '44aa08c2-85e5-4d70-878d-7723d96484d1', 'network_id': None, 'created_at': datetime.datetime(2016, 7, 7, 20, 19, 24, 586359), 'updated_at': None, 'deleted': 0, 'tag': None, 'address': u'fa:16:3e:45:4c:1a/44aa08c2-85e5-4d70-878d-7723d96484d1', 'deleted_at': None}]

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


References