Cannot rebuild baremetal instance when vm_state is ERROR

Bug #1735009 reported by Mathieu Gagné on 2017-11-28
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Medium
Matt Riedemann
Ocata
Undecided
Unassigned
Pike
Undecided
Unassigned
Queens
Undecided
Matt Riedemann
Rocky
Undecided
Matt Riedemann
Stein
Undecided
Matt Riedemann

Bug Description

You can rebuild an instance in ERROR since Havana:
http://git.openstack.org/cgit/openstack/nova/commit/?id=99c51e34230394cadf0b82e364ea10c38e193979

This change broke this feature for Ironic since Liberty:
http://git.openstack.org/cgit/openstack/nova/commit/?id=ea3967a1fb47297608defd680286fd9051ff5bbe

The change adds a check for vm_state=ERROR when waiting for baremetal instance to be ACTIVE.

The vm_state is restored to ACTIVE only restored after a successful build. This means rebuilding a baremetal instance using the Ironic driver is impossible because wait_for_active fails if vm_state=ERROR is found.

Mathieu Gagné (mgagne) on 2017-11-28
Changed in nova:
assignee: nobody → Mathieu Gagné (mgagne)
summary: - Cannot rebuild baremetal instance in ERROR vm_state
+ Cannot rebuild baremetal instance when vm_state is ERROR

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

Changed in nova:
status: New → In Progress
melanie witt (melwitt) wrote :

Ordinarily this would be High because it was a regression, but it's been regressed so long I'm setting it to Medium.

tags: added: ironic
Changed in nova:
importance: Undecided → Medium
Matt Riedemann (mriedem) on 2019-08-08
tags: added: rebuild
Changed in nova:
assignee: Mathieu Gagné (mgagne) → Matt Riedemann (mriedem)
Matt Riedemann (mriedem) on 2019-08-08
Changed in nova:
assignee: Matt Riedemann (mriedem) → Mathieu Gagné (mgagne)
Changed in nova:
assignee: Mathieu Gagné (mgagne) → Matt Riedemann (mriedem)
Matt Riedemann (mriedem) on 2019-08-08
Changed in nova:
assignee: Matt Riedemann (mriedem) → Mathieu Gagné (mgagne)
Changed in nova:
assignee: Mathieu Gagné (mgagne) → Matt Riedemann (mriedem)

Reviewed: https://review.opendev.org/523559
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=1819718e798fb904644391badc3beb40c181ac39
Submitter: Zuul
Branch: master

commit 1819718e798fb904644391badc3beb40c181ac39
Author: Mathieu Gagné <email address hidden>
Date: Mon Nov 27 17:33:50 2017 -0500

    Fix rebuild of baremetal instance when vm_state is ERROR

    Nova allows rebuild of instance when vm_state is ERROR. [1]

    The vm_state is restored to ACTIVE only after a successful build.
    This means rebuilding a baremetal instance using the Ironic driver
    is impossible because wait_for_active fails if vm_state=ERROR is found.

    This is a regression introduced in a previous change which added
    the ability to delete an instance in spawning state. [2]

    This present change will skip the abort installation logic
    if task_state is REBUILD_SPAWNING while preserving the previous logic.

    [1] https://bugs.launchpad.net/nova/+bug/1183946
    [2] https://bugs.launchpad.net/nova/+bug/1455000

    Change-Id: I857ad7264f1a7ef1263d8a9d4eca491d6c8dce0f
    Closes-bug: #1735009

Changed in nova:
status: In Progress → Fix Released

This issue was fixed in the openstack/nova 20.0.0.0rc1 release candidate.

Reviewed: https://review.opendev.org/680871
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=e8f418909eb0f6c319e28d6a1eac0471a0a9cee8
Submitter: Zuul
Branch: stable/rocky

commit e8f418909eb0f6c319e28d6a1eac0471a0a9cee8
Author: Mathieu Gagné <email address hidden>
Date: Mon Nov 27 17:33:50 2017 -0500

    Fix rebuild of baremetal instance when vm_state is ERROR

    Nova allows rebuild of instance when vm_state is ERROR. [1]

    The vm_state is restored to ACTIVE only after a successful build.
    This means rebuilding a baremetal instance using the Ironic driver
    is impossible because wait_for_active fails if vm_state=ERROR is found.

    This is a regression introduced in a previous change which added
    the ability to delete an instance in spawning state. [2]

    This present change will skip the abort installation logic
    if task_state is REBUILD_SPAWNING while preserving the previous logic.

    [1] https://bugs.launchpad.net/nova/+bug/1183946
    [2] https://bugs.launchpad.net/nova/+bug/1455000

    Change-Id: I857ad7264f1a7ef1263d8a9d4eca491d6c8dce0f
    Closes-bug: #1735009
    (cherry picked from commit 1819718e798fb904644391badc3beb40c181ac39)
    (cherry picked from commit c21cbf296495b0604cc995d5d17ed164ae8562c5)

This issue was fixed in the openstack/nova 19.0.3 release.

This issue was fixed in the openstack/nova 18.2.3 release.

Reviewed: https://review.opendev.org/680873
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=81056d1293ef47ae47cd5f89a7b7937dedf43c3c
Submitter: Zuul
Branch: stable/queens

commit 81056d1293ef47ae47cd5f89a7b7937dedf43c3c
Author: Mathieu Gagné <email address hidden>
Date: Mon Nov 27 17:33:50 2017 -0500

    Fix rebuild of baremetal instance when vm_state is ERROR

    Nova allows rebuild of instance when vm_state is ERROR. [1]

    The vm_state is restored to ACTIVE only after a successful build.
    This means rebuilding a baremetal instance using the Ironic driver
    is impossible because wait_for_active fails if vm_state=ERROR is found.

    This is a regression introduced in a previous change which added
    the ability to delete an instance in spawning state. [2]

    This present change will skip the abort installation logic
    if task_state is REBUILD_SPAWNING while preserving the previous logic.

    [1] https://bugs.launchpad.net/nova/+bug/1183946
    [2] https://bugs.launchpad.net/nova/+bug/1455000

    Change-Id: I857ad7264f1a7ef1263d8a9d4eca491d6c8dce0f
    Closes-bug: #1735009
    (cherry picked from commit 1819718e798fb904644391badc3beb40c181ac39)
    (cherry picked from commit c21cbf296495b0604cc995d5d17ed164ae8562c5)
    (cherry picked from commit e8f418909eb0f6c319e28d6a1eac0471a0a9cee8)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers