port delete fails if VM is already deleted (not found)

Bug #1688450 reported by Senthilnathan Murugappan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
Trunk
Fix Committed
High
Sachin Bansal

Bug Description

The script creates a port and launches the VM with port-id option and delete the VM first and then the VMI. However deletion of VMI fails due to VM not found error.

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/__init__.py", line 1067, in handler_trap_exception
    response = handler(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_interface.py", line 484, in plugin_http_post_port
    return self.plugin_delete_port(context, port)
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_interface.py", line 433, in plugin_delete_port
    cfgdb.port_delete(port['id'])
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py", line 2560, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py", line 4026, in port_delete
    self._vnc_lib.virtual_machine_delete(id=instance_id)
  File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 41, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 641, in _object_delete
    self._request_server(rest.OP_DELETE, uri)
  File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 857, in _request_server
    retry_after_authn=retry_after_authn, retry_count=retry_count)
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/context.py", line 37, in wrapper
    return fn(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/vnc_openstack/neutron_plugin_db.py", line 76, in _request
    op, url, data, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/vnc_api/vnc_api.py", line 935, in _request
    % (op, url, data, content))
NoIdError: Unknown id: Error: oper 4 url /virtual-machine/9337b19b-1f7e-4713-91eb-666d19448c5a body None response ID 9337b19b-1f7e-4713-91eb-666d19448c5a does not exist

Jeba Paulaiyan (jebap)
tags: added: blocker
information type: Proprietary → Public
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/31031
Submitter: Sachin Bansal (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/31031
Committed: http://github.com/Juniper/contrail-controller/commit/87c233f6f5150d76bd5d01eb193fa2e3c5199a70
Submitter: Zuul (<email address hidden>)
Branch: master

commit 87c233f6f5150d76bd5d01eb193fa2e3c5199a70
Author: Sachin Bansal <email address hidden>
Date: Thu May 4 22:21:30 2017 -0700

Ignore NoIdError for instance-ip while deleting port

Shared ip address could be deleted by service monitor. We should
ignore NoIdError in this case.
Also, the VM could have been deleted separately. Ignore that too.

Change-Id: Ib3076e25fb94aca8d076db0dbeb3e74350eb3fcf
Closes-Bug: 1688449
Closes-Bug: 1688450

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.