Change in vdsm[master]: Fix return value of shutdown() on failure
wudxw at linux.vnet.ibm.com
wudxw at linux.vnet.ibm.com
Tue Dec 4 04:58:07 UTC 2012
Mark Wu has posted comments on this change.
Change subject: Fix return value of shutdown() on failure
......................................................................
Patch Set 2: Verified
I intentionally add a raise in the try block in shutdown(). Without this patch, it returns done. I see the following message on engine:
2012-12-04 12:44:41,532 INFO [org.ovirt.engine.core.bll.ShutdownVmCommand] (pool-3-thread-49) [51c3ad1a] VmHandler.cs:ShutdownVmCommand:Perform: entered (Desktop vm1).
2012-12-04 12:44:41,532 INFO [org.ovirt.engine.core.bll.ShutdownVmCommand] (pool-3-thread-49) [51c3ad1a] VmHandler.cs:ShutdownVmCommand:Perform: sending shutdown command for Desktop vm1.
2012-12-04 12:44:41,533 INFO [org.ovirt.engine.core.vdsbroker.DestroyVmVDSCommand] (pool-3-thread-49) [51c3ad1a] START, DestroyVmVDSCommand(vdsId = 3f6bb242-3d26-11e2-b1fc-0021cc68d738, vmId=00ed0570-a015-4fbc-9a87-ccb84d2b6d9d, force=false, secondsToWait=30, gracefully=true), log id: c936590
2012-12-04 12:44:41,536 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand] (pool-3-thread-49) [51c3ad1a] START, DestroyVDSCommand(vdsId = 3f6bb242-3d26-11e2-b1fc-0021cc68d738, vmId=00ed0570-a015-4fbc-9a87-ccb84d2b6d9d, force=false, secondsToWait=30, gracefully=true), log id: 21ecf202
2012-12-04 12:44:41,636 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand] (pool-3-thread-49) [51c3ad1a] FINISH, DestroyVDSCommand, log id: 21ecf202
2012-12-04 12:44:41,646 INFO [org.ovirt.engine.core.vdsbroker.DestroyVmVDSCommand] (pool-3-thread-49) [51c3ad1a] FINISH, DestroyVmVDSCommand, return: PoweringDown, log id: c936590
With this patch, it returns correct error code.
2012-12-04 12:51:40,164 INFO [org.ovirt.engine.core.bll.ShutdownVmCommand] (pool-3-thread-49) [24855d03] VmHandler.cs:ShutdownVmCommand:Perform: sending shutdown command for Desktop vm1.
2012-12-04 12:51:40,164 INFO [org.ovirt.engine.core.vdsbroker.DestroyVmVDSCommand] (pool-3-thread-49) [24855d03] START, DestroyVmVDSCommand(vdsId = 3f6bb242-3d26-11e2-b1fc-0021cc68d738, vmId=00ed0570-a015-4fbc-9a87-ccb84d2b6d9d, force=false, secondsToWait=30, gracefully=true), log id: 3c3b6966
2012-12-04 12:51:40,168 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand] (pool-3-thread-49) [24855d03] START, DestroyVDSCommand(vdsId = 3f6bb242-3d26-11e2-b1fc-0021cc68d738, vmId=00ed0570-a015-4fbc-9a87-ccb84d2b6d9d, force=false, secondsToWait=30, gracefully=true), log id: 3328b5d0
2012-12-04 12:51:40,190 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.BrokerCommandBase] (pool-3-thread-49) [24855d03] Failed in DestroyVDS method
2012-12-04 12:51:40,190 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.BrokerCommandBase] (pool-3-thread-49) [24855d03] Error code exist and error message VDSGenericException: VDSErrorException: Failed to DestroyVDS, error = Failed to shutdown VM. Try Forced Shutdown.
2012-12-04 12:51:40,191 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.BrokerCommandBase] (pool-3-thread-49) [24855d03] Command org.ovirt.engine.core.vdsbroker.vdsbroker.DestroyVDSCommand return value
Class Name: org.ovirt.engine.core.vdsbroker.vdsbroker.StatusOnlyReturnForXmlRpc
mStatus Class Name: org.ovirt.engine.core.vdsbroker.vdsbroker.StatusForXmlRpc
mCode 4
mMessage Failed to shutdown VM. Try Forced Shutdown.
2012-12-04 12:51:40,191 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.BrokerCommandBase] (pool-3-thread-49) [24855d03] Vds: Host1
2012-12-04 12:51:40,192 ERROR [org.ovirt.engine.core.vdsbroker.VDSCommandBase] (pool-3-thread-49) [24855d03] Command DestroyVDS execution failed. Exception: VDSErrorException: VDSGenericException: VDSErrorException: Failed to DestroyVDS, error = Failed to shutdown VM. Try Forced Shutdown.
So I think it's verified.
--
To view, visit http://gerrit.ovirt.org/5434
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ice01a8db664c8c1a3ca32c15de4865f362e7210e
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck at redhat.com>
Gerrit-Reviewer: Ewoud Kohl van Wijngaarden <ewoud at kohlvanwijngaarden.nl>
Gerrit-Reviewer: Hunt Xu <mhuntxu at gmail.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the vdsm-patches
mailing list