← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1642492] Re: Swapping volume does not change non-bootable volume's 'Bootable' flag to True

 

This is a super old bug that is arguably not really a bug - I don't see
how it's really an issue. You can't boot from a non-bootable volume,
which is what the user is trying to do here. If you're swapping the root
volume to a non-bootable volume with no image then I'd expect reboot of
the server to fail (because where is the operating system for the
server?). There could be other weird edge cases like swapping to a non-
bootable volume and then rebuilding the server, but we kind of need more
details here.

** Changed in: nova
       Status: In Progress => Invalid

-- 
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):
  Invalid

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.

  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)

  Possible solutions:

  1. Non-bootable volumes should not be allowed to swap with any other
  bootable volume.

  2. Bootable flag of the non-bootable volume should be set to True in
  the code after volume swap so that it can be used to boot an instance
  when available.

  3. Explicitly setting Bootable flag of the available non-bootable
  volume after volume swapping, if required to boot an instance.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1642492/+subscriptions


References