Functional testing failed to cleanup baymodel

Bug #1493668 reported by Eli Qiao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Undecided
Eli Qiao

Bug Description

Run functional testing failed but tearDown failed to cleanup Baymodel

taget@taget-ThinkStation-P300:~/devstack$ magnum baymodel-list
+--------------------------------------+-----------------+
| uuid | name |
+--------------------------------------+-----------------+
| 01a389b2-8eba-40ef-8a87-32551a4a6ec1 | testk8sAPI |
| 0425dfdb-6c35-4f19-b08b-03166f11c660 | testbay |
| 0684721b-f9b4-46fb-8563-8835fa331775 | testk8sAPI |
| 16ba7ab7-6699-495a-a05f-b2dfe2cfb0f9 | testk8sAPI |
| 1ad44556-c9e4-4ee9-815e-5bc197d8e84a | testk8sAPI |
| 201902f1-e39a-4081-91e9-2e650c711c56 | testk8sAPI |
| 227aadb9-be57-40c1-b6ab-7c1c75b950c3 | swarmmodel |
| 6a8d8cdd-4518-438f-876c-8c20236d6a3d | mesosbaymodel |
| 81da6a8c-e1a8-4730-98d1-18d272c5aa5a | testbay |
| 84864ff6-2d27-4f8a-a42b-7a40d5288a57 | testk8sAPI |
| 96207719-ae9d-48f4-90d2-a57278b535af | None |
| acd29512-54bd-47c8-8a60-07b833397a17 | swarmmodel |
| bf435c1b-a56b-4b34-884c-b7a1da2efee9 | testk8sAPI |
| dd021c16-f88b-4992-aa9a-f570d1109df6 | testk8sAPI |
| e13727d0-1951-46ae-bc15-003353572ec2 | mesosbaymodel_1 |
| e6ac7801-143a-4159-905a-654f0dde6704 | testbay |
| fbb03fd5-08fc-446c-a249-77bdf0da5d5c | testbay |

Trace is here.

FAIL: tearDownClass (magnum.tests.functional.test_magnum_python_client.TestKubernetesAPIs)
tags: worker-6
----------------------------------------------------------------------
Traceback (most recent call last):
  File "magnum/tests/functional/test_magnum_python_client.py", line 228, in tearDownClass
    cls._delete_baymodel(cls.baymodel.uuid)
  File "magnum/tests/functional/test_magnum_python_client.py", line 119, in _delete_baymodel
    cls.cs.baymodels.delete(baymodel_uuid)
  File "/opt/stack/python-magnumclient/magnumclient/v1/baymodels.py", line 98, in delete
    return self._delete(self._path(id))
  File "/opt/stack/python-magnumclient/magnumclient/common/base.py", line 136, in _delete
    self.api.raw_request('DELETE', url)
  File "/opt/stack/python-magnumclient/magnumclient/common/httpclient.py", line 217, in raw_request
    return self._http_request(url, method, **kwargs)
  File "/opt/stack/python-magnumclient/magnumclient/common/httpclient.py", line 179, in _http_request
    error_json.get('debuginfo'), method, url)
magnumclient.openstack.common.apiclient.exceptions.BadRequest: Baymodel 1ad44556-c9e4-4ee9-815e-5bc197d8e84a is referenced by one or multiple bays. (HTTP 400)

Eli Qiao (taget-9)
Changed in magnum:
assignee: nobody → Eli Qiao (taget-9)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

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

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

Reviewed: https://review.openstack.org/221600
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=f83917b4309e0d91c781ce040c4663631de786f1
Submitter: Jenkins
Branch: master

commit f83917b4309e0d91c781ce040c4663631de786f1
Author: Eli Qiao <email address hidden>
Date: Wed Sep 9 14:02:09 2015 +0800

    Cleanup Baymodel correctly when Teardown TestKubernetesAPIs

    If bay created failed, in TeardownClass of TestKubernetesAPIs,
    it will delete frist then delete baymodel, but we pass
    'CREATE_FAILED' as a finished status to _wait_on_status,
    so we did baymodel deletation before bay was deleted.

    Besides, modify the logic in _wait_on_status, sleep 1s before
    checking the status for saving test case time.

    Closes-bug: #1493668
    Change-Id: Iaf161cd72174234e6a774bc9dec42fb90201f56d

Changed in magnum:
status: In Progress → Fix Committed
Adrian Otto (aotto)
Changed in magnum:
milestone: none → mitaka-1
status: Fix Committed → Fix Released
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.