Change in ovirt-engine[master]: core: improve exception handling on run vm

ahadas at redhat.com ahadas at redhat.com
Tue Dec 9 19:42:40 UTC 2014


Arik Hadas has submitted this change and it was merged.

Change subject: core: improve exception handling on run vm
......................................................................


core: improve exception handling on run vm

In case an exception is thrown when calling the 'create' verb in VDSM
and there is no point to retry to run the VM on other host, we used to
just re-throw the exception in RunVmCommand to prevent the rerun
mechanism from taking place.

The problem is that this way the pending resources were not cleared
in this flow. The solution is to improve the error handling:
1. If Done/exists exception was thrown, we call the reportCompleted to
decrease the pending resources
2. If VDS_NETWORK_ERROR/PROVIDER_FAILURE exception was thrown, we call
the runningFailed to decrease the pending resources (in this case, the
VM should be treated as if it went down, we should remove its
stateless snapshot if such snapshot exists for example).

Change-Id: Iee3bdb65ca58c49de65770d4e9cf9435bbbe5070
Bug-Url: https://bugzilla.redhat.com/1163142
Signed-off-by: Arik Hadas <ahadas at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
1 file changed, 4 insertions(+), 3 deletions(-)

Approvals:
  Shahar Havivi: Looks good to me, approved
  Arik Hadas: Verified



-- 
To view, visit http://gerrit.ovirt.org/35890
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iee3bdb65ca58c49de65770d4e9cf9435bbbe5070
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list