ValueError when trying to deallocate a non allocated machine in OneView due fail

Bug #1657892 reported by Xavier
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
High
Fellype Cavalcante

Bug Description

The error happens when trying to deallocate a machine in OneView that wasn't previously allocated due any fail while applying the Server Profile to the machine in OneView.

255h38m41s62│|2016-12-13 11:58:30.073 7570 ERROR ironic.conductor.manager NodeCleaningFailure: Failed to clean node c2c0de80-f36b-49db-bf07-113e4967569f: OneView exception occurred. Error: <OneViewServerProfileAssignmentError> The task '/rest/tasks/2D9D7B92-1C27-4C79-A634-4B0B8DBED797' returned an error state
255h38m41s62│|2016-12-13 11:58:30.073 7570 ERROR ironic.conductor.manager
255h38m46s04│|2016-12-13 11:58:34.493 7570 ERROR ironic.conductor.utils [req-2b79315e-900e-413a-96aa-74560a077d6e 4e62977a125d497aab17b829ffa73b33 3b3013741872410eb5f72a23f5d7fc9c - default -] (u'Failed to tear down cleaning on node %(uuid)s, reason: %(err)s', {'uuid': 'c2c0de80-f36b-49db-bf07-113e4967569f', 'err': ValueError('Missing Server Profile uuid.',)}
255h38m46s04│|2016-12-13 11:58:34.493 7570 ERROR ironic.conductor.utils Traceback (most recent call last):
255h38m46s04│|2016-12-13 11:58:34.493 7570 ERROR ironic.conductor.utils File "/openstack/venvs/ironic-master/lib/python2.7/site-packages/ironic/conductor/utils.py", line 268, in cleaning_error_handler
255h38m46s04│|2016-12-13 11:58:34.493 7570 ERROR ironic.conductor.utils task.driver.deploy.tear_down_cleaning(task)
255h38m46s04│|2016-12-13 11:58:34.493 7570 ERROR ironic.conductor.utils File "/openstack/venvs/ironic-master/lib/python2.7/site-packages/ironic_lib/metrics.py", line 61, in wrapped
255h38m46s04│|2016-12-13 11:58:34.493 7570 ERROR ironic.conductor.utils result = f(*args, **kwargs)
255h38m46s04│|2016-12-13 11:58:34.493 7570 ERROR ironic.conductor.utils File "/openstack/venvs/ironic-master/lib/python2.7/site-packages/ironic/drivers/modules/oneview/deploy.py", line 303, in tear_down_cleaning
255h38m46s04│|2016-12-13 11:58:34.493 7570 ERROR ironic.conductor.utils deploy_utils.tear_down_cleaning(task)
255h38m46s04│|2016-12-13 11:58:34.493 7570 ERROR ironic.conductor.utils File "/openstack/venvs/ironic-master/lib/python2.7/site-packages/ironic/drivers/modules/oneview/deploy_utils.py", line 124, in tear_down_cleaning
255h38m46s04│|2016-12-13 11:58:34.493 7570 ERROR ironic.conductor.utils deallocate_server_hardware_from_ironic(task.node)
255h38m46s04│|2016-12-13 11:58:34.493 7570 ERROR ironic.conductor.utils File "/openstack/venvs/ironic-master/lib/python2.7/site-packages/ironic/drivers/modules/oneview/deploy_utils.py", line 355, in deallocate_server_hardware_from_ironic
255h38m46s04│|2016-12-13 11:58:34.493 7570 ERROR ironic.conductor.utils oneview_client.delete_server_profile(applied_sp_uuid)
255h38m46s04│|2016-12-13 11:58:34.493 7570 ERROR ironic.conductor.utils File "/openstack/venvs/ironic-master/lib/python2.7/site-packages/oneview_client/auditing.py", line 40, in wrapper
255h38m46s04│|2016-12-13 11:58:34.493 7570 ERROR ironic.conductor.utils ret = f(self, *args, **kwargs)
255h38m46s04│|2016-12-13 11:58:34.493 7570 ERROR ironic.conductor.utils File "/openstack/venvs/ironic-master/lib/python2.7/site-packages/oneview_client/client.py", line 594, in delete_server_profile
255h38m46s04│|2016-12-13 11:58:34.493 7570 ERROR ironic.conductor.utils raise ValueError('Missing Server Profile uuid.')
255h38m46s04│|2016-12-13 11:58:34.493 7570 ERROR ironic.conductor.utils ValueError: Missing Server Profile uuid.

Xavier (marcusrafael)
tags: added: oneview
Changed in ironic:
assignee: nobody → Xavier (marcusrafael)
status: New → In Progress
Revision history for this message
Dmitry Tantsur (divius) wrote :

Please provide a traceback from the logs.

Changed in ironic:
status: In Progress → Incomplete
Changed in ironic:
status: Incomplete → In Progress
Xavier (marcusrafael)
description: updated
Dmitry Tantsur (divius)
Changed in ironic:
importance: Undecided → High
Changed in ironic:
assignee: Xavier (marcusrafael) → Fellype Cavalcante (fellypefca)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/386014
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=0b23a041f1111ad112d28619fa020173805edbbe
Submitter: Jenkins
Branch: master

commit 0b23a041f1111ad112d28619fa020173805edbbe
Author: Xavier <email address hidden>
Date: Thu Oct 13 11:29:10 2016 -0300

    Validation before perform node deallocation

    Introduces a new validation to ensure the node deallocation
    process will only be performed to nodes that have Server
    Profile applied in OneView. When the allocation process
    fails, the machine will have no Server Profile applied in
    OneView and in ironic it will have no reference to any
    Server Profile. Under these conditions if the deallocation
    process be performed the driver will try to delete a
    nonexistent Server Profile in OneView, leaving the node
    in error state in ironic.

    Change-Id: I83cef7fafac4e22ebf5eb4fe83f6da26ec132c99
    Closes-Bug: #1657892

Changed in ironic:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ironic 8.0.0

This issue was fixed in the openstack/ironic 8.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/459325

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/459415

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

Reviewed: https://review.openstack.org/459325
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=e102ce02d03fef63c29cc98783911d7e4e9ceef0
Submitter: Jenkins
Branch: stable/ocata

commit e102ce02d03fef63c29cc98783911d7e4e9ceef0
Author: Xavier <email address hidden>
Date: Thu Oct 13 11:29:10 2016 -0300

    Validation before perform node deallocation

    Introduces a new validation to ensure the node deallocation
    process will only be performed to nodes that have Server
    Profile applied in OneView. When the allocation process
    fails, the machine will have no Server Profile applied in
    OneView and in ironic it will have no reference to any
    Server Profile. Under these conditions if the deallocation
    process be performed the driver will try to delete a
    nonexistent Server Profile in OneView, leaving the node
    in error state in ironic.

    Change-Id: I83cef7fafac4e22ebf5eb4fe83f6da26ec132c99
    Closes-Bug: #1657892
    (cherry picked from commit 0b23a041f1111ad112d28619fa020173805edbbe)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ironic 7.0.2

This issue was fixed in the openstack/ironic 7.0.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on ironic (stable/newton)

Change abandoned by Fellype Cavalcante (<email address hidden>) on branch: stable/newton
Review: https://review.openstack.org/459415

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.