Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 854964

Summary: [Storage] There is a scenario when VM might have several bootable disks which is wrong.
Product: Red Hat Enterprise Virtualization Manager Reporter: Leonid Natapov <lnatapov>
Component: ovirt-engineAssignee: Allon Mureinik <amureini>
Status: CLOSED ERRATA QA Contact: Leonid Natapov <lnatapov>
Severity: unspecified Docs Contact:
Priority: high    
Version: 3.1.0CC: abaron, amureini, bazulay, dornelas, dron, dyasny, hateya, iheim, jbiddle, lpeer, mkalinin, Rhev-m-bugs, scohen, sputhenp, yeylon, ykaul
Target Milestone: ---Flags: scohen: Triaged+
Target Release: 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: sf11 Doc Type: Bug Fix
Doc Text:
Previously, it was possible to accidentally attach more than one bootable disk to a virtual machine, by having a shared disk and changing its state to bootable after attaching it to a machine with an existing bootable disk. This prevented the virtual machine from running. Now, when attempting to make a disk bootable, a check is in place to ensure it is not attached to a virtual machine with an existing bootable disk. If there is no existing bootable disk, the operation succeeds. Otherwise, editing the disk will fail with the following error message: "Cannot ${action} ${type}. Disk ${DiskName} in VM ${VmName} is already marked as boot."
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-10 21:10:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 948448    

Description Leonid Natapov 2012-09-06 12:02:01 UTC
[Storage] There is a scenario when VM might have several bootable disks which is wrong.

How to reproduce:
1.Create several VMs with regular (not shared) disks and mark this disk bootable.
You must have several VMs,each of them has 1 bootable disk.
2.Create shred disk.
3.Attach this shared disk to all VMs.
4.Go to one of the VMs,delete its bootable disk and after that mark its shared disk as bootable.

Now,all other VMs that already has one bootable disk will also have shared disk that will be marked as bootable.

Comment 1 Ayal Baron 2012-09-13 12:44:03 UTC
Solving this requires moving the bootable property from disk to VM-disk relationship.

Comment 3 Allon Mureinik 2013-02-27 09:19:33 UTC
(In reply to comment #1)
> Solving this requires moving the bootable property from disk to VM-disk
> relationship.

Moving the bootable property to the device instead of the disk is generally the correct way to go, but in the meanwhile, we can have a CDA that checks updating the bootable property of a (shared) disk.

Comment 8 Allon Mureinik 2013-03-03 17:34:00 UTC
(In reply to comment #3)
> (In reply to comment #1)
> > Solving this requires moving the bootable property from disk to VM-disk
> > relationship.
> 
> Moving the bootable property to the device instead of the disk is generally
> the correct way to go, but in the meanwhile, we can have a CDA that checks
> updating the bootable property of a (shared) disk.

Ayal, we can solve this, relatively easily, for disks only.
Please devel ack/nack this direction.

Comment 9 Ayal Baron 2013-03-03 18:50:02 UTC
(In reply to comment #8)
> (In reply to comment #3)
> > (In reply to comment #1)
> > > Solving this requires moving the bootable property from disk to VM-disk
> > > relationship.
> > 
> > Moving the bootable property to the device instead of the disk is generally
> > the correct way to go, but in the meanwhile, we can have a CDA that checks
> > updating the bootable property of a (shared) disk.
> 
> Ayal, we can solve this, relatively easily, for disks only.
> Please devel ack/nack this direction.

Does this mean that setting bootable on a shareable disk would check to see if it's attached to other VMs and prevent it or does it mean that we would not support bootable shareable disks? (the former is fine, the latter is not).

Comment 10 Allon Mureinik 2013-03-04 06:48:28 UTC
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #3)
> > > (In reply to comment #1)
> > > > Solving this requires moving the bootable property from disk to VM-disk
> > > > relationship.
> > > 
> > > Moving the bootable property to the device instead of the disk is generally
> > > the correct way to go, but in the meanwhile, we can have a CDA that checks
> > > updating the bootable property of a (shared) disk.
> > 
> > Ayal, we can solve this, relatively easily, for disks only.
> > Please devel ack/nack this direction.
> 
> Does this mean that setting bootable on a shareable disk would check to see
> if it's attached to other VMs and prevent it or does it mean that we would
> not support bootable shareable disks? (the former is fine, the latter is
> not).

The former.
When we edit a disk's properties in a VM context, it's bootable flag is checked only vs. the contextual VM - this should be changed to all of the VMs.

Comment 12 Dafna Ron 2013-04-09 09:34:33 UTC
verified on sf13 - we cannot edit the boot tab if the disk is shared on multiple vm's with already existing shared disks

Comment 13 Dafna Ron 2013-04-09 09:45:28 UTC
verified on sf13 - we cannot edit the boot tab if the disk is shared on multiple vm's with already existing shared disks

Comment 15 errata-xmlrpc 2013-06-10 21:10:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0888.html