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.
Reviewed: https:/ /review. openstack. org/203253 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=5cf20f37711 8963ad1e89d9fa8 89dcb454f030fd
Committed: https:/
Submitter: Jenkins
Branch: stable/juno
commit 5cf20f377118963 ad1e89d9fa889dc b454f030fd
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: I017bf749f42671 7dc76cf99a38710 2848fb1c541 e6b492379c81470 abac8040d2)
(cherry picked from commit 337471bc71cbdab
--- ------- ------- ------- ------- ------- ------- ------- ------- ------- --- ------- ------- ------- ------- ------- ------- ------- ------- ------- ---
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 I017bf749f42671 7dc76cf99a38710 2848fb1c541 ,
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 I50557c69b54003 d3409c8e977966f 5332f4fe690
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: I9134fbf5ce72c3 2cca91de90001c0 9e00b4e19e8 1fd29062a7a001f 8007485636) caf3df21663eba5 4bae0cacb7)
(cherry picked from commit 25f15b0bc3bd197
(cherry picked from commit eb3b1c80c1a8c2b