tacker fails to delete vnf if vnf instance_id is null

Bug #1588713 reported by Kanagaraj Manickam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tacker
Fix Released
Medium
Kanagaraj Manickam

Bug Description

When the VNF creation is failed, it status is set to ERROR and instance_id is not set (and is null)
So when user tries to delete this failed VNF, following exception is thrown:

 from (pid=3256) _http_log_response /usr/local/lib/python2.7/dist-packages/keystoneclient/session.py:231
2016-06-02 21:55:21.602 ERROR tacker.vm.plugin [-] _delete_device_wait
2016-06-02 21:55:21.602 TRACE tacker.vm.plugin Traceback (most recent call last):
2016-06-02 21:55:21.602 TRACE tacker.vm.plugin File "/opt/stack/tacker/tacker/vm/plugin.py", line 355, in _delete_device_wait
2016-06-02 21:55:21.602 TRACE tacker.vm.plugin region_name=region_name)
2016-06-02 21:55:21.602 TRACE tacker.vm.plugin File "/opt/stack/tacker/tacker/common/driver_manager.py", line 70, in invoke
2016-06-02 21:55:21.602 TRACE tacker.vm.plugin return getattr(driver, method_name)(**kwargs)
2016-06-02 21:55:21.602 TRACE tacker.vm.plugin File "/opt/stack/tacker/tacker/common/log.py", line 33, in wrapper
2016-06-02 21:55:21.602 TRACE tacker.vm.plugin return method(*args, **kwargs)
2016-06-02 21:55:21.602 TRACE tacker.vm.plugin File "/opt/stack/tacker/tacker/vm/infra_drivers/heat/heat.py", line 520, in delete_wait
2016-06-02 21:55:21.602 TRACE tacker.vm.plugin stack = heatclient_.get(device_id)
2016-06-02 21:55:21.602 TRACE tacker.vm.plugin File "/opt/stack/tacker/tacker/vm/infra_drivers/heat/heat.py", line 587, in get
2016-06-02 21:55:21.602 TRACE tacker.vm.plugin return self.stacks.get(stack_id)
2016-06-02 21:55:21.602 TRACE tacker.vm.plugin File "/opt/stack/python-heatclient/heatclient/v1/stacks.py", line 264, in get
2016-06-02 21:55:21.602 TRACE tacker.vm.plugin resp = self.client.get('/stacks/%s' % stack_id, **kwargs)
2016-06-02 21:55:21.602 TRACE tacker.vm.plugin File "/usr/local/lib/python2.7/dist-packages/keystoneclient/adapter.py", line 176, in get
2016-06-02 21:55:21.602 TRACE tacker.vm.plugin return self.request(url, 'GET', **kwargs)
2016-06-02 21:55:21.602 TRACE tacker.vm.plugin File "/opt/stack/python-heatclient/heatclient/common/http.py", line 324, in request
2016-06-02 21:55:21.602 TRACE tacker.vm.plugin raise exc.from_response(resp)
2016-06-02 21:55:21.602 TRACE tacker.vm.plugin HTTPNotFound: ERROR: The Stack (None) could not be found.
2016-06-02 21:55:21.602 TRACE tacker.vm.plugin

Changed in tacker:
assignee: nobody → Kanagaraj Manickam (kanagaraj-manickam)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tacker (master)

Fix proposed to branch: master
Review: https://review.openstack.org/325167

Changed in tacker:
status: New → In Progress
Changed in tacker:
importance: Undecided → Medium
milestone: none → newton-2
Revision history for this message
Sripriya (sseetha) wrote :

FYI: the device does get deleted from DB. It is only that we pass a None object for stack deletion for which heat complains None stack could not be found and throws an error trace which is caught in plugin delete call and handles the exception by cleaning up in DB and deleting from server.

Changed in tacker:
importance: Medium → Low
Revision history for this message
Sripriya (sseetha) wrote :

Marking it to low as it is more of handling the None checks gracefully within the code.

Revision history for this message
Kanagaraj Manickam (kanagaraj-manickam) wrote :

Sripriya, Fix looks very simple, but the functionality vise it is not allowing to delete the failed VNF, and is very much concerned from user point of view. So in this perspective, importance could be medium, IMO.

Revision history for this message
Sripriya (sseetha) wrote :

Kanagaraj, are you mentioning VNF in ERROR state cannot be deleted from CLI or Horizon.?

I'm able to delete VNF in ERROR state. Not sure what I'm missing here. Also see, https://github.com/openstack/tacker/blob/master/tacker/vm/plugin.py#L393 and https://github.com/openstack/tacker/blob/master/tacker/vm/plugin.py#L363 which ensures VNF is deleted when it is in ERROR state.

I have hence marked the bug as low priority and it is not because of the fix. Kindly clarify. Thanks.

Revision history for this message
Sripriya (sseetha) wrote :

I understood your point now. Thanks. Moving it back to Medium.

Changed in tacker:
importance: Low → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tacker (master)

Reviewed: https://review.openstack.org/325167
Committed: https://git.openstack.org/cgit/openstack/tacker/commit/?id=c74cb38f23c9b7dd15a978d67a1c13f275349f48
Submitter: Jenkins
Branch: master

commit c74cb38f23c9b7dd15a978d67a1c13f275349f48
Author: Kanagaraj Manickam <email address hidden>
Date: Thu Jun 2 22:25:47 2016 +0530

    Delete device when instance_id is null

    When nfv delete action is performed, it helps to
    remove the device from tacker when that device's
    instance_id is null.

    Change-Id: I3796a1c5b4a077d14c56ff84976e72a5a891fdca
    Closes-bug: #1588713

Changed in tacker:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tacker (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/329757

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tacker (stable/mitaka)

Reviewed: https://review.openstack.org/329757
Committed: https://git.openstack.org/cgit/openstack/tacker/commit/?id=2e316342a0f326be6526f5db94e7e193816c29a2
Submitter: Jenkins
Branch: stable/mitaka

commit 2e316342a0f326be6526f5db94e7e193816c29a2
Author: Kanagaraj Manickam <email address hidden>
Date: Thu Jun 2 22:25:47 2016 +0530

    Delete device when instance_id is null

    When nfv delete action is performed, it helps to
    remove the device from tacker when that device's
    instance_id is null.

    Closes-bug: #1588713
    (cherry picked from commit c74cb38f23c9b7dd15a978d67a1c13f275349f48)

    Change-Id: I3796a1c5b4a077d14c56ff84976e72a5a891fdca

tags: added: in-stable-mitaka
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/tacker 0.4.0

This issue was fixed in the openstack/tacker 0.4.0 release.

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.