yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #58814
[Bug 1642492] [NEW] Swapping volume does not change non-bootable volume's 'Bootable' flag to True
Public bug reported:
If an instance is booted using a bootable volume and then the volume is swapped with a non-bootable volume, it is possible to reboot the instance along with all the data from the previous volume intact.
But, if the instance is deleted so that the non-bootable volume becomes available; then it is not possible to boot a new instance using the non-bootable volume unless its Bootable flag is set to True explicitly by the user.
The expected behaviour should be such that the Bootable flag of non-
bootable volume must be set to True after successful volume swapping.
Steps to reproduce:
1. Create a bootable volume.
cinder create 1 --name lvm_bootable --image-id ab18becb-1262-45da-a1c0-053759a182da
2. Create a non-bootable volume.
cinder create 1 --name lvm_non_bootable
3. Note the Bootable flag of both the volumes by using cinder list command.
cinder list
+--------------------------------------+-----------+------------------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+------------------+------+-------------+----------+-------------+
| 15acd26a-37a2-48c0-8936-6537e8f8c99a | available | lvm_non_bootable | 1 | lvmdriver-1 | false | |
| 636978d3-ef65-4c01-9fa6-fb338b1ed2d0 | available | lvm_bootable | 1 | lvmdriver-1 | true | |
+--------------------------------------+-----------+------------------+------+-------------+----------+-------------+
4. Boot an instance using the bootable volume.
nova boot test1 --flavor 1 --boot-volume 636978d3-ef65-4c01-9fa6-fb338b1ed2d0
5. Swap the bootable volume with the non-bootable volume.
nova volume-update test1 636978d3-ef65-4c01-9fa6-fb338b1ed2d0 15acd26a-37a2-48c0-8936-6537e8f8c99a
6. Reboot the instance.
nova reboot test1
7. Note that the Bootable flag of the non-bootable volume is still set to False.
cinder list
+--------------------------------------+-----------+------------------+------+-------------+----------+--------------------------------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+------------------+------+-------------+----------+--------------------------------------+
| 15acd26a-37a2-48c0-8936-6537e8f8c99a | in-use | lvm_non_bootable | 1 | lvmdriver-1 | false | d46f50f9-7be3-4e8d-8673-a5fece60184c |
| 636978d3-ef65-4c01-9fa6-fb338b1ed2d0 | available | lvm_bootable | 1 | lvmdriver-1 | true | |
+--------------------------------------+-----------+------------------+------+-------------+----------+--------------------------------------+
8. Delete the instance created in step 4 so that the non-bootable volume
becomes available.
9. Try to boot another instance using the non-bootable volume.
nova boot test2 --flavor 1 --boot-volume 15acd26a-37a2-48c0-8936-6537e8f8c99a
ERROR (BadRequest): Block Device 15acd26a-37a2-48c0-8936-6537e8f8c99a is
not bootable. (HTTP 400) (Request-ID: req-f26cdfba-
8d41-4034-a094-27ba944b37e0)
10. Change to Bootable flag of 'lvm_non_bootable' explicitly.
cinder set-bootable 15acd26a-37a2-48c0-8936-6537e8f8c99a True
11. Verify the Bootable flag using cinder list command.
cinder list
+--------------------------------------+-----------+------------------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+------------------+------+-------------+----------+-------------+
| 15acd26a-37a2-48c0-8936-6537e8f8c99a | available | lvm_non_bootable | 1 | lvmdriver-1 | true | |
| 636978d3-ef65-4c01-9fa6-fb338b1ed2d0 | available | lvm_bootable | 1 | lvmdriver-1 | true | |
+--------------------------------------+-----------+------------------+------+-------------+----------+-------------+
12. Boot an instance using 'lvm_non_bootable' now.
nova boot test_nb --flavor 1 --boot-volume 15acd26a-37a2-48c0-8936-6537e8f8c99a
13. Verify that the new instance is created successfully and is up and running.
nova list
+--------------------------------------+---------+--------+------------+-------------+-------------------------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+---------+--------+------------+-------------+-------------------------------------------------------+
| 3d841c14-69cc-404d-9c34-211d17c5efa4 | test_nb | ACTIVE | - | Running | private=2001:db8:8000:0:f816:3eff:fe84:253c, 10.0.0.6 |
+--------------------------------------+---------+--------+------------+-------------+-------------------------------------------------------+
** Affects: nova
Importance: Undecided
Assignee: Hussain Chachuliya (hussainchachuliya)
Status: New
** Changed in: nova
Assignee: (unassigned) => Hussain Chachuliya (hussainchachuliya)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1642492
Title:
Swapping volume does not change non-bootable volume's 'Bootable' flag
to True
Status in OpenStack Compute (nova):
New
Bug description:
If an instance is booted using a bootable volume and then the volume is swapped with a non-bootable volume, it is possible to reboot the instance along with all the data from the previous volume intact.
But, if the instance is deleted so that the non-bootable volume becomes available; then it is not possible to boot a new instance using the non-bootable volume unless its Bootable flag is set to True explicitly by the user.
The expected behaviour should be such that the Bootable flag of non-
bootable volume must be set to True after successful volume swapping.
Steps to reproduce:
1. Create a bootable volume.
cinder create 1 --name lvm_bootable --image-id ab18becb-1262-45da-a1c0-053759a182da
2. Create a non-bootable volume.
cinder create 1 --name lvm_non_bootable
3. Note the Bootable flag of both the volumes by using cinder list command.
cinder list
+--------------------------------------+-----------+------------------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+------------------+------+-------------+----------+-------------+
| 15acd26a-37a2-48c0-8936-6537e8f8c99a | available | lvm_non_bootable | 1 | lvmdriver-1 | false | |
| 636978d3-ef65-4c01-9fa6-fb338b1ed2d0 | available | lvm_bootable | 1 | lvmdriver-1 | true | |
+--------------------------------------+-----------+------------------+------+-------------+----------+-------------+
4. Boot an instance using the bootable volume.
nova boot test1 --flavor 1 --boot-volume 636978d3-ef65-4c01-9fa6-fb338b1ed2d0
5. Swap the bootable volume with the non-bootable volume.
nova volume-update test1 636978d3-ef65-4c01-9fa6-fb338b1ed2d0 15acd26a-37a2-48c0-8936-6537e8f8c99a
6. Reboot the instance.
nova reboot test1
7. Note that the Bootable flag of the non-bootable volume is still set to False.
cinder list
+--------------------------------------+-----------+------------------+------+-------------+----------+--------------------------------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+------------------+------+-------------+----------+--------------------------------------+
| 15acd26a-37a2-48c0-8936-6537e8f8c99a | in-use | lvm_non_bootable | 1 | lvmdriver-1 | false | d46f50f9-7be3-4e8d-8673-a5fece60184c |
| 636978d3-ef65-4c01-9fa6-fb338b1ed2d0 | available | lvm_bootable | 1 | lvmdriver-1 | true | |
+--------------------------------------+-----------+------------------+------+-------------+----------+--------------------------------------+
8. Delete the instance created in step 4 so that the non-bootable
volume becomes available.
9. Try to boot another instance using the non-bootable volume.
nova boot test2 --flavor 1 --boot-volume 15acd26a-37a2-48c0-8936-6537e8f8c99a
ERROR (BadRequest): Block Device 15acd26a-37a2-48c0-8936-6537e8f8c99a
is not bootable. (HTTP 400) (Request-ID: req-f26cdfba-
8d41-4034-a094-27ba944b37e0)
10. Change to Bootable flag of 'lvm_non_bootable' explicitly.
cinder set-bootable 15acd26a-37a2-48c0-8936-6537e8f8c99a True
11. Verify the Bootable flag using cinder list command.
cinder list
+--------------------------------------+-----------+------------------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+------------------+------+-------------+----------+-------------+
| 15acd26a-37a2-48c0-8936-6537e8f8c99a | available | lvm_non_bootable | 1 | lvmdriver-1 | true | |
| 636978d3-ef65-4c01-9fa6-fb338b1ed2d0 | available | lvm_bootable | 1 | lvmdriver-1 | true | |
+--------------------------------------+-----------+------------------+------+-------------+----------+-------------+
12. Boot an instance using 'lvm_non_bootable' now.
nova boot test_nb --flavor 1 --boot-volume 15acd26a-37a2-48c0-8936-6537e8f8c99a
13. Verify that the new instance is created successfully and is up and running.
nova list
+--------------------------------------+---------+--------+------------+-------------+-------------------------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+---------+--------+------------+-------------+-------------------------------------------------------+
| 3d841c14-69cc-404d-9c34-211d17c5efa4 | test_nb | ACTIVE | - | Running | private=2001:db8:8000:0:f816:3eff:fe84:253c, 10.0.0.6 |
+--------------------------------------+---------+--------+------------+-------------+-------------------------------------------------------+
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1642492/+subscriptions
Follow ups