Comment 17 for bug 1440762

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

Reviewed: https://review.openstack.org/203253
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=5cf20f377118963ad1e89d9fa889dcb454f030fd
Submitter: Jenkins
Branch: stable/juno

commit 5cf20f377118963ad1e89d9fa889dcb454f030fd
Author: Roman Podoliaka <email address hidden>
Date: Mon Apr 6 17:53:51 2015 +0300

    Fix rebuild of an instance with a volume attached

    When detaching block devices on rebuild we only notify Cinder it's
    safe to detach a volume, but don't actually tell the driver to do
    that first.

    Closes-Bug: #1440762

    Change-Id: I017bf749f426717dc76cf99a387102848fb1c541
    (cherry picked from commit 337471bc71cbdabe6b492379c81470abac8040d2)

    ---------------------------------------------------------------------
    squashed with another change that fixes a bug introduced in the first
    ---------------------------------------------------------------------

    rebuild: fix rebuild of server with volume attached

    This was meant to be fixed by I017bf749f426717dc76cf99a387102848fb1c541 ,
    but it didn't take into account that BDM entry was destroyed, which
    caused the rebuild to fail when spawning the instance.

    Add a new parameter to detach_volume() to bypass destroying of BDM,
    as we just want to detach a volume first and then re-attach it again.

    A Tempest test is added in I50557c69b54003d3409c8e977966f5332f4fe690
    to make sure this is actually tested in the gate.

    Closes-Bug: #1440762

    Co-Authored-By: melanie witt <email address hidden>

    Conflicts:
            nova/tests/unit/compute/test_compute.py
            nova/tests/unit/compute/test_compute_mgr.py

    NOTE(mriedem): The tests were moved under nova/tests/unit in Kilo.

    Change-Id: I9134fbf5ce72c32cca91de90001c09e00b4e19e8
    (cherry picked from commit 25f15b0bc3bd1971fd29062a7a001f8007485636)
    (cherry picked from commit eb3b1c80c1a8c2bcaf3df21663eba54bae0cacb7)