IPA deploy functions do not return results properly

Bug #1408080 reported by Jay Faulkner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Low
Kyle Stevenson

Bug Description

https://github.com/openstack/ironic-python-agent/blob/master/ironic_python_agent/extensions/standby.py#L195

Several functions in the IPA standby extension (and possibly others) do not return any results (some of them don't even log!). They should, instead, return and log any relevant information about the action performed, so they are part of the command_result when Ironic checks in on the agent.

Without this; Ironic can only see boolean success of an action, without any insight into how it happened (for instance; when writing an image, it would likely be useful to return what block device the image was written to).

Dmitry Tantsur (divius)
Changed in ironic:
status: New → Confirmed
Changed in ironic:
assignee: nobody → Kyle Stevenson (kylestev)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic-python-agent (master)

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

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

Reviewed: https://review.openstack.org/152755
Committed: https://git.openstack.org/cgit/openstack/ironic-python-agent/commit/?id=f1dec5c2e2972cf571af9845b201bbb22bbc8cea
Submitter: Jenkins
Branch: master

commit f1dec5c2e2972cf571af9845b201bbb22bbc8cea
Author: Kyle Stevenson <email address hidden>
Date: Tue Jan 27 13:56:05 2015 -0800

    Add additional logging and return results for IPA extensions

    Some of the extensions in IPA currently do not return any values
    from their respective command methods. This results in a lack of a
    paper trail of the command_result value to the point where it is
    not possible to know more information than a boolean result of if
    a command succeeded or failed.

    This change adds more logging to the extensions and provides return
    values which are used in the command_result property on
    (Async|Sync)CommandResult instances to provide useful debug info.

    While creating this patch several unit tests for *CommandResult objects
    were found to be using invalid data that would not pass validation
    if returned in API results. Those have been corrected in this patch.

    Change-Id: I23bae25a83881e7013c93d73f858c622ea941253
    Closes-Bug: 1408080

Changed in ironic:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ironic:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: kilo-3 → 2015.1.0
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.