Change in vdsm[master]: hooks: Add vdsm-hook-emulator
danken at redhat.com
danken at redhat.com
Thu Aug 27 11:35:37 UTC 2015
Dan Kenigsberg has posted comments on this change.
Change subject: hooks: Add vdsm-hook-emulator
......................................................................
Patch Set 3: Code-Review-1
(3 comments)
https://gerrit.ovirt.org/#/c/45334/3/vdsm_hooks/emulator/before_vm_start.py
File vdsm_hooks/emulator/before_vm_start.py:
Line 20: #
Line 21: # After installing this hook the virtual machines started by oVirt
Line 22: # engine will look for qemu-kvm-modified script/binary instead of
Line 23: # qemu-kvm. This is useful for act like a wrapper to qemu-kvm
Line 24: # or even change in fact the emulator.
please include a docstring about the use case for this hook.
Line 25: import hooking
Line 26:
Line 27: emulator_path = "/usr/libexec/qemu-kvm-modified"
Line 28:
Line 23: # qemu-kvm. This is useful for act like a wrapper to qemu-kvm
Line 24: # or even change in fact the emulator.
Line 25: import hooking
Line 26:
Line 27: emulator_path = "/usr/libexec/qemu-kvm-modified"
we do not want to have this hook enabled just by the fact that it is installed (see https://bugzilla.redhat.com/1240298 )
I think it would be nice to get an "emulator" custom property from engine, so that this hook takes effect only on select VMs.
Line 28:
Line 29: domxml = hooking.read_domxml()
Line 30: devices_element = domxml.getElementsByTagName('devices')[0]
Line 31:
Line 26:
Line 27: emulator_path = "/usr/libexec/qemu-kvm-modified"
Line 28:
Line 29: domxml = hooking.read_domxml()
Line 30: devices_element = domxml.getElementsByTagName('devices')[0]
new hooks should have a test() function.
Line 31:
Line 32: emulator_element = domxml.createElement('emulator')
Line 33: emulator_node = domxml.createTextNode(emulator_path)
Line 34: emulator_element.appendChild(emulator_node)
--
To view, visit https://gerrit.ovirt.org/45334
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6f0f5e5947850a3a7fa856ac9919b9155b783d24
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Amador Pahim <apahim at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: David Jaša <djasa at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Michal Skrivanek <mskrivan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list