Bug 1230082

Summary: Failed to power off VM Host: <UNKNOWN>
Product: Red Hat Enterprise Virtualization Manager Reporter: Israel Pinto <ipinto>
Component: ovirt-engineAssignee: Michal Skrivanek <michal.skrivanek>
Status: CLOSED CURRENTRELEASE QA Contact: Israel Pinto <ipinto>
Severity: high Docs Contact:
Priority: high    
Version: 3.6.0CC: cmestreg, gklein, istein, lpeer, lsurette, michal.skrivanek, rbalakri, Rhev-m-bugs, sherold, srevivo, ykaul
Target Milestone: ovirt-3.6.0-rcKeywords: AutomationBlocker
Target Release: 3.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 3.6.0-4 alpha3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-20 01:35:23 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:
Attachments:
Description Flags
logs none

Description Israel Pinto 2015-06-10 08:41:16 UTC
Description of problem:
VM is stuck in power down state since it don't have host. 


Version-Release number of selected component (if applicable):
oVirt Engine Version: 3.6.0-0.0.master.20150519172219.git9a2e2b3.el6


How reproducible:
Set VM to power off from GUI

Actual results:
VM is stuck in power off 

Expected results:
VM down

Additional info:

From Engine log: FullListVDSCommandParameters return empty after destroy VM.

2015-06-10 10:38:21,434 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand] (org.ovirt.thread.pool-12-thread-36) [5fb9ab8e] START, DestroyVDSCommand(HostName = 10.35.160.45, DestroyVmVDSCommandParameters:{runAsync='true', hostId='186153a7-9837-456c-bbb0-655462517c64', vmId='b99b6152-0455-43c3-ab91-fba56fcc9b28', force='false', secondsToWait='0', gracefully='false', reason=''}), log id: 5ae5a60f
2015-06-10 10:38:21,856 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVdsCommand] (DefaultQuartzScheduler_Worker-13) [1875c06e] START, FullListVdsCommand(HostName = , FullListVDSCommandParameters:{runAsync='true', hostId='186153a7-9837-456c-bbb0-655462517c64', vds='Host[,186153a7-9837-456c-bbb0-655462517c64]', vmIds='[b99b6152-0455-43c3-ab91-fba56fcc9b28]'}), log id: 6a0948dd
2015-06-10 10:38:21,857 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand] (org.ovirt.thread.pool-12-thread-36) [5fb9ab8e] FINISH, DestroyVDSCommand, log id: 5ae5a60f
2015-06-10 10:38:21,867 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.FullListVdsCommand] (DefaultQuartzScheduler_Worker-13) [1875c06e] FINISH, FullListVdsCommand, return: [], log id: 6a0948dd

Comment 1 Israel Pinto 2015-06-10 08:42:23 UTC
Created attachment 1037171 [details]
logs

Comment 2 Israel Pinto 2015-06-10 08:43:35 UTC
it happen once, setting logs to debug for more info

Comment 3 Omer Frenkel 2015-06-11 06:02:05 UTC
currently looks like a race between vm monitoring and stop vm
suspect is VmAnalyzer.prepareGuestAgentNetworkDevicesForUpdate()
that saves the vdsmVm to the db which is wrong because the host parameter is not initialized there.

Comment 4 Omer Frenkel 2015-06-21 12:01:07 UTC
in addition to the referenced patch (ovirt gerrit 42552)
the following patch might be related as it introduce sync between monitoring and commands that change vm dynamic data:
gerrit.ovirt.org/41520

Comment 5 Max Kovgan 2015-06-28 14:12:20 UTC
ovirt-3.6.0-3 release

Comment 6 Omer Frenkel 2015-07-09 08:59:46 UTC
This happened again for QE on ovirt-3.6.0-3
moving to modified as another fix merged after this release
https://gerrit.ovirt.org/#/c/43344

Comment 7 Israel Pinto 2015-08-11 12:24:43 UTC
Verify with version:3.6.0-5
3.6.0-0.0.master.20150804111407.git122a3a0.el6
VDSM: vdsm-4.17.0-1239.git6575e3f.el7.noarch
Check with Automation and manually
https://rhev-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/3.6-GE-compute/144/