API traceback when tag deleted

Bug #1758847 reported by Édouard Thuleau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R4.1
Fix Committed
High
Édouard Thuleau
Trunk
Fix Committed
High
Édouard Thuleau

Bug Description

Traceback (most recent call last):
  File "vnc_cfg_api_server/vnc_cfg_api_server.py", line 1239, in stateful_delete
    ok, result = r_class.post_dbe_delete(id, read_result, db_conn)
  File "vnc_cfg_api_server/vnc_cfg_types.py", line 2314, in post_dbe_delete
    cls.server.internal_request_delete('tag-type', tag_type_uuid)
  File "vnc_cfg_api_server/vnc_cfg_api_server.py", line 1440, in internal_request_delete
    self.http_resource_delete(object_type, obj_uuid)
  File "/opt/stack/contrail/build/debug/config/api-server/.tox/py27/local/lib/python2.7/site-packages/cfgm_common/vnc_api_stats.py", line 17, in wrapper
    response = func(api_server_obj, resource_type, *args, **kwargs)
  File "vnc_cfg_api_server/vnc_cfg_api_server.py", line 1179, in http_resource_delete
    raise cfgm_common.exceptions.HttpError(409, err_msg)
HttpError: HTTP Status: 409 Content: Delete when resource still referred: ['http://127.0.0.1/tag/475821e2-c611-478b-aff1-2e5da83e3868']

Tags: config
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/41066
Submitter: Édouard Thuleau (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/41066
Committed: http://github.com/Juniper/contrail-controller/commit/4b42ffb060996560979713e29bd4a9436d9bff27
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit 4b42ffb060996560979713e29bd4a9436d9bff27
Author: Édouard Thuleau <email address hidden>
Date: Mon Mar 26 10:43:53 2018 +0200

[config] Catch RefExists exception on Tag deletion

All Tag resource have a reference to it's TagType resource. When a Tag
is deleted, code tries to delete its refered TagType and if that TagType
is still used by another Tag, it ignores TagType deletion. That patch
correctly handles that case to prevent stack trace in API server log.

Change-Id: I412c8b52a5c99b4e06733fa34cd10a439a41a694
Closes-Bug: #1758847

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/41101
Submitter: Édouard Thuleau (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/41101
Committed: http://github.com/Juniper/contrail-controller/commit/c87deb7f7d4c7b99b59fb52fe7d01171d32d9cac
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit c87deb7f7d4c7b99b59fb52fe7d01171d32d9cac
Author: Édouard Thuleau <email address hidden>
Date: Mon Mar 26 10:43:53 2018 +0200

[config] Catch RefExists exception on Tag deletion

All Tag resource have a reference to it's TagType resource. When a Tag
is deleted, code tries to delete its refered TagType and if that TagType
is still used by another Tag, it ignores TagType deletion. That patch
correctly handles that case to prevent stack trace in API server log.

Change-Id: I412c8b52a5c99b4e06733fa34cd10a439a41a694
Closes-Bug: #1758847
(cherry picked from commit 4b42ffb060996560979713e29bd4a9436d9bff27)

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.