Bug 1318955

Summary: VM in pool reported as stateful
Product: [oVirt] ovirt-engine Reporter: nicolas
Component: BLL.VirtAssignee: Shmuel Melamud <smelamud>
Status: CLOSED CURRENTRELEASE QA Contact: Israel Pinto <ipinto>
Severity: medium Docs Contact:
Priority: high    
Version: 3.6.3.3CC: bugs, mgoldboi, michal.skrivanek, mperina, sigbjorn, tjelinek
Target Milestone: ovirt-4.0.1Flags: rule-engine: ovirt-4.0.z+
mgoldboi: planning_ack+
tjelinek: devel_ack+
mavital: testing_ack+
Target Release: 4.0.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, all VMs from VM Pools were reported as stateful in REST API and Webadmin UI. This issue was fixed and now VMs from stateless VM Pools are reported as stateless and VMs from stateful VM Pools are reported as stateful. Note that VMs from stateless VM Pools run statefully when started from Webadmin UI and statelessly when started from Userportal UI. VMs from stateful VM Pools always run statefully.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-12 14:11:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description nicolas 2016-03-18 09:14:42 UTC
Description of problem:

Trying to migrate storage of a VM in a pool to a different storage of the same kind reports an error as the machine is stateless, which Tomas Jelinek confirmed to be correct.

However, when queried via API the VM reports to be stateful:

In [1]: vm = api.vms.get(name='vmname')
In [2]: vm.get_stateless()
Out[2]: False

Version-Release number of selected component (if applicable):
3.6.3.4-1 (there's no version 3.6.3.4 in the 'Version' field of BZ)

How reproducible:
Always

Actual results:

get_stateless() shows the VM to be false.

Expected results:

VM pool machines should report being stateless when queried.

Comment 1 Juan Hernández 2016-03-18 15:00:38 UTC
I think that this was detected in the Python SDK, not in the Java SDK, as the code in the description corresponds to the Python SDK.

Anyhow, the API reports the "stateless" flag with the value given by the backend, without modification. So if those virtual machines should be reported correctly the fix will need to be done in the backend, no change should be needed in the API or in the SDKs. I'm changing the component accordingly.

Comment 2 Sandro Bonazzola 2016-05-02 10:01:18 UTC
Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA.

Comment 3 Tomas Jelinek 2016-05-13 09:12:57 UTC
It is related to this RFE: https://bugzilla.redhat.com/show_bug.cgi?id=1234394

@Shmuel: please make sure that after 1234394 is implemented, also the vms in the pool are reported correctly as statful/stateless

Comment 4 Yaniv Lavi 2016-05-23 13:17:08 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 5 Yaniv Lavi 2016-05-23 13:21:01 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 6 Israel Pinto 2016-08-04 14:04:15 UTC
Verify with:
Engine Version: 4.0.2.3-0.1.el7ev
Host:
OS Version:RHEL - 7.2 - 9.el7_2.1
Kernel Version:3.10.0 - 229.el7.x86_64
KVM Version:2.3.0 - 31.el7_2.21
LIBVIRT Version:libvirt-1.2.17-13.el7_2.5
VDSM Version:vdsm-4.18.5.1-1.el7ev
SPICE Version:0.12.4 - 15.el7_2.1

1. Create pool with stateless VMs
2. Run all VMs 
3. Check via REST API vms status
Results: PASS
All VMs in the pool reports as stateless = true
(<stateless>true</stateless>)