Tacker should not add VNF to monitoring service if mgmt_url is None

Bug #1524524 reported by Sripriya
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
tacker
Fix Released
Medium
Sripriya

Bug Description

Tacker currently adds VNF instance to monitoring thread even though VNF is an ERROR state which can be due to multiple reasons:
Instance creation fails, mgmt IP addr assignment is not successful or any other internal ERROR for which Tacker service throws an ugly stack trace.

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/eventlet/greenpool.py", line 82, in _spawn_n_impl
    func(*args, **kwargs)
  File "/opt/stack/new/tacker/tacker/vm/plugin.py", line 315, in create_device_wait
    self.add_device_to_monitor(device_dict)
  File "/opt/stack/new/tacker/tacker/vm/plugin.py", line 227, in add_device_to_monitor
    device_dict, action_cb)
  File "/opt/stack/new/tacker/tacker/vm/monitor.py", line 98, in to_hosting_vnf
    device_dict['mgmt_url']),
  File "/opt/stack/new/tacker/tacker/openstack/common/jsonutils.py", line 172, in loads
    return json.loads(strutils.safe_decode(s, encoding))
  File "/opt/stack/new/tacker/tacker/openstack/common/strutils.py", line 112, in safe_decode
    raise TypeError("%s can't be decoded" % type(text))
TypeError: <type 'NoneType'> can't be decoded

This error can be misleading as the actual internal error is masked and it appears to the user that there is problem with monitoring itself.

Expected behavior:

Tacker should handle the actual ERROR gracefully and not mislead the user with stack trace dump

Sripriya (sseetha)
Changed in tacker:
assignee: nobody → Sripriya (sseetha)
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/256104

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

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

commit 1edf75630c668bdd74b36fa084cdff57e9cd965e
Author: Sripriya <email address hidden>
Date: Thu Dec 10 13:34:35 2015 -0800

    Fix mgmt_url 'NoneType' error can't be decoded

    This fixes the "TypeError: <type 'NoneType'> can't be decoded"
    stack trace that is dumped when VNF creation fails and
    mgmt_url is None.

    VNf should not be added to monitoring if it in ERROR state and
    mgmt_url is None. The actual error is masked when 'None' mgmt_url
    is decoded which can mislead the user.

    Change-Id: I164bc03a78b9d0dd533506df09e5c267f6855ecb
    Closes-Bug: #1524524

Changed in tacker:
status: In Progress → Fix Released
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/tacker 0.3.0

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

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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