Martin Polednik has uploaded a new change for review.
Change subject: vdsm: expose release call to engine and via vdsClient ......................................................................
vdsm: expose release call to engine and via vdsClient
Release would, in ideal world, always be called when VM dies. Exposing this verbs gives users tool to force release if series of events lead to situation that should never occur(tm).
Change-Id: I920ae8b5c82134f09a12e56a529fa3d30fd7ab53 Signed-off-by: Martin Polednik mpolednik@redhat.com --- M client/vdsClient.py M vdsm/API.py M vdsm/rpc/BindingXMLRPC.py 3 files changed, 17 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/94/32394/1
diff --git a/client/vdsClient.py b/client/vdsClient.py index 783afa6..85d00cd 100644 --- a/client/vdsClient.py +++ b/client/vdsClient.py @@ -521,6 +521,10 @@ def do_getAllVmStats(self, args): return self.ExecAndExit(self.s.getAllVmStats())
+ def hostdevRelease(self, args): + device_name = args[0] + return self.ExecAndExit(self.s.hostdevRelease(device_name)) + def desktopLogin(self, args): vmId, domain, user, password = tuple(args[:4]) if len(args) > 4: @@ -2149,6 +2153,10 @@ ('', 'Get Statistics info for all existing VMs' )), + 'hostdevRelease': (serv.do_hostdevRelease, + ('<deviceName>', + 'Release specified device from any VMs on the host' + )), 'getVGList': (serv.getVGList, ('storageType', 'List of all VGs.' diff --git a/vdsm/API.py b/vdsm/API.py index 8da6030..6269d72 100644 --- a/vdsm/API.py +++ b/vdsm/API.py @@ -1296,6 +1296,10 @@ devices = hostdev.list_by_caps(self._cif.vmContainer, caps) return {'status': doneCode, 'deviceList': devices}
+ def hostdevRelease(self, device_name): + hostdev.release(device_name) + return {'status': doneCode} + def getStats(self): """ Report host statistics. diff --git a/vdsm/rpc/BindingXMLRPC.py b/vdsm/rpc/BindingXMLRPC.py index 4c1ef20..bdd0886 100644 --- a/vdsm/rpc/BindingXMLRPC.py +++ b/vdsm/rpc/BindingXMLRPC.py @@ -487,6 +487,10 @@ api = API.Global() return api.hostdevListByCaps(caps)
+ def hostdevRelease(self, device_name): + api = API.Global() + return api.hostdevRelease(device_name) + def vmGetIoTunePolicy(self, vmId): vm = API.VM(vmId) return vm.getIoTunePolicy() @@ -1004,6 +1008,7 @@ (self.vmGetStats, 'getVmStats'), (self.getAllVmStats, 'getAllVmStats'), (self.hostdevListByCaps, 'hostdevListByCaps'), + (self.hostdevRelease, 'hostdevRelease'), (self.vmMigrationCreate, 'migrationCreate'), (self.vmDesktopLogin, 'desktopLogin'), (self.vmDesktopLogoff, 'desktopLogoff'),
oVirt Jenkins CI Server has posted comments on this change.
Change subject: vdsm: expose release call to engine and via vdsClient ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/11286/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/12228/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/12075/ : SUCCESS
Martin Polednik has abandoned this change.
Change subject: vdsm: expose release call to engine and via vdsClient ......................................................................
Abandoned
automation@ovirt.org has posted comments on this change.
Change subject: vdsm: expose release call to engine and via vdsClient ......................................................................
Patch Set 1:
* Update tracker::IGNORE, no Bug-Url found
vdsm-patches@lists.fedorahosted.org