Ostf ironic tests failed on clean up node when actually node was deleted before

Bug #1522740 reported by Tatyanka
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Vasyl Saienko

Bug Description

Steps:
1. Deploy cluster in HA mode with Ironic:
2. Add 1 controller node
3. Add 1 compute node
4. Add 1 ironic node
5. Run OSTF

Actual result :
sanity ostf test for ironic fail without message :
Failed 1 OSTF tests; should fail 0 tests. Names of failed tests:
  - Check that Ironic can operate nodes (error)

This happens because we delete this node before cleanup starts, so when cleanup try to delete this node - it failed with 404 error (and it is unexpected for us), we can delete add.Cleanup() fun in node creation and this may help

2015-12-04 00:49:45 ERROR Check that Ironic can operate nodes (fuel_health.tests.sanity.test_sanity_ironic.IronicSmokeTests.test_002_ironic_node_actions) File "/usr/lib/python2.6/site-packages/unittest2/case.py", line 391, in doCleanups
    function(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/fuel_health/ironicmanager.py", line 52, in node_delete
    self.ironic_client.node.delete(node.uuid)
  File "/usr/lib/python2.6/site-packages/ironicclient/v1/node.py", line 163, in delete
    return self._delete(self._path(node_id))
  File "/usr/lib/python2.6/site-packages/ironicclient/common/base.py", line 136, in _delete
    self.api.raw_request('DELETE', url)
  File "/usr/lib/python2.6/site-packages/ironicclient/common/http.py", line 215, in raw_request
    return self._http_request(url, method, **kwargs)
  File "/usr/lib/python2.6/site-packages/ironicclient/common/http.py", line 176, in _http_request
    error_json.get('debuginfo'), method, url)
Node 463206ac-76ee-4b0e-ba14-01023748a30e could not be found. (HTTP 404)

here deletion happens (Step 4 delete node):
fuel_health.common.test_mixins: INFO: STEP:4, verify action: 'Deleting node'
ironicclient.common.http: DEBUG: curl -i -X DELETE -H 'X-Auth-Token: gAAAAABWYOMo6ph1vx0YxX8djjpgShbNT4_l2DAWRK09BeO5ejM4vFqoNo3W07vQlnC9ASWi0IR2Kal4UvDjyxBDVdI4stxv6uFKtCHMCz5NrOYi4LGsF9G5rHuQNEs1_L7TxWHwvDRgEbpptcZCbDBeSrTWxoXXxTRrT_u1LJF5-8RK8Y80avo' -H 'Content-Type: application/octet-stream' -H 'User-Agent: python-ironicclient' http://10.109.10.2:6385/v1/nodes/463206ac-76ee-4b0e-ba14-01023748a30e
urllib3.connectionpool: DEBUG: Setting read timeout to None
urllib3.connectionpool: DEBUG: "DELETE http://10.109.10.2:6385/v1/nodes/463206ac-76ee-4b0e-ba14-01023748a30e HTTP/1.1" 204 0
ironicclient.common.http: DEBUG:
HTTP/1.1 204 No Content
x-openstack-ironic-api-version: 1.1
content-length: 0
via: 1.1 apache_api_proxy:6385
server: WSGIServer/0.1 Python/2.7.6
connection: close
x-openstack-ironic-api-maximum-version: 1.14
date: Fri, 04 Dec 2015 00:49:45 GMT
x-openstack-ironic-api-minimum-version: 1.1

ironicclient.common.http: DEBUG: curl -i -X DELETE -H 'X-Auth-Token: gAAAAABWYOMo6ph1vx0YxX8djjpgShbNT4_l2DAWRK09BeO5ejM4vFqoNo3W07vQlnC9ASWi0IR2Kal4UvDjyxBDVdI4stxv6uFKtCHMCz5NrOYi4LGsF9G5rHuQNEs1_L7TxWHwvDRgEbpptcZCbDBeSrTWxoXXxTRrT_u1LJF5-8RK8Y80avo' -H 'Content-Type: application/octet-stream' -H 'User-Agent: python-ironicclient' http://10.109.10.2:6385/v1/nodes/463206ac-76ee-4b0e-ba14-01023748a30e

Tags: area-qa
Revision history for this message
Tatyanka (tatyana-leontovich) wrote :
Changed in fuel:
assignee: Fuel QA Team (fuel-qa) → Kyrylo Romanenko (kromanenko)
Changed in fuel:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-ostf (master)

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

Changed in fuel:
assignee: Kyrylo Romanenko (kromanenko) → Vasyl Saienko (vsaienko)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-ostf (master)

Reviewed: https://review.openstack.org/253481
Committed: https://git.openstack.org/cgit/openstack/fuel-ostf/commit/?id=48883c8f1b2c53989fad74137f0bde392098b0f2
Submitter: Jenkins
Branch: master

commit 48883c8f1b2c53989fad74137f0bde392098b0f2
Author: vsaienko <email address hidden>
Date: Fri Dec 4 15:19:58 2015 +0200

    Catch correct ironic exception

    Catch exception from ironicclient instead of
    fuel_health exceptions

    Change-Id: I718638039b9ac2e0b93e93872085d3e083b3a6db
    Closes-Bug: #1522740

Changed in fuel:
status: In Progress → Fix Released
Changed in fuel:
status: Fix Released → Fix Committed
Changed in fuel:
status: Fix Committed → Fix Released
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.