Cleaning fails with long-running steps

Bug #1444715 reported by Jim Rollenhagen on 2015-04-15
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
High
Jim Rollenhagen
Kilo
Fix Released
High
Unassigned

Bug Description

When performing in-band cleaning using IPA, heartbeats will fail if a step is currently running. The agent command result returned will have a 'command_result' of None; however the code assumes 'command_result' is an empty dict.

The current clean_step is accessed via `last_command['command_result'].get('clean_step')`; however if the command is still running, this fails due to calling .get() on None.

See example failure here: http://paste.openstack.org/show/uZ9wd5p7auUGn5MNl7gD/

Reported by Julia Kreger.

Changed in ironic:
assignee: nobody → Jim Rollenhagen (jim-rollenhagen)
status: New → In Progress
tags: added: kilo-rc-potential
Dmitry Tantsur (divius) on 2015-04-16
Changed in ironic:
importance: Undecided → High
tags: added: agent

Reviewed: https://review.openstack.org/174115
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=7e49bf856b3cdab1ff5ae7b5e3f6556e584e0186
Submitter: Jenkins
Branch: master

commit 7e49bf856b3cdab1ff5ae7b5e3f6556e584e0186
Author: Jim Rollenhagen <email address hidden>
Date: Fri Apr 10 06:22:28 2015 -0700

    Fix heartbeat when clean step in progress

    The agent returns command_result of None when a command is in progress.
    The code assumed it would return an empty dict. Fix the access of
    command_result to never return None, and fix the tests to reflect
    reality.

    Closes-Bug: #1444715
    Change-Id: Iae6cd90517cb7b268ce2c089c92f64b09a606a42

Changed in ironic:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2015-04-22
tags: removed: kilo-rc-potential

Reviewed: https://review.openstack.org/174122
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=904bbcde88d9db0cd60719e771ea168cb52948e1
Submitter: Jenkins
Branch: stable/kilo

commit 904bbcde88d9db0cd60719e771ea168cb52948e1
Author: Jim Rollenhagen <email address hidden>
Date: Fri Apr 10 06:22:28 2015 -0700

    Fix heartbeat when clean step in progress

    The agent returns command_result of None when a command is in progress.
    The code assumed it would return an empty dict. Fix the access of
    command_result to never return None, and fix the tests to reflect
    reality.

    Closes-Bug: #1444715
    Change-Id: Iae6cd90517cb7b268ce2c089c92f64b09a606a42
    (cherry picked from commit 2e2fb8c4997b1cac7dc18e67e43a0d8ba65a79d5)

Reviewed: https://review.openstack.org/179294
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=9e7af5dbdc0c13049a633c2b716eff638398ad3e
Submitter: Jenkins
Branch: master

commit cbe5c9fbdfc983f806a8377cbf84b1773a5d70c1
Author: OpenStack Proposal Bot <email address hidden>
Date: Thu Apr 23 02:14:02 2015 +0000

    Updated from global requirements

    Change-Id: I9ef2dce01d94210fa9bec73d4a0181c273d3f874

commit 109a7645eb131e4b6fa135bb886b7ccc319a2a35
Author: Andreas Jaeger <email address hidden>
Date: Mon Apr 20 11:52:08 2015 +0200

    Release Import of Translations from Transifex

    Manual import of Translations from Transifex. This change also removes
    all po files that are less than 66 per cent translated since such
    partially translated files will not help users.

    This updates also recreates all pot (translation source files) to
    reflect the state of the repository.

    This change needs to be done manually since the automatic import does
    not handle the proposed branches and we need to sync with latest
    translations.

    This is part of importing of translations, there are no new
    translations for this project, thus only the pot file gets updated.

    Change-Id: I0476d5439e461c25f7f66a6dc6e9f0eb74904d61

commit e690117689606a5b2157b3e078608648e0887616
Author: Ruby Loo <email address hidden>
Date: Thu Apr 16 20:23:45 2015 +0000

    Remove scripts for migrating nova baremetal

    In juno, ironic provided support for migrating from nova's
    "baremetal" driver to its "ironic" driver. These scripts
    were used for that.

    The baremetal driver was removed from nova in kilo. Ironic
    doesn't support migrating from pre-kilo nova's baremetal
    driver to post-juno nova's ironic driver.

    Hence, deleting these migration scripts.

    Closes-Bug: #1446330
    Change-Id: Ic4990caa83a2eca3ee9fbd105bfe0a12bdaa7efe
    (cherry picked from commit 76ab94fcbdddd43278175b8e8421fad0fb72c0cc)

commit b90f4231932d6c3c993c24e5c8c636c9f0d6db14
Author: Thierry Carrez <email address hidden>
Date: Fri Apr 17 10:34:33 2015 +0200

    update .gitreview for stable/kilo

    Change-Id: I521ef3b52745637a7605e8e4c421e7d15164701e

commit 904bbcde88d9db0cd60719e771ea168cb52948e1
Author: Jim Rollenhagen <email address hidden>
Date: Fri Apr 10 06:22:28 2015 -0700

    Fix heartbeat when clean step in progress

    The agent returns command_result of None when a command is in progress.
    The code assumed it would return an empty dict. Fix the access of
    command_result to never return None, and fix the tests to reflect
    reality.

    Closes-Bug: #1444715
    Change-Id: Iae6cd90517cb7b268ce2c089c92f64b09a606a42
    (cherry picked from commit 2e2fb8c4997b1cac7dc18e67e43a0d8ba65a79d5)

Changed in ironic:
milestone: none → 4.0.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers