Created attachment 594015 [details] log Description of problem: since no snapshot can be created for a direct lun, when a vm has only a direct lun we should fail to start it with stateless tag and when it has other regular disks as well as direct lun we should issue warning that the lun will not be stateless. Version-Release number of selected component (if applicable): si6 How reproducible: 100% Steps to Reproduce: 1. create a vm with direct lum 2. try to run it as stateless 3. Actual results: we are able to run the vm with no warnings. Expected results: since no stateless snapshot is created we should fail the run of the vm as stateless with appropriate warning. Additional info: full log 2012-06-24 18:23:56,544 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.CreateVDSCommand] (pool-3-thread-44) [63c16329] FINISH, CreateVDSCommand, log id: dba46da 2012-06-24 18:23:56,549 INFO [org.ovirt.engine.core.vdsbroker.CreateVmVDSCommand] (pool-3-thread-44) [63c16329] IncreasePendingVms::CreateVmIncreasing vds orange-vdsd pending vcpu count, now 1. Vm: XP_OS 2012-06-24 18:23:56,681 INFO [org.ovirt.engine.core.vdsbroker.CreateVmVDSCommand] (pool-3-thread-44) [63c16329] FINISH, CreateVmVDSCommand, return: WaitForLaunch, log id: 5a53c4b5 2012-06-24 18:24:00,345 INFO [org.ovirt.engine.core.vdsbroker.VdsUpdateRunTimeInfo] (QuartzScheduler_Worker-26) VM XP_OS ede8cac5-27e1-4d44-9e2d-2abbbac0ee5e moved from WaitForLaunch --> PoweringUp 2012-06-24 18:24:00,346 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVdsCommand] (QuartzScheduler_Worker-26) START, FullListVdsCommand(vdsId = 43879c8a-b3bd-11e1-b071-001a4a169741, vds=null, vmIds=[ede8cac5-27e1-4d44-9e2d-2abbbac0ee5e]), log id: 1a0c69a7 2012-06-24 18:24:00,359 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVdsCommand] (QuartzScheduler_Worker-26) FINISH, FullListVdsCommand, return: [Lorg.ovirt.engine.core.vdsbroker.xmlrpc.XmlRpcStruct;@24ec604d, log id: 1a0c69a7 (END)
I wonder if we w
not sure if we should fail the run, or just print a warning to audit log (assuming there is another disk to be stateless). use case: I want to make sure my users are using stateless and not keeping anything on Disk1. I want to attach a disk with the user profile, from an externally managed storage via a direct LUN.
PM, decide what to do with this BZ.
(In reply to comment #1) > I wonder if we w Looks like I lost some text there. The use case is valid if there is more than one disk. Eg stateless system disk with a direct lun. I'd suggest warning only.
(In reply to comment #4) > (In reply to comment #1) > > I wonder if we w > > Looks like I lost some text there. > > The use case is valid if there is more than one disk. > Eg stateless system disk with a direct lun. > > I'd suggest warning only. Need to grey out the button if no "snappable" disks available, otherwise allow pressing it but in case there are disks which are not "snappable" issue a warning to the user.
(In reply to comment #4) > (In reply to comment #1) > > I wonder if we w > > Looks like I lost some text there. > > The use case is valid if there is more than one disk. > Eg stateless system disk with a direct lun. > > I'd suggest warning only. - if it's a valid use case why warn ? - should we fail with error if it's only one direct-lun disk?
(In reply to comment #6) > (In reply to comment #4) > > (In reply to comment #1) > > > I wonder if we w > > > > Looks like I lost some text there. > > > > The use case is valid if there is more than one disk. > > Eg stateless system disk with a direct lun. > > > > I'd suggest warning only. > > - if it's a valid use case why warn ? I would think that a warning is good solution here too since user might make possibly destructive changes not realizing that there is no rollback on the direct lun. > > - should we fail with error if it's only one direct-lun disk? as a user I think that a warning would be enough here too. although changes may not be kept for the direct lun I might want to use a single vm for tests and not create a new one or remove the stateless tag while I test. so I think that a warning would be good here too - if user still wants to run the vm than let him. and goes without saying but I'm of course not answering for Andrew :)
WIP on that bug.
http://gerrit.ovirt.org/#/c/6334/
An audit log message will be displayed whenever the user is trying to run a VM as stateless which contains non snappable disks - "${VmName} was run as stateless with one or more of disks that do not allow snapshots (User:${UserName})."
not verified since the warning only appears when the vm is run with one regular disk and one direct lun. if the vm is only run with direct lun no warning appears. with direct lun + regular disk: VM direct2 was run as stateless with one or more of disks that do not allow snapshots (User:admin@internal). with direct lun only: VM direct2 was started by admin@internal (Host: orange-vdsd).
moving back to assigned per C11. bug failed QE and cannot move to on_qa without any commit ID.
Tal, need to make sure that same behaviour applies for live snapshot with non-snappable disks etc.
merged change id: I6c7421f45dfa75847482a7abd23ddb5feb7d6f9e
Verified on RHEVM 3.1 - SI17 RHEVM: rhevm-3.1.0-15.el6ev.noarch VDSM: vdsm-4.9.6-32.0.el6_3.x86_64 LIBVIRT: libvirt-0.9.10-21.el6_3.4.x86_64 QEMU & KVM: qemu-kvm-rhev-0.12.1.2-2.295.el6_3.2.x86_64 SANLOCK: sanlock-2.3-3.el6_3.x86_64 Warning appears, when the VM is run with one regular disk and one Direct LUN: VM vm-desk-02 was run as stateless with one or more of disks that do not allow snapshots (User:admin@internal). Warning appears, when the VM is run with Direct LUN only: VM vm-desk-04 was run as stateless with one or more of disks that do not allow snapshots (User:admin@internal).