Cannot rebuild baremetal instance when vm_state is ERROR

Bug #1735009 reported by Mathieu Gagné
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Matt Riedemann
Ocata
New
Undecided
Unassigned
Pike
New
Undecided
Unassigned
Queens
Fix Committed
Undecided
Matt Riedemann
Rocky
Fix Committed
Undecided
Matt Riedemann
Stein
In Progress
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.

Tags: ironic rebuild
Mathieu Gagné (mgagne)
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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: New → In Progress
Revision history for this message
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)
tags: added: rebuild
Changed in nova:
assignee: Mathieu Gagné (mgagne) → Matt Riedemann (mriedem)
Matt Riedemann (mriedem)
Changed in nova:
assignee: Matt Riedemann (mriedem) → Mathieu Gagné (mgagne)
Changed in nova:
assignee: Mathieu Gagné (mgagne) → Matt Riedemann (mriedem)
Matt Riedemann (mriedem)
Changed in nova:
assignee: Matt Riedemann (mriedem) → Mathieu Gagné (mgagne)
Changed in nova:
assignee: Mathieu Gagné (mgagne) → Matt Riedemann (mriedem)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/680869

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

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/680871

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

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/680873

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 20.0.0.0rc1

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

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

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)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 19.0.3

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 18.2.3

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

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

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)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 17.0.13

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

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.