Change in vdsm[master]: [wip] fix vmdevices.storage.makeName
From Dan Kenigsberg : Dan Kenigsberg has restored this change. ( https://gerrit.ovirt.org/81155 ) Change subject: [wip] fix vmdevices.storage.makeName .. Restored wrong click. Francesco can abandon again if needed -- To view, visit https://gerrit.ovirt.org/81155 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: restore Gerrit-Change-Id: Ib0219be59e408df6628fd148b9ad70af8e2366aa Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [wip] fix vmdevices.storage.makeName
From Dan Kenigsberg : Dan Kenigsberg has abandoned this change. ( https://gerrit.ovirt.org/81155 ) Change subject: [wip] fix vmdevices.storage.makeName .. Abandoned -- To view, visit https://gerrit.ovirt.org/81155 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ib0219be59e408df6628fd148b9ad70af8e2366aa Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [wip] fix vmdevices.storage.makeName
From Dan Kenigsberg : Dan Kenigsberg has uploaded a new change for review. Change subject: [wip] fix vmdevices.storage.makeName .. [wip] fix vmdevices.storage.makeName it should mimic http://elixir.free-electrons.com/linux/latest/ident/sd_format_disk_name Change-Id: Ib0219be59e408df6628fd148b9ad70af8e2366aa Signed-off-by: Dan Kenigsberg --- M lib/vdsm/virt/vmdevices/storage.py 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/55/81155/1 diff --git a/lib/vdsm/virt/vmdevices/storage.py b/lib/vdsm/virt/vmdevices/storage.py index a67d4f8..f34deb7 100644 --- a/lib/vdsm/virt/vmdevices/storage.py +++ b/lib/vdsm/virt/vmdevices/storage.py @@ -806,8 +806,10 @@ devindex = '' i = int(index) -while i > 0: +while True: devindex = chr(ord('a') + (i % 26)) + devindex -i //= 26 +i = i // 26 - 1 +if i < 0: +break return devname.get(interface, 'hd') + (devindex or 'a') -- To view, visit https://gerrit.ovirt.org/81155 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib0219be59e408df6628fd148b9ad70af8e2366aa Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] net.api: expose cancel_rollback()
From Dan Kenigsberg : Dan Kenigsberg has posted comments on this change. Change subject: [WIP] net.api: expose cancel_rollback() .. Patch Set 3: ci please build -- To view, visit https://gerrit.ovirt.org/79299 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If42316ac6ecd694e398534e3e87b915aeb4f1f38 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] net.api: expose cancel_rollback()
From Dan Kenigsberg : Dan Kenigsberg has posted comments on this change. Change subject: [WIP] net.api: expose cancel_rollback() .. Patch Set 3: Verified+1 Ran 70 tests in 419.325s OK (SKIP=1) -- To view, visit https://gerrit.ovirt.org/79299 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If42316ac6ecd694e398534e3e87b915aeb4f1f38 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Edward Haas Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Petr Horáček Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] net.api: expose cancel_rollback()
From Dan Kenigsberg : Dan Kenigsberg has uploaded a new change for review. Change subject: [WIP] net.api: expose cancel_rollback() .. [WIP] net.api: expose cancel_rollback() When connectivityCheck=True is passed to the setupNetworks verb, an automatically roll back is performed, unless unless cancel_rollback() command is requested by the client. Note that Vdsm does not have an explicit cancel_rollback verb. cancel_rollback is called as a side effect of the ping verb. Change-Id: If42316ac6ecd694e398534e3e87b915aeb4f1f38 Signed-off-by: Dan Kenigsberg --- M lib/vdsm/constants.py.in M lib/vdsm/network/api.py M lib/vdsm/network/connectivity.py M vdsm/API.py 4 files changed, 9 insertions(+), 10 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/99/79299/1 diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in index 32c87d9..7ad3eb1 100644 --- a/lib/vdsm/constants.py.in +++ b/lib/vdsm/constants.py.in @@ -80,7 +80,6 @@ P_VDSM_CONF = '@CONFDIR@/' # NOQA: E501 (potentially long line) P_VDSM_KEYS = '/etc/pki/vdsm/keys/' -P_VDSM_CLIENT_LOG = '@VDSMRUNDIR@/client.log' # NOQA: E501 (potentially long line) P_VDSM_LOG = '@VDSMLOGDIR@' # NOQA: E501 (potentially long line) P_VDSM_NODE_ID = '/etc/vdsm/vdsm.id' diff --git a/lib/vdsm/network/api.py b/lib/vdsm/network/api.py index cb7210f..8c4113e 100644 --- a/lib/vdsm/network/api.py +++ b/lib/vdsm/network/api.py @@ -27,6 +27,7 @@ from vdsm import hooks +from vdsm.common.fileutils import touch_file from vdsm.network import netswitch from vdsm.network import sourceroute from vdsm.network.configurators.ifcfg import ConfigWriter @@ -281,3 +282,7 @@ def remove_ovs_port(bridge, port): netswitch.configurator.ovs_remove_port(bridge, port) + + +def cancel_rollback(): +touch_file(constants.P_VDSM_CLIENT_LOG) diff --git a/lib/vdsm/network/connectivity.py b/lib/vdsm/network/connectivity.py index 3b2402d..11e5601 100644 --- a/lib/vdsm/network/connectivity.py +++ b/lib/vdsm/network/connectivity.py @@ -30,6 +30,7 @@ from .errors import ConfigNetworkError CONNECTIVITY_TIMEOUT_DEFAULT = 4 +P_VDSM_CLIENT_LOG = constants.P_VDSM_RUN + 'client.log' def _get_connectivity_timeout(options): @@ -50,7 +51,7 @@ start = time.time() while timeout >= 0: try: -if os.stat(constants.P_VDSM_CLIENT_LOG).st_mtime > start: +if os.stat(P_VDSM_CLIENT_LOG).st_mtime > start: return True except OSError as e: if e.errno == errno.ENOENT: diff --git a/vdsm/API.py b/vdsm/API.py index fc928a7..056f61e 100644 --- a/vdsm/API.py +++ b/vdsm/API.py @@ -22,6 +22,7 @@ import os +from vdsm.network.api import cancel_rollback from vdsm.network.errors import ConfigNetworkError from vdsm import commands @@ -78,13 +79,6 @@ throttledlog.throttle('getAllVmStats', 100) - - -def updateTimestamp(): -# The setup API uses this log file to determine if this host is still -# accessible. We use a file (rather than an event) because setup is -# performed by a separate, root process. -fileutils.touch_file(constants.P_VDSM_CLIENT_LOG) class APIBase(object): @@ -1237,7 +1231,7 @@ def ping(self): "Ping the server. Useful for tests" -updateTimestamp() +cancel_rollback() return {'status': doneCode} def getCapabilities(self): -- To view, visit https://gerrit.ovirt.org/79299 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If42316ac6ecd694e398534e3e87b915aeb4f1f38 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] iscsi: netIfaceName: expect network name
From Dan Kenigsberg : Dan Kenigsberg has uploaded a new change for review. Change subject: [WIP] iscsi: netIfaceName: expect network name .. [WIP] iscsi: netIfaceName: expect network name This is pseudo code for letting Engine pass the network it would like to use for iscsi connection, and let Vdsm resolve it to the specific IP-bearing interface to be used by iscsiadm. Without this patch, Engine has to know too much about the implementation of networks on Vdsm. Change-Id: Ia50582ae0202e4dd058c254f3b34d8817d28fe80 Bug-Url: https://bugzilla.redhat.com/1441245 Signed-off-by: Dan Kenigsberg --- M lib/vdsm/storage/hsm.py 1 file changed, 17 insertions(+), 10 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/36/79236/1 diff --git a/lib/vdsm/storage/hsm.py b/lib/vdsm/storage/hsm.py index 22841f7..99c19d1 100644 --- a/lib/vdsm/storage/hsm.py +++ b/lib/vdsm/storage/hsm.py @@ -130,16 +130,21 @@ sd.GLUSTERFS_DOMAIN: 'glusterfs'} -def _updateIfaceNameIfNeeded(iface, netIfaceName): +def _updateIfaceNameIfNeeded(iface, network_name): if iface.netIfaceName is None: -iface.netIfaceName = netIfaceName +if network_name is a network name: +iface.netIfaceName = northbound iface of network_name +else: +# Engine < 4.2 may pass the intrface name instead of the network +# name. +iface.netIfaceName = network_name iface.update() return True return False -def _resolveIscsiIface(ifaceName, initiatorName, netIfaceName): +def _resolveIscsiIface(ifaceName, initiatorName, network_name): if not ifaceName: return iscsi.IscsiInterface('default') @@ -148,14 +153,16 @@ if iface.name != ifaceName: continue -if netIfaceName is not None: -if (not _updateIfaceNameIfNeeded(iface, netIfaceName) and +if network_name is not None: +if (not _updateIfaceNameIfNeeded(iface, network_name) and netIfaceName != iface.netIfaceName): -logging.error('iSCSI netIfaceName coming from engine [%s] ' - 'is different from iface.net_ifacename ' - 'present on the system [%s]. Aborting iscsi ' - 'iface [%s] configuration.' % - (netIfaceName, iface.netIfaceName, iface.name)) +logging.error( +'network_name coming from engine [%s] was resolved to' +'iSCSI netIfaceName [%s] which is different from ' +'iface.net_ifacename present on the system [%s]. ' +'Aborting iscsi iface [%s] configuration.' % +(network_name, netIfaceName, iface.netIfaceName, +iface.name)) raise se.iSCSIifaceError() -- To view, visit https://gerrit.ovirt.org/79236 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia50582ae0202e4dd058c254f3b34d8817d28fe80 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: WIP: extract Vm.process_devices()
From Dan Kenigsberg : Dan Kenigsberg has posted comments on this change. Change subject: WIP: extract Vm.process_devices() .. Patch Set 2: (1 comment) https://gerrit.ovirt.org/#/c/77815/2/vdsm/virt/vm.py File vdsm/virt/vm.py: PS2, Line 1844: extra_xml extra_xmls ? (to stress it is a list) -- To view, visit https://gerrit.ovirt.org/77815 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If4a3af2ff4a81376ddfbe31d30c43d8b5cf66f39 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: (wip) Adding abrt dependency and introduce configurator for it
From Yaniv Bronhaim : Yaniv Bronhaim has posted comments on this change. Change subject: (wip) Adding abrt dependency and introduce configurator for it .. Patch Set 5: (1 comment) https://gerrit.ovirt.org/#/c/44287/5/lib/vdsm/tool/configurators/abrt.py File lib/vdsm/tool/configurators/abrt.py: Line 62: 'fragments': [ Line 63: { Line 64: 'conditions': {}, Line 65: 'content': { Line 66: 'DumpLocation': '/var/tmp/abrt' > it's not included, it should be added yes its part of the action items of the feature to add abrt output to sos plugins. see https://trello.com/c/aRx6a6UN/6-bug-917062-rfe-add-abrt-integration Line 67: }, Line 68: }, Line 69: ] Line 70: }, -- To view, visit https://gerrit.ovirt.org/44287 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1ca5e66c9f029be75483b86414e328d074c7e454 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Jenkins CI RO Gerrit-Reviewer: Martin Peřina Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: (wip) Adding abrt dependency and introduce configurator for it
From Yaniv Bronhaim : Yaniv Bronhaim has posted comments on this change. Change subject: (wip) Adding abrt dependency and introduce configurator for it .. Patch Set 4: (2 comments) https://gerrit.ovirt.org/#/c/44287/4/vdsm.spec.in File vdsm.spec.in: Line 109: Requires: rpm-python Line 110: Requires: nfs-utils Line 111: Requires: m2crypto Line 112: Requires: libnl3 Line 113: Requires: abrt-desktop > We definitely don't want to add abrt-gui and gnome-abrt as VDSM dependency, Done Line 114: Requires: curl Line 115: Requires: %{name}-xmlrpc = %{version}-%{release} Line 116: Requires: %{name}-jsonrpc = %{version}-%{release} Line 117: Requires: safelease >= 1.0-7 https://gerrit.ovirt.org/#/c/44287/4/vdsm/vdsm-logrotate File vdsm/vdsm-logrotate: Line 24 Line 25 Line 26 Line 27 Line 28 > Shouldn't we rotate also abrt files or abrt does that automatically? If so, we will need to see while its running if its needed. im not sure yet if it overrides reports -- To view, visit https://gerrit.ovirt.org/44287 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1ca5e66c9f029be75483b86414e328d074c7e454 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Jenkins CI RO Gerrit-Reviewer: Martin Peřina Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP]configurators: move configurator functions into conf_utils
From Yaniv Bronhaim : Yaniv Bronhaim has restored this change. Change subject: [WIP]configurators: move configurator functions into conf_utils .. Restored -- To view, visit https://gerrit.ovirt.org/44286 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: restore Gerrit-Change-Id: Id67a0f51adb2d543c0542a48c020d34a13d1f2ed Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Jenkins CI RO Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP]ABRT integration
From Yaniv Bronhaim : Yaniv Bronhaim has restored this change. Change subject: [WIP]ABRT integration .. Restored rechecking that -- To view, visit https://gerrit.ovirt.org/44287 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: restore Gerrit-Change-Id: I1ca5e66c9f029be75483b86414e328d074c7e454 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Jenkins CI RO Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] tests: CountFilesPlugin
From Dan Kenigsberg : Dan Kenigsberg has uploaded a new change for review. Change subject: [WIP] tests: CountFilesPlugin .. [WIP] tests: CountFilesPlugin A proper test should clean after itself, and close all the files it had opened. Enabling this plugin, with --with-countfiles, shows which test (or its tested code), fail to do so. Change-Id: Ic71224f3c24b04cf4d08889338722cf248bcb2a9 Signed-off-by: Dan Kenigsberg --- M tests/testValidation.py M tests/testlib.py 2 files changed, 32 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/42/69042/1 diff --git a/tests/testValidation.py b/tests/testValidation.py index a4b6789..ed84c19 100644 --- a/tests/testValidation.py +++ b/tests/testValidation.py @@ -107,6 +107,36 @@ raise Exception('thread leak: %s ' % diff) +class CountFilesPlugin(Plugin): +""" +Check whether a test (or the code it triggers) open files and do not close +them. +""" +name = 'countfiles' + +def _readlink_if_exists(self, path): +try: +return os.readlink(path) +except OSError as e: +if e.errno != errno.ENOENT: +raise + +def _open_files(self): +fddir = '/proc/%s/fd/' % os.getpid() + +return frozenset( +self._readlink_if_exists(fddir + path) for path +in os.listdir(fddir)) + +def startTest(self, test): +self._start_files = self._open_files() + +def stopTest(self, test): +diff = self._open_files() - self._start_files +if diff: +raise Exception('file leak: %s ' % diff) + + def ValidateRunningAsRoot(f): @wraps(f) def wrapper(*args, **kwargs): diff --git a/tests/testlib.py b/tests/testlib.py index 8a55e6e..694457d 100644 --- a/tests/testlib.py +++ b/tests/testlib.py @@ -59,7 +59,7 @@ from monkeypatch import Patch from testValidation import ( -SlowTestsPlugin, StressTestsPlugin, CountThreadsPlugin) +SlowTestsPlugin, StressTestsPlugin, CountThreadsPlugin, CountFilesPlugin) # /tmp may use tempfs filesystem, not suitable for some of the test assuming a # filesystem with direct io support. @@ -435,6 +435,7 @@ conf.plugins.addPlugin(SlowTestsPlugin()) conf.plugins.addPlugin(StressTestsPlugin()) conf.plugins.addPlugin(CountThreadsPlugin()) +conf.plugins.addPlugin(CountFilesPlugin()) runner = VdsmTestRunner(stream=conf.stream, verbosity=conf.verbosity, -- To view, visit https://gerrit.ovirt.org/69042 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic71224f3c24b04cf4d08889338722cf248bcb2a9 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: WIP: containers: add docker network provider plugin
From Dan Kenigsberg : Dan Kenigsberg has posted comments on this change. Change subject: WIP: containers: add docker network provider plugin .. Patch Set 5: (1 comment) https://gerrit.ovirt.org/#/c/67229/5/lib/vdsm/compat.py File lib/vdsm/compat.py: Line 46: Line 47: import SocketServer as socketserver Line 48: socketserver Line 49: Line 50: from BaseHTTPServer import BaseHTTPRequestHandler please use six.moves.BaseHTTPServer instead of reinventing it. Line 51: BaseHTTPRequestHandler Line 52: else: Line 53: from subprocess import Popen as CPopen Line 54: CPopen # make pyflakes happy -- To view, visit https://gerrit.ovirt.org/67229 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib5557eb09964bd55194d7de1610f056d67745c20 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: **WIP** tool: reconfigure containers networks
gerrit-hooks has posted comments on this change. Change subject: **WIP** tool: reconfigure containers networks .. Patch Set 24: * Update Tracker::IGNORE, no bug url/s found * Check Bug-Url::IGNORE, not relevant for branch: master * Check Public Bug::WARN, no public bug url found * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/60918 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6053e283c004cd61ba7727cea22ba73a631180ba Gerrit-PatchSet: 24 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: **WIP** tool: reconfigure containers networks
gerrit-hooks has posted comments on this change. Change subject: **WIP** tool: reconfigure containers networks .. Patch Set 23: * Update Tracker::IGNORE, no bug url/s found * Check Bug-Url::IGNORE, not relevant for branch: master * Check Public Bug::WARN, no public bug url found * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/60918 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6053e283c004cd61ba7727cea22ba73a631180ba Gerrit-PatchSet: 23 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: **WIP** tool: reconfigure containers networks
gerrit-hooks has posted comments on this change. Change subject: **WIP** tool: reconfigure containers networks .. Patch Set 22: * Update Tracker::IGNORE, no bug url/s found * Check Bug-Url::IGNORE, not relevant for branch: master * Check Public Bug::WARN, no public bug url found * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/60918 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6053e283c004cd61ba7727cea22ba73a631180ba Gerrit-PatchSet: 22 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: WIP: docs: add tutorial
gerrit-hooks has posted comments on this change. Change subject: WIP: docs: add tutorial .. Patch Set 4: * Update Tracker::IGNORE, no bug url/s found * Check Bug-Url::IGNORE, not relevant for branch: master * Check Public Bug::WARN, no public bug url found * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/65400 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3a9e947c30f2978fd9670fd64d99bf380181aa9c Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: **WIP** tool: reconfigure containers networks
gerrit-hooks has posted comments on this change. Change subject: **WIP** tool: reconfigure containers networks .. Patch Set 21: * Update Tracker::IGNORE, no bug url/s found * Check Bug-Url::IGNORE, not relevant for branch: master * Check Public Bug::WARN, no public bug url found * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/60918 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6053e283c004cd61ba7727cea22ba73a631180ba Gerrit-PatchSet: 21 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: WIP: docs: add tutorial
gerrit-hooks has posted comments on this change. Change subject: WIP: docs: add tutorial .. Patch Set 3: * Update Tracker::IGNORE, no bug url/s found * Check Bug-Url::IGNORE, not relevant for branch: master * Check Public Bug::WARN, no public bug url found * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/65400 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3a9e947c30f2978fd9670fd64d99bf380181aa9c Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: **WIP** tool: reconfigure containers networks
gerrit-hooks has posted comments on this change. Change subject: **WIP** tool: reconfigure containers networks .. Patch Set 20: * Update Tracker::IGNORE, no bug url/s found * Check Bug-Url::IGNORE, not relevant for branch: master * Check Public Bug::WARN, no public bug url found * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/60918 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6053e283c004cd61ba7727cea22ba73a631180ba Gerrit-PatchSet: 20 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] use libvirt domain xml prepared in advance
Arik Hadas has posted comments on this change. Change subject: [WIP] use libvirt domain xml prepared in advance .. Patch Set 2: (1 comment) https://gerrit.ovirt.org/#/c/65182/2/vdsm/virt/vmxml.py File vdsm/virt/vmxml.py: Line 219: self._devices = Element('devices') Line 220: self.dom.appendChild(self._devices) Line 221: Line 222: self.appendMetadata() Line 223: self.doc.appendChild(self.dom) > I think this is redundant because minidom implicitely refers to the main Do frankly, I don't remember.. I'll try without it Line 224: Line 225: def appendClock(self): Line 226: """ Line 227: Add element to domain: -- To view, visit https://gerrit.ovirt.org/65182 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I469fad3ca14a6b7f4675ef5c200175053f6dd4af Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Arik Hadas Gerrit-Reviewer: Arik Hadas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] use libvirt domain xml prepared in advance
Francesco Romani has posted comments on this change. Change subject: [WIP] use libvirt domain xml prepared in advance .. Patch Set 2: -Code-Review -- To view, visit https://gerrit.ovirt.org/65182 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I469fad3ca14a6b7f4675ef5c200175053f6dd4af Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Arik Hadas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] use libvirt domain xml prepared in advance
Francesco Romani has posted comments on this change. Change subject: [WIP] use libvirt domain xml prepared in advance .. Patch Set 2: Code-Review+1 (1 comment) https://gerrit.ovirt.org/#/c/65182/2/vdsm/virt/vmxml.py File vdsm/virt/vmxml.py: Line 219: self._devices = Element('devices') Line 220: self.dom.appendChild(self._devices) Line 221: Line 222: self.appendMetadata() Line 223: self.doc.appendChild(self.dom) I think this is redundant because minidom implicitely refers to the main Document. Or this line fixes an issue you actually found? Line 224: Line 225: def appendClock(self): Line 226: """ Line 227: Add element to domain: -- To view, visit https://gerrit.ovirt.org/65182 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I469fad3ca14a6b7f4675ef5c200175053f6dd4af Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Arik Hadas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: **WIP** tool: reconfigure containers networks
gerrit-hooks has posted comments on this change. Change subject: **WIP** tool: reconfigure containers networks .. Patch Set 19: * Update Tracker::IGNORE, no bug url/s found * Check Bug-Url::IGNORE, not relevant for branch: master * Check Public Bug::WARN, no public bug url found * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/60918 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6053e283c004cd61ba7727cea22ba73a631180ba Gerrit-PatchSet: 19 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: WIP: docs: add tutorial
gerrit-hooks has posted comments on this change. Change subject: WIP: docs: add tutorial .. Patch Set 2: * Update Tracker::IGNORE, no bug url/s found * Check Bug-Url::IGNORE, not relevant for branch: master * Check Public Bug::WARN, no public bug url found * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/65400 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3a9e947c30f2978fd9670fd64d99bf380181aa9c Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: **WIP** tool: reconfigure containers networks
gerrit-hooks has posted comments on this change. Change subject: **WIP** tool: reconfigure containers networks .. Patch Set 18: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/60918 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6053e283c004cd61ba7727cea22ba73a631180ba Gerrit-PatchSet: 18 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: WIP: docs: add tutorial
gerrit-hooks has posted comments on this change. Change subject: WIP: docs: add tutorial .. Patch Set 1: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/65400 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I3a9e947c30f2978fd9670fd64d99bf380181aa9c Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: WIP: docs: add tutorial
Francesco Romani has uploaded a new change for review. Change subject: WIP: docs: add tutorial .. WIP: docs: add tutorial Probably not worth merging Change-Id: I3a9e947c30f2978fd9670fd64d99bf380181aa9c Signed-off-by: Francesco Romani --- A doc/containers-tutorial.md 1 file changed, 204 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/00/65400/1 diff --git a/doc/containers-tutorial.md b/doc/containers-tutorial.md new file mode 100644 index 000..37f1ee4 --- /dev/null +++ b/doc/containers-tutorial.md @@ -0,0 +1,204 @@ +# How to try how the experimental container support for Vdsm. + +## What works, aka what to expect + +The basic features are expected to work: +1. Run any docker image on the public docker registry +2. Make the container accessible from the outside (aka not just from localhost) +3. Use file-based storage for persistent volumes + +## What does not yet work, aka what NOT to expect + +Few things are planned and currently under active development: +1. Monitoring. Engine will not get any update from the container besides "VM" status (Up, Down...) + One important drawback is that you will not be told the IP of the container from Engine, + you will need to connect to the Vdsm host to discover it using standard docker tools. +2. Proper network integration. Some steps still need manual intervention +3. Stability and recovery - it's pre-alpha software after all! :) + +## 1. Introduction and prerequisites + +Trying out container support affects only the host and the Vdsm. +Besides add few custom variables (totally safe and supported since early +3.z), there are zero changes required to the DB and to Engine. +Nevertheless, we recommend to dedicate one oVirt 4.y environment, +or at least one 4.y host, to try out the container feature. + +To get started, first thing you need is to setup a vanilla oVirt 4.y +installation. We will need to make changes to the Vdsm and to the +Vdsm host, so hosted engine and/or oVirt node may add extra complexity. + +The reminder of this tutorial assumes you are using two hosts, +one for Vdsm (will be changed) and one for Engine (will require zero changes); +furthermore, we assume the Vdsm host is running on CentOS 7.y. + +We require: +- one test host for Vdsm. This host need to have one NIC dedicated to containers. + We will use the [docker macvlan driver](https://raesene.github.io/blog/2016/07/23/Docker-MacVLAN/), + so this NIC *must not be* part of one bridge. +- docker >= 1.12 +- oVirt >= 4.0.5 (Vdsm >= 4.18.15) +- CentOS >= 7.2 + +Docker >= 1.12 is avaialable for download [here](https://docs.docker.com/engine/installation/linux/centos/) + +Caveats: +1. docker from official rpms conflicts con docker from CentOS, and has a different package name: docker-engine vs docker. + Please note that the kubernetes package from CentOS, for example, require 'docker', not 'docker-engine'. +2. you may want to replace the default service file + [with this one](https://github.com/mojaves/convirt/blob/master/patches/centos72/systemd/docker/docker.service) + and to use this + [sysconfig file](https://github.com/mojaves/convirt/blob/master/patches/centos72/systemd/docker/docker-engine). + Here I'm just adding the storage options docker requires, much like the CentOS docker is configured. + Configuring docker like this can save you some troubleshooting, especially if you had docker from CentOS installed + on the testing box. + +## 2. Patch Vdsm to support containers + +You need to patch and rebuild Vdsm. +Fetch [this patch](https://github.com/mojaves/convirt/blob/master/patches/vdsm/4.18.15/0001-container-support-for-Vdsm.patch.gz) +and apply it against Vdsm 4.18.15. + +Rebuild Vdsm and reinstall on your box. Make sure you install the Vdsm command line client (vdsm-cli) + +Restart *both* Vdsm and Supervdsm, make sure Engine still works flawlessly with patched Vdsm. +This ensure that no regression is introduced, and that your environment can run VMs just as before. +Now we can proceed adding the container support. + +start docker: + + # systemctl start docker-engine + (optional) + # systemctl enable docker-engine + +Restart Vdsm again + + # systemctl restart vdsm + +Now we can check if Vdsm detects docker, so you can use it: +still on the same Vdsm host, run + + $ vdsClient -s 0 getVdsCaps | grep containers + containers = ['docker', 'fake'] + +This means this Vdsm can run containers using 'docker' and 'fake' runtimes. +Ignore the 'fake' runtime; as the name suggests, is a test driver, kinda like /dev/null. + +Now we need to make sure the host network configuration is fine. + +### 2.1. Configure the docker network for Vdsm + + PLEASE NOTE + that the suggested network configuration assumes that + * you have one network, `ovirtmgmt` (the default one) you use for everything + * you have one Vdsm host with at least two NICs, one boun
Change in vdsm[master]: [WIP] use libvirt domain xml prepared in advance
Milan Zamazal has posted comments on this change. Change subject: [WIP] use libvirt domain xml prepared in advance .. Patch Set 2: (1 comment) https://gerrit.ovirt.org/#/c/65182/2/vdsm/virt/vmxml.py File vdsm/virt/vmxml.py: Line 21: from operator import itemgetter Line 22: import xml.dom Line 23: import xml.dom.minidom Line 24: import xml.etree.ElementTree as etree Line 25: from xml.dom.minidom import parseString as _domParseStr > code is migrated to etree, Milan, how far are we for this module? I tried to address suggestions from the reviewers on https://gerrit.ovirt.org/55769, so I'm going to push that patch for merge now. If it succeeds then all new code should use the XML helpers from the patch or etree directly. If it doesn't succeed before this (Arik's) patch will be merged then there is no big problem with it as we need to check for minidom remnants anyway. Line 26: Line 27: from vdsm import constants Line 28: from vdsm import cpuarch Line 29: from vdsm import utils -- To view, visit https://gerrit.ovirt.org/65182 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I469fad3ca14a6b7f4675ef5c200175053f6dd4af Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Arik Hadas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] use libvirt domain xml prepared in advance
Michal Skrivanek has posted comments on this change. Change subject: [WIP] use libvirt domain xml prepared in advance .. Patch Set 2: (1 comment) https://gerrit.ovirt.org/#/c/65182/2/vdsm/virt/vmxml.py File vdsm/virt/vmxml.py: Line 21: from operator import itemgetter Line 22: import xml.dom Line 23: import xml.dom.minidom Line 24: import xml.etree.ElementTree as etree Line 25: from xml.dom.minidom import parseString as _domParseStr code is migrated to etree, Milan, how far are we for this module? Line 26: Line 27: from vdsm import constants Line 28: from vdsm import cpuarch Line 29: from vdsm import utils -- To view, visit https://gerrit.ovirt.org/65182 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I469fad3ca14a6b7f4675ef5c200175053f6dd4af Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Arik Hadas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: Milan Zamazal Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] use libvirt domain xml prepared in advance
gerrit-hooks has posted comments on this change. Change subject: [WIP] use libvirt domain xml prepared in advance .. Patch Set 2: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/65182 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I469fad3ca14a6b7f4675ef5c200175053f6dd4af Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Arik Hadas Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Michal Skrivanek Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] use libvirt domain xml prepared in advance
Arik Hadas has uploaded a new change for review. Change subject: [WIP] use libvirt domain xml prepared in advance .. [WIP] use libvirt domain xml prepared in advance Change-Id: I469fad3ca14a6b7f4675ef5c200175053f6dd4af Signed-off-by: Arik Hadas --- M vdsm/virt/vmxml.py 1 file changed, 30 insertions(+), 8 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/82/65182/1 diff --git a/vdsm/virt/vmxml.py b/vdsm/virt/vmxml.py index b868a25..ee1a381 100644 --- a/vdsm/virt/vmxml.py +++ b/vdsm/virt/vmxml.py @@ -22,6 +22,7 @@ import xml.dom import xml.dom.minidom import xml.etree.ElementTree as etree +from xml.dom.minidom import parseString as _domParseStr from vdsm import constants from vdsm import cpuarch @@ -113,8 +114,11 @@ class Element(object): -def __init__(self, tagName, text=None, namespaceUri=None, **attrs): -if namespaceUri is not None: +def __init__(self, tagName, text=None, namespaceUri=None, elem=None, + **attrs): +if elem is not None: +self._elem = elem +elif namespaceUri is not None: self._elem = xml.dom.minidom.Document().createElementNS( namespaceUri, tagName) else: @@ -149,6 +153,29 @@ class Domain(object): def __init__(self, conf, log, arch): +self.conf = conf +self.log = log + +self.arch = arch + +if ('xml' in self.conf): +self._parseDomainXml() +else: +self._buildSkeleton() + + +def _parseDomainXml(self): +""" +Parse given libvirt domain xml +""" +self.doc = _domParseStr(self.conf['xml']) +domainElement = self.doc.getElementsByTagName('domain')[0] +self.dom = Element(None, elem=domainElement) +devicesElement = self.doc.childNodes[0].\ +getElementsByTagName('devices')[0] +self._devices = Element(None, elem=devicesElement) + +def _buildSkeleton(self): """ Create the skeleton of a libvirt domain xml @@ -163,13 +190,7 @@ """ -self.conf = conf -self.log = log - -self.arch = arch - self.doc = xml.dom.minidom.Document() - if utils.tobool(self.conf.get('kvmEnable', 'true')): domainType = 'kvm' else: @@ -200,6 +221,7 @@ self.dom.appendChild(self._devices) self.appendMetadata() +self.doc.appendChild(self.dom) def appendClock(self): """ -- To view, visit https://gerrit.ovirt.org/65182 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I469fad3ca14a6b7f4675ef5c200175053f6dd4af Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Arik Hadas ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] use libvirt domain xml prepared in advance
gerrit-hooks has posted comments on this change. Change subject: [WIP] use libvirt domain xml prepared in advance .. Patch Set 1: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/65182 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I469fad3ca14a6b7f4675ef5c200175053f6dd4af Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Arik Hadas Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemuimg map
Ala Hino has posted comments on this change. Change subject: [WIP] core: Expose API for qemuimg map .. Patch Set 1: (3 comments) https://gerrit.ovirt.org/#/c/65112/1/lib/vdsm/qemuimg.py File lib/vdsm/qemuimg.py: Line 213: cmd = [_qemuimg.cmd, "map", "--output", "json", image] Line 214: # For simplicity, we always run commit in the image directory. Line 215: rc, out, err = commands.execCmd(cmd, raw=True) Line 216: if rc != 0: Line 217: raise QImgError(rc, out, err) > This boilerplate is repeated too many times in this module. Can you send an Will do Line 218: Line 219: try: Line 220: print "out: %s" % out Line 221: except ValueError: Line 216: if rc != 0: Line 217: raise QImgError(rc, out, err) Line 218: Line 219: try: Line 220: print "out: %s" % out > We want to parse the json text and return the parsed result. I know; this code isn't complete. I just wanted to share with you to discuss the output Line 221: except ValueError: Line 222: raise QImgError(rc, out, err, "Failed to process qemuimg map output") Line 223: Line 224: Line 220: print "out: %s" % out Line 221: except ValueError: Line 222: raise QImgError(rc, out, err, "Failed to process qemuimg map output") Line 223: Line 224: > You have 3 empty lines, we need 2 to satisfy pep8 tool. True, yet again - this is just Work In Progress Line 225: Line 226: class QemuImgOperation(object): Line 227: REGEXPR = re.compile(r'\s*\(([\d.]+)/100%\)\s*') Line 228: -- To view, visit https://gerrit.ovirt.org/65112 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I54d6c936239d3dcc7a3d236dbaab0a93501ada8c Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino Gerrit-Reviewer: Ala Hino Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemuimg map
Nir Soffer has posted comments on this change. Change subject: [WIP] core: Expose API for qemuimg map .. Patch Set 1: (3 comments) https://gerrit.ovirt.org/#/c/65112/1/lib/vdsm/qemuimg.py File lib/vdsm/qemuimg.py: Line 213: cmd = [_qemuimg.cmd, "map", "--output", "json", image] Line 214: # For simplicity, we always run commit in the image directory. Line 215: rc, out, err = commands.execCmd(cmd, raw=True) Line 216: if rc != 0: Line 217: raise QImgError(rc, out, err) This boilerplate is repeated too many times in this module. Can you send another patch, adding a simple helper called from all methods? Line 218: Line 219: try: Line 220: print "out: %s" % out Line 221: except ValueError: Line 216: if rc != 0: Line 217: raise QImgError(rc, out, err) Line 218: Line 219: try: Line 220: print "out: %s" % out We want to parse the json text and return the parsed result. Line 221: except ValueError: Line 222: raise QImgError(rc, out, err, "Failed to process qemuimg map output") Line 223: Line 224: Line 220: print "out: %s" % out Line 221: except ValueError: Line 222: raise QImgError(rc, out, err, "Failed to process qemuimg map output") Line 223: Line 224: You have 3 empty lines, we need 2 to satisfy pep8 tool. Line 225: Line 226: class QemuImgOperation(object): Line 227: REGEXPR = re.compile(r'\s*\(([\d.]+)/100%\)\s*') Line 228: -- To view, visit https://gerrit.ovirt.org/65112 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I54d6c936239d3dcc7a3d236dbaab0a93501ada8c Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemuimg map
gerrit-hooks has posted comments on this change. Change subject: [WIP] core: Expose API for qemuimg map .. Patch Set 1: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/65112 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I54d6c936239d3dcc7a3d236dbaab0a93501ada8c Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemuimg map
Ala Hino has uploaded a new change for review. Change subject: [WIP] core: Expose API for qemuimg map .. [WIP] core: Expose API for qemuimg map Change-Id: I54d6c936239d3dcc7a3d236dbaab0a93501ada8c Signed-off-by: Ala Hino --- M lib/vdsm/qemuimg.py M tests/qemuimg_test.py 2 files changed, 45 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/12/65112/1 diff --git a/lib/vdsm/qemuimg.py b/lib/vdsm/qemuimg.py index ef98149..a6e89d8 100644 --- a/lib/vdsm/qemuimg.py +++ b/lib/vdsm/qemuimg.py @@ -209,6 +209,20 @@ return QemuImgOperation(cmd, cwd=workdir) +def map(image): +cmd = [_qemuimg.cmd, "map", "--output", "json", image] +# For simplicity, we always run commit in the image directory. +rc, out, err = commands.execCmd(cmd, raw=True) +if rc != 0: +raise QImgError(rc, out, err) + +try: +print "out: %s" % out +except ValueError: +raise QImgError(rc, out, err, "Failed to process qemuimg map output") + + + class QemuImgOperation(object): REGEXPR = re.compile(r'\s*\(([\d.]+)/100%\)\s*') diff --git a/tests/qemuimg_test.py b/tests/qemuimg_test.py index f6e8b35..f00b830 100644 --- a/tests/qemuimg_test.py +++ b/tests/qemuimg_test.py @@ -437,6 +437,37 @@ self.assertEquals(100, op.progress) +@expandPermutations +class TestMap(TestCaseBase): + +@permutations([ +# format, size +(qemuimg.FORMAT.RAW, 0), +(qemuimg.FORMAT.QCOW2, 0), +(qemuimg.FORMAT.RAW, 1048576), +(qemuimg.FORMAT.QCOW2, 1048576) +]) +def test_map_single_volume(self, format, size): +with namedTemporaryDir() as tmpdir: +image = os.path.join(tmpdir, "base.img") +make_image(image, size, format, 0, "1.1") +map = qemuimg.map(image) + +def test_map_chain(self): +with namedTemporaryDir() as tmpdir: +parent = None +chain = [] +for i in range(4): +vol = os.path.join(tmpdir, "vol%d.img" % i) +format = (qemuimg.FORMAT.RAW if i == 0 else + qemuimg.FORMAT.QCOW2) +make_image(vol, 1048576, format, i, "1.1", parent) +chain.append(vol) +parent = vol + +map = qemuimg.map(chain[0]) + + def make_image(path, size, format, index, qcow2_compat, backing=None): qemuimg.create(path, size=size, format=format, qcow2Compat=qcow2_compat, backing=backing) -- To view, visit https://gerrit.ovirt.org/65112 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I54d6c936239d3dcc7a3d236dbaab0a93501ada8c Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: **WIP** tool: reconfigure containers networks
gerrit-hooks has posted comments on this change. Change subject: **WIP** tool: reconfigure containers networks .. Patch Set 17: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/60918 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6053e283c004cd61ba7727cea22ba73a631180ba Gerrit-PatchSet: 17 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: wip: jsonrpc: introduce new client
Nir Soffer has posted comments on this change. Change subject: wip: jsonrpc: introduce new client .. Patch Set 9: (2 comments) We also need tests for this. https://gerrit.ovirt.org/#/c/64502/9/lib/vdsm/client.py File lib/vdsm/client.py: Line 95: def __init__(self, client): Line 96: self._client = client Line 97: self.default_timeout = yajsonrpc.CALL_TIMEOUT Line 98: Line 99: def call(self, method, args={}, timeout=None): args is optional now (good), but you are using mutable default argument, meaning that all calls share the same args dict. If some call will modify the dict, the modification will effect the next calls. There no way to have default dict argument safely, the safe way to do this is: def call(self, method, args=None, ...): if args is None: args = {} We also need docstring explaining what is each argument. For example timeout seems to be the number of seconds to wait for response. Line 100: if timeout is None: Line 101: timeout = self.default_timeout Line 102: req = yajsonrpc.JsonRpcRequest(method, args, reqId=str(uuid.uuid4())) Line 103: try: Line 105: except EnvironmentError as e: Line 106: raise ClientError(e) Line 107: Line 108: if not responses: Line 109: raise ClientError("timeout waiting for a response") I think we need to introduce a Timeout error, otherwise the user cannot tell if the issue was a timeout or other client error. Line 110: Line 111: resp = responses[0] Line 112: if resp.error: Line 113: raise ServerError(resp.error['code'], resp.error['message']) -- To view, visit https://gerrit.ovirt.org/64502 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd45d7e88bf2246beaf30550b12201917f32c354 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit Goihman Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Sivák Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Simone Tiraboschi Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: wip: jsonrpc: introduce new client
Irit Goihman has posted comments on this change. Change subject: wip: jsonrpc: introduce new client .. Patch Set 9: (10 comments) https://gerrit.ovirt.org/#/c/64502/8/lib/vdsm/client.py File lib/vdsm/client.py: Line 17: # Line 18: # Refer to the README and COPYING files for full details of the license Line 19: # Line 20: ''' Line 21: vdsm client > This is not a jsonrpc client (generic client for server using jsonrpc) but Done Line 22: Line 23: This is a simple client which uses jsonrpc protocol introduced on ovirt 3.5. Line 24: This client is not aware of the available methods and parameters. Line 25: Line 26: The user should consult the schema to construct the wanted command. Line 27: Line 28: The client is invoked with: Line 29: Line 30: cli = client.connect(host, port, ssl) > The common way to show code examples is to indent them with 4 spaces, the # Done Line 31: Line 32: For example: Line 33: Line 34: cli = client.connect('localhost', 54321, True) Line 36: Failure will result in ClientError exception. Line 37: Line 38: Invoking commands: Line 39: Line 40: cli.call('Host.getVMList') > Maybe we can make args optional to make it nicer to call methods without ar Done Line 41: Line 42: cli.call('VM.getStats', {'vmID': 'bc26bd11-ee3b-4a56-80d4-770f383a47b9'}) Line 43: Line 44: The call method expects method name and a dictionary (optional) containing all Line 44: The call method expects method name and a dictionary (optional) containing all Line 45: mandatory parameters, as they appear in the schema. Line 46: Line 47: Complex parameters are also supported and share the same behavior. Line 48: > We need to see an example result, and explain about getting the exact resul I will address this comment in the next change Line 49: ''' Line 50: Line 51: Line 52: from __future__ import absolute_import Line 47: Complex parameters are also supported and share the same behavior. Line 48: Line 49: ''' Line 50: Line 51: > One empty line here is enough. Done Line 52: from __future__ import absolute_import Line 53: Line 54: import uuid Line 55: Line 90: self.code = code Line 91: self.message = message Line 92: Line 93: Line 94: class _Client(object): > These should come after the public apis. Done Line 95: def __init__(self, client): Line 96: self._client = client Line 97: self.default_timeout = yajsonrpc.CALL_TIMEOUT Line 98: Line 110: Line 111: resp = responses[0] Line 112: if resp.error: Line 113: raise ServerError(resp.error['code'], resp.error['message']) Line 114: > Let document if we may get here multiple responses, when I see this code I same Line 115: return resp.result Line 116: Line 117: def close(self): Line 118: self._client.close() Line 113: raise ServerError(resp.error['code'], resp.error['message']) Line 114: Line 115: return resp.result Line 116: Line 117: def close(self): > Let keep empty line after raising/returning - the rest of the function is h Done Line 118: self._client.close() Line 119: Line 120: def __enter__(self): Line 121: return self Line 118: self._client.close() Line 119: Line 120: def __enter__(self): Line 121: return self Line 122: > Here is a good place for the context manager interface. Done Line 123: def __exit__(self, t, v, tb): Line 124: try: Line 125: self.close() Line 126: except Exception: Line 120: def __enter__(self): Line 121: return self Line 122: Line 123: def __exit__(self, t, v, tb): Line 124: try: > This and the exceptions are the only public apis, so they should be at the Done Line 125: self.close() Line 126: except Exception: Line 127: if t is None: -- To view, visit https://gerrit.ovirt.org/64502 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd45d7e88bf2246beaf30550b12201917f32c354 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit Goihman Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Sivák Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Simone Tiraboschi Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: wip: jsonrpc: introduce new client
gerrit-hooks has posted comments on this change. Change subject: wip: jsonrpc: introduce new client .. Patch Set 9: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64502 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd45d7e88bf2246beaf30550b12201917f32c354 Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit Goihman Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Sivák Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Simone Tiraboschi Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: wip: jsonrpc: introduce new client
Nir Soffer has posted comments on this change. Change subject: wip: jsonrpc: introduce new client .. Patch Set 8: (12 comments) Much much nicer now. Hopefully we get this this merge quickly, and the use this client to write the command line tool. https://gerrit.ovirt.org/#/c/64502/8/lib/vdsm/client.py File lib/vdsm/client.py: Line 17: # Line 18: # Refer to the README and COPYING files for full details of the license Line 19: # Line 20: ''' Line 21: jsonrpc client This is not a jsonrpc client (generic client for server using jsonrpc) but client for vdsm, so lets client vdsm client. We can mention that this client uses the new jsonrpc protocol introduced in ovirt 3.5. Line 22: Line 23: This is a simple jsonrpc client which is not aware of the available Line 24: methods and parameters. Line 25: Line 26: The user should consult the schema to construct the wanted command. Line 27: Line 28: The client is invoked with: Line 29: Line 30: # cli = client.connect(host, port, ssl) The common way to show code examples is to indent them with 4 spaces, the # prefix is not needed. This format is also markdown and restructedtext format for code block. Line 31: Line 32: For example: Line 33: Line 34: # cli = client.connect('localhost', 54321, True) Line 36: Failure will result in ClientError exception. Line 37: Line 38: Invoking commands: Line 39: Line 40: # cli.call('Host.getVMList', {}) Maybe we can make args optional to make it nicer to call methods without arguments? cli.call('Host.getVMList') cli.call("Host.getStats', {'vmID': 'bc26bd11-ee3b-4a56-80d4-770f383a47b9'}) Line 41: Line 42: # cli.call('VM.getStats', {'vmID'='bc26bd11-ee3b-4a56-80d4-770f383a47b9'}) Line 43: Line 44: The call method expects method name and a dictionary containing all mandatory Line 38: Invoking commands: Line 39: Line 40: # cli.call('Host.getVMList', {}) Line 41: Line 42: # cli.call('VM.getStats', {'vmID'='bc26bd11-ee3b-4a56-80d4-770f383a47b9'}) This is not dictionary syntax Line 43: Line 44: The call method expects method name and a dictionary containing all mandatory Line 45: parameters, as they appear in the schema. Line 46: Line 43: Line 44: The call method expects method name and a dictionary containing all mandatory Line 45: parameters, as they appear in the schema. Line 46: Line 47: Complex parameters are also supported and share the same behavior. This is not very clear, lets show an example request with complex parameters? Line 48: Line 49: ''' Line 50: Line 51: Line 44: The call method expects method name and a dictionary containing all mandatory Line 45: parameters, as they appear in the schema. Line 46: Line 47: Complex parameters are also supported and share the same behavior. Line 48: We need to see an example result, and explain about getting the exact results as the schema specifies. Then we need to show how error are handled, both client errors, (connection refused?) and server errors (no such vm?). Finally we should mention that client must be closed, and show how to use it as context manager: with client.connect(..): ... The documentation is actually the most important thing in this module, we want to make easy to use, no surprises for users. Line 49: ''' Line 50: Line 51: Line 52: from __future__ import absolute_import Line 47: Complex parameters are also supported and share the same behavior. Line 48: Line 49: ''' Line 50: Line 51: One empty line here is enough. Line 52: from __future__ import absolute_import Line 53: Line 54: import uuid Line 55: Line 90: try: Line 91: self.close() Line 92: except Exception: Line 93: if t is None: Line 94: raise These should come after the public apis. Line 95: Line 96: def __init__(self, client): Line 97: self._client = client Line 98: self.default_timeout = yajsonrpc.CALL_TIMEOUT Line 110: Line 111: if not responses: Line 112: raise ClientError("timeout waiting for a response") Line 113: Line 114: resp = responses[0] Let document if we may get here multiple responses, when I see this code I wonder if we never drop some responses... If this should never return multiple responses, maybe add an assert here. Line 115: Line 116: if resp.error: Line 117: raise ServerError(resp.error['code'], resp.error['message']) Line 118: return resp.result Line 113: Line 114: resp = responses[0] Line 115: Line 116: if resp.error: Line 117: raise ServerError(resp.error['code'], resp.error['message']) Let keep empty line after raising/returning - the rest of the function is has lot of whitespace, and on the last line we have no whitespace. Line 118: return resp.result Line 119: Line 120: def close(self): Line 121: self._client.close() Line 118: ret
Change in vdsm[master]: wip: jsonrpc: introduce new client
gerrit-hooks has posted comments on this change. Change subject: wip: jsonrpc: introduce new client .. Patch Set 8: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64502 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd45d7e88bf2246beaf30550b12201917f32c354 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit Goihman Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Sivák Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Simone Tiraboschi Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: wip: jsonrpc: introduce new client
gerrit-hooks has posted comments on this change. Change subject: wip: jsonrpc: introduce new client .. Patch Set 7: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64502 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd45d7e88bf2246beaf30550b12201917f32c354 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit Goihman Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Sivák Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Simone Tiraboschi Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: wip: jsonrpc: introduce new client
gerrit-hooks has posted comments on this change. Change subject: wip: jsonrpc: introduce new client .. Patch Set 6: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64502 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd45d7e88bf2246beaf30550b12201917f32c354 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit Goihman Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Sivák Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Simone Tiraboschi Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: wip: jsonrpc: introduce new client
Irit Goihman has posted comments on this change. Change subject: wip: jsonrpc: introduce new client .. Patch Set 6: (17 comments) https://gerrit.ovirt.org/#/c/64502/4/lib/vdsm/jsonrpcapi.py File lib/vdsm/jsonrpcapi.py: Line 15 Line 16 Line 17 Line 18 Line 19 > How about vdsm.client? Done Line 19 Line 20 Line 21 Line 22 Line 23 > Don't import functions, only modules. This make the dependencies easier to Done Line 25 Line 26 Line 27 Line 28 Line 29 > Better just to import yajsonrpc and use yajsonrpc.Xxx when needed. Done Line 28 Line 29 Line 30 Line 31 Line 32 > Vdsm config may not be avilable. Done Line 31 Line 32 Line 33 Line 34 Line 35 > This is a client, not a server. Done Line 34 Line 35 Line 36 Line 37 Line 38 > You cannot use vdsm configuration here, the library may be used on another Done Line 36 Line 37 Line 38 Line 39 Line 40 > Please avoid using the schema here, we don't want to pay for parsing the sc Done Line 44 Line 45 Line 46 Line 47 Line 48 > We don't need setters like this in python. just make default_timeout public Done Line 57 Line 58 Line 59 Line 60 Line 61 > Can you explain why we need both *args and **kwargs? To send a request we n Done Line 66 Line 67 Line 68 Line 69 Line 70 > Please don't do that, no hidden arguments in kwargs. If you want to support Done Line 70 Line 71 Line 72 Line 73 Line 74 > Use the happy pass idiom: Yes, it means we reached the timeout and got no response. Usually it's because there is an error in the method name/arguments or the basic case in which we lost connection to vdsm. Line 73 Line 74 Line 75 Line 76 Line 77 > You never want to raise Exception, the user of this api cannot do anything Done Line 76 Line 77 Line 78 Line 79 Line 80 > We don't need this. Done Line 82 Line 83 Line 84 Line 85 Line 86 > Or this Done Line 88 Line 89 Line 90 Line 91 Line 92 > Never use __del__. Done Line 96 Line 97 Line 98 Line 99 Line 100 > Do not assume you have vdsm config here. Done Line 99 Line 100 Line 101 Line 102 Line 103 > Same. Done -- To view, visit https://gerrit.ovirt.org/64502 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd45d7e88bf2246beaf30550b12201917f32c354 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit Goihman Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Sivák Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Simone Tiraboschi Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: wip: jsonrpc: introduce new api
gerrit-hooks has posted comments on this change. Change subject: wip: jsonrpc: introduce new api .. Patch Set 5: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64502 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd45d7e88bf2246beaf30550b12201917f32c354 Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit Goihman Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Sivák Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: Simone Tiraboschi Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: wip: jsonrpc: introduce new api
Nir Soffer has posted comments on this change. Change subject: wip: jsonrpc: introduce new api .. Patch Set 4: (19 comments) https://gerrit.ovirt.org/#/c/64502/4/lib/vdsm/jsonrpcapi.py File lib/vdsm/jsonrpcapi.py: Line 15: # along with this program; if not, write to the Free Software Line 16: # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Line 17: # Line 18: # Refer to the README and COPYING files for full details of the license Line 19: # How about vdsm.client? We are not going to switch the protocol again, this was painful enough last time. And jsonrpc is not correct anyway, we are actually using stomp, not jsonrpc. Line 20: Line 21: from __future__ import absolute_import Line 22: Line 23: from uuid import uuid4 Line 19: # Line 20: Line 21: from __future__ import absolute_import Line 22: Line 23: from uuid import uuid4 Don't import functions, only modules. This make the dependencies easier to understand and allow reloading of modules in runtime. Line 24: Line 25: from yajsonrpc import stompreactor Line 26: from yajsonrpc import \ Line 27: JsonRpcRequest, \ Line 21: from __future__ import absolute_import Line 22: Line 23: from uuid import uuid4 Line 24: Line 25: from yajsonrpc import stompreactor This package depends on vdsm, we need to make the client separate from vdsm, it should be a separate standalone package, maybe depending on the api package. We can resolve this issue later, our most important users (hosted-engine, mom) run on the same machine. Line 26: from yajsonrpc import \ Line 27: JsonRpcRequest, \ Line 28: JsonRpcNoResponseError, \ Line 29: CALL_TIMEOUT Line 25: from yajsonrpc import stompreactor Line 26: from yajsonrpc import \ Line 27: JsonRpcRequest, \ Line 28: JsonRpcNoResponseError, \ Line 29: CALL_TIMEOUT Better just to import yajsonrpc and use yajsonrpc.Xxx when needed. Line 30: Line 31: from api import vdsmapi Line 32: from .config import config Line 33: Line 28: JsonRpcNoResponseError, \ Line 29: CALL_TIMEOUT Line 30: Line 31: from api import vdsmapi Line 32: from .config import config Vdsm config may not be avilable. Line 33: Line 34: Line 35: class _Server(object): Line 36: Line 31: from api import vdsmapi Line 32: from .config import config Line 33: Line 34: Line 35: class _Server(object): This is a client, not a server. Line 36: Line 37: def __init__(self, client): Line 38: api_strict_mode = config.getboolean('devel', 'api_strict_mode') Line 39: self._schema = vdsmapi.Schema([vdsmapi.find_schema()], Line 34: Line 35: class _Server(object): Line 36: Line 37: def __init__(self, client): Line 38: api_strict_mode = config.getboolean('devel', 'api_strict_mode') You cannot use vdsm configuration here, the library may be used on another machine (another server, someone laptop), which does not have vdsm installed. Line 39: self._schema = vdsmapi.Schema([vdsmapi.find_schema()], Line 40: api_strict_mode) Line 41: self._client = client Line 42: self._default_timeout = CALL_TIMEOUT Line 36: Line 37: def __init__(self, client): Line 38: api_strict_mode = config.getboolean('devel', 'api_strict_mode') Line 39: self._schema = vdsmapi.Schema([vdsmapi.find_schema()], Line 40: api_strict_mode) Please avoid using the schema here, we don't want to pay for parsing the schema on each client call. Also, this is not needed to have use the client, maybe only when the client is run with --help, or with --verify flag. This library must provide control to the user, not force the shema on all users of the library. Please send a very simple first version, we don't have lot of time for 4.1, and if we waste time on the schema this will not be ready in time and we will have to carry xmlrpc for another version. Line 41: self._client = client Line 42: self._default_timeout = CALL_TIMEOUT Line 43: self._timeouts = { Line 44: 'migrationCreate': config.getint( Line 44: 'migrationCreate': config.getint( Line 45: 'vars', 'migration_create_timeout'), Line 46: } Line 47: Line 48: def set_default_timeout(self, timeout): We don't need setters like this in python. just make default_timeout public attribute. If we need to do handle or control changes, we can convert it to a property. Line 49: self._default_timeout = timeout Line 50: Line 51: def _prepare_args(self, className, methodName, args, kwargs): Line 52: try: Line 57: params = dict(zip(allargs, args)) Line 58: params.update(kwargs) Line 59: return params Line 60: Line 61: def call(self, method, *args, **kwargs): Can you explain why we need both *args and **kwargs? To send a request we need: - The met
Change in vdsm[master]: wip: jsonrpc: introduce new api
gerrit-hooks has posted comments on this change. Change subject: wip: jsonrpc: introduce new api .. Patch Set 4: * update_tracker: OK * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64502 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd45d7e88bf2246beaf30550b12201917f32c354 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: wip: jsonrpc: introduce new api
gerrit-hooks has posted comments on this change. Change subject: wip: jsonrpc: introduce new api .. Patch Set 3: * update_tracker: OK * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64502 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd45d7e88bf2246beaf30550b12201917f32c354 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: wip: jsonrpc: introduce new client
gerrit-hooks has posted comments on this change. Change subject: wip: jsonrpc: introduce new client .. Patch Set 2: * update_tracker: OK * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64502 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd45d7e88bf2246beaf30550b12201917f32c354 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: wip: jsonrpc: introduce new cli
Irit Goihman has uploaded a new change for review. Change subject: wip: jsonrpc: introduce new cli .. wip: jsonrpc: introduce new cli Change-Id: Idd45d7e88bf2246beaf30550b12201917f32c354 Signed-off-by: Irit goihman --- M lib/vdsm/Makefile.am A lib/vdsm/jsonrpccli.py M vdsm.spec.in 3 files changed, 200 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/02/64502/1 diff --git a/lib/vdsm/Makefile.am b/lib/vdsm/Makefile.am index d248d30..1022380 100644 --- a/lib/vdsm/Makefile.am +++ b/lib/vdsm/Makefile.am @@ -35,6 +35,7 @@ hooks.py \ hostdev.py \ jobs.py \ + jsonrpccli.py \ jsonrpcvdscli.py \ kaxmlrpclib.py \ libvirtconnection.py \ diff --git a/lib/vdsm/jsonrpccli.py b/lib/vdsm/jsonrpccli.py new file mode 100644 index 000..13d4d55 --- /dev/null +++ b/lib/vdsm/jsonrpccli.py @@ -0,0 +1,198 @@ +# +# Copyright 2016 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +# Refer to the README and COPYING files for full details of the license +# + +from __future__ import absolute_import + +from functools import partial +from uuid import uuid4 + +from yajsonrpc import stompreactor +from yajsonrpc import \ +JsonRpcRequest, \ +JsonRpcNoResponseError, \ +CALL_TIMEOUT + +from api import vdsmapi +from .config import config + + +_COMMAND_CONVERTER = { +'activateStorageDomain': 'StorageDomain.activate', +'connectStoragePool': 'StoragePool.connect', +'connectStorageServer': 'StoragePool.connectStorageServer', +'cont': 'VM.cont', +'clearTask': 'Task.clear', +'create': 'VM.create', +'createStorageDomain': 'StorageDomain.create', +'createStoragePool': 'StoragePool.create', +'createVG': 'LVMVolumeGroup.create', +'createVolume': 'Volume.create', +'destroy': 'VM.destroy', +'destroyStoragePool': 'StoragePool.destroy', +'detachStorageDomain': 'StorageDomain.detach', +'disconnectStoragePool': 'StoragePool.disconnect', +'disconnectStorageServer': 'StoragePool.disconnectStorageServer', +'discoverSendTargets': 'ISCSIConnection.discoverSendTargets', +'extendVolumeSize': 'Volume.extendSize', +'formatStorageDomain': 'StorageDomain.format', +'fullList': 'Host.getVMFullList', +'getAllTasksInfo': 'Host.getAllTasksInfo', +'getAllTasksStatuses': 'Host.getAllTasksStatuses', +'getAllVmStats': 'Host.getAllVmStats', +'getConnectedStoragePoolsList': 'Host.getConnectedStoragePools', +'getDeviceList': 'Host.getDeviceList', +'getImagesList': 'StorageDomain.getImages', +'getIoTunePolicy': 'VM.getIoTunePolicy', +'getIoTune': 'VM.getIoTune', +'getSpmStatus': 'StoragePool.getSpmStatus', +'getStorageDomainInfo': 'StorageDomain.getInfo', +'getStorageDomainsList': 'Host.getStorageDomains', +'getStorageDomainStats': 'StorageDomain.getStats', +'getStoragePoolInfo': 'StoragePool.getInfo', +'getTaskInfo': 'Task.getInfo', +'getTaskStatus': 'Task.getStatus', +'getVdsCapabilities': 'Host.getCapabilities', +'getVdsHardwareInfo': 'Host.getHardwareInfo', +'getVdsStats': 'Host.getStats', +'getVGInfo': 'LVMVolumeGroup.getInfo', +'getVolumeInfo': 'Volume.getInfo', +'getVmStats': 'VM.getStats', +'getVolumeSize': 'Volume.getSize', +'getVolumesList': 'StorageDomain.getVolumes', +'glusterTasksList': 'GlusterTask.list', +'glusterVolumeCreate': 'GlusterVolume.create', +'glusterVolumeSet': 'GlusterVolume.set', +'glusterVolumesList': 'GlusterVolume.list', +'glusterVolumeStart': 'GlusterVolume.start', +'glusterTasksList': 'GlusterTask.list', +'hotplugDisk': 'VM.hotplugDisk', +'hotplugNic': 'VM.hotplugNic', +'hotunplugDisk': 'VM.hotunplugDisk', +'hotunplugNic': 'VM.hotunplugNic', +'list': 'Host.getVMList', +'migrate': 'VM.migrate', +'migrateStatus': 'VM.getMigrationStatus', +'migrationCreate': 'VM.migrationCreate', +'ping': 'Host.ping', +'prepareImage': 'Image.prepare', +'repoStats': 'Host.getStorageRepoStats', +'setBalloonTarget': 'VM.setBalloonTarget', +'setCpuTunePeriod': 'VM.setCpuTunePeriod', +'setCpuTuneQuota': 'VM.setCpuTuneQuota', +'setKsmTune': 'Host.setKsmTune', +'setMOMPoli
Change in vdsm[master]: wip: jsonrpc: introduce new cli
gerrit-hooks has posted comments on this change. Change subject: wip: jsonrpc: introduce new cli .. Patch Set 1: * update_tracker: OK * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64502 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd45d7e88bf2246beaf30550b12201917f32c354 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit Goihman Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: WIP benchmark decorator module speed
gerrit-hooks has posted comments on this change. Change subject: WIP benchmark decorator module speed .. Patch Set 8: * update_tracker: OK * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/63833 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id619702a42a37150fb6772790430f70a259ab2b6 Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: WIP: add helper to enforce the `common` rules
gerrit-hooks has posted comments on this change. Change subject: WIP: add helper to enforce the `common` rules .. Patch Set 9: * update_tracker: OK * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/63925 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic6f7f374240c8ed379a874cf2324fa4b3b15feaa Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: WIP: API: more cleanups
gerrit-hooks has posted comments on this change. Change subject: WIP: API: more cleanups .. Patch Set 17: * update_tracker: OK * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61591 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I07cca8d3e6ee56c0e190e884410074431221371d Gerrit-PatchSet: 17 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: **WIP** metrics: periodic: add periodic uploader
gerrit-hooks has posted comments on this change. Change subject: **WIP** metrics: periodic: add periodic uploader .. Patch Set 1: * update_tracker: OK -- To view, visit https://gerrit.ovirt.org/61107 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I9053f3c5fb65736f25c3f5016fe004a8ac7246e6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: **WIP** metrics: periodic: add periodic uploader
Francesco Romani has abandoned this change. Change subject: **WIP** metrics: periodic: add periodic uploader .. Abandoned -- To view, visit https://gerrit.ovirt.org/61107 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I9053f3c5fb65736f25c3f5016fe004a8ac7246e6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: **WIP** metrics: periodic: add periodic uploader
Francesco Romani has uploaded a new change for review. Change subject: **WIP** metrics: periodic: add periodic uploader .. **WIP** metrics: periodic: add periodic uploader **WIP** Proof of concept to demonstrate an alternative approach. Not ready for review, let alone merge. Change-Id: I9053f3c5fb65736f25c3f5016fe004a8ac7246e6 Signed-off-by: Francesco Romani --- M lib/vdsm/config.py.in M lib/vdsm/virt/periodic.py M lib/vdsm/virt/sampling.py M lib/vdsm/virt/vmstats.py 4 files changed, 53 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/07/61107/1 diff --git a/lib/vdsm/config.py.in b/lib/vdsm/config.py.in index 1ccb3f0..8ecc731 100644 --- a/lib/vdsm/config.py.in +++ b/lib/vdsm/config.py.in @@ -451,6 +451,10 @@ 'Number of metrics messages to queue if collector is not' ' responsive. When the queue is full, oldest messages are' ' dropped. Used only by hawkular-client collector (default 100)'), + +('update_interval', '15', +'Number of seconds to wait before sending new metrics to' +' the collector.'), ]), # Section: [devel] diff --git a/lib/vdsm/virt/periodic.py b/lib/vdsm/virt/periodic.py index 19ae7aa..4af7a4a 100644 --- a/lib/vdsm/virt/periodic.py +++ b/lib/vdsm/virt/periodic.py @@ -34,6 +34,7 @@ from vdsm.config import config from vdsm.virt import sampling from vdsm.virt import virdomain +from vdsm.virt import vmstats from vdsm.virt import vmstatus @@ -108,8 +109,14 @@ Operation( sampling.HostMonitor(cif=cif), config.getint('vars', 'host_sample_stats_interval'), -scheduler) +scheduler), +Operation( +vmstats.MetricsUploader( +cif.getVms, +sampling.stats_cache), +config.getint('metrics', 'update_interval'), +scheduler), ] host.stats.start() diff --git a/lib/vdsm/virt/sampling.py b/lib/vdsm/virt/sampling.py index 4cfd3b1..ef493f0 100644 --- a/lib/vdsm/virt/sampling.py +++ b/lib/vdsm/virt/sampling.py @@ -427,6 +427,28 @@ return StatsSample(first_sample, last_sample, interval, stats_age) +def get_batch(self, vm_ids): +""" +WRITEME +""" +with self._lock: +first_batch, last_batch, interval = self._samples.stats() + +if first_batch is None: +return [] + +ts = self._clock() +return { +vm_id:StatsSample( +first_batch[vm_id], last_batch[vm_id], interval, +ts - self._vm_last_timestamp[vm_id] +) +for vm_id in last_batch +if (vm_id in vm_ids and +vm_id in first_batch and +vm_id in self._vm_last_timestamp) +} + def clock(self): """ Provide timestamp compatible with what put() expects diff --git a/lib/vdsm/virt/vmstats.py b/lib/vdsm/virt/vmstats.py index 177e2a9..1b989b0 100644 --- a/lib/vdsm/virt/vmstats.py +++ b/lib/vdsm/virt/vmstats.py @@ -445,3 +445,22 @@ pass else: raise + + +class MetricsUploader(object): +def __init__(self, get_vms, stats_cache): +self._get_vms = get_vms +self._stats_cache = stats_cache +self._log = logging.getLogger("virt.sampling.MetricsUploader") + +def __call__(self): +vms = self._get_vms() +vm_samples = self._stats_cache.get_batch(set(vms.keys())) +metrics_data = [ +produce(vms[vm_id], +vm_sample.first_value, +vm_sample.last_value, +vm_sample.interval) +for vm_id, vm_sample in vm_samples.items() +] +report_stats(metrics_data) -- To view, visit https://gerrit.ovirt.org/61107 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9053f3c5fb65736f25c3f5016fe004a8ac7246e6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemuimg commit
Nir Soffer has posted comments on this change. Change subject: [WIP] core: Expose API for qemuimg commit .. Patch Set 4: (1 comment) https://gerrit.ovirt.org/#/c/64222/4/lib/vdsm/qemuimg.py File lib/vdsm/qemuimg.py: Line 197: # If base volume is not provided, qemuimg commit will empty the top Line 198: # volume after the operation has succeeded. Providing '-d' option Line 199: # will cause qemuimg commit not to empty the top volume. Note that Line 200: # if a backing chain is provided, i.e. a base volume is provided, Line 201: # '-d' is always implied. This comment is repeating what we can read in the manual twice. What is missing here and is more important, is why we don't want to empty the image - we may need to wipe the top volume before deleting it, and emptying it may leave the data on the the underlying storage (qemu probably mark sectors as zero instead of wiping the data). Line 202: cmd.append("-d") Line 203: Line 204: if topFormat: Line 205: cmd.extend(("-f", str(topFormat))) -- To view, visit https://gerrit.ovirt.org/64222 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7a13be40541fb268541bd8614a642263b96b487 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemuimg commit
Nir Soffer has posted comments on this change. Change subject: [WIP] core: Expose API for qemuimg commit .. Patch Set 4: (2 comments) https://gerrit.ovirt.org/#/c/64222/4/tests/qemuimg_test.py File tests/qemuimg_test.py: Line 332: self.assertEquals(p.finished, True) Line 333: Line 334: Line 335: @expandPermutations Line 336: class TestCommit(TestCaseBase): Add test for progress - testing chain with two empty images without writing any pattern, and check that op.progress is 100.0 when operation is completed. Line 337: Line 338: @MonkeyPatch(qemuimg, 'config', CONFIG) Line 339: def test_write_and_verify(self): Line 340: with namedTemporaryDir() as tmpdir: Line 370: qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '0', 0xf2) Line 371: qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '512', 0xf1) Line 372: Line 373: @MonkeyPatch(qemuimg, 'config', CONFIG) Line 374: def test_commit_backing_chain(self): Maybe test_commit_internal? Line 375: with namedTemporaryDir() as tmpdir: Line 376: base = os.path.join(tmpdir, 'base.img') Line 377: internal = os.path.join(tmpdir, 'internal.img') Line 378: top = os.path.join(tmpdir, 'top.img') -- To view, visit https://gerrit.ovirt.org/64222 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7a13be40541fb268541bd8614a642263b96b487 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemuimg commit
Nir Soffer has posted comments on this change. Change subject: [WIP] core: Expose API for qemuimg commit .. Patch Set 4: (1 comment) https://gerrit.ovirt.org/#/c/64222/4/tests/qemuimg_test.py File tests/qemuimg_test.py: Line 363: op = qemuimg.commit(top) Line 364: op.wait_for_completion() Line 365: Line 366: # top should not change after commit Line 367: qemu_pattern_verify(top, qemuimg.FORMAT.RAW, '0', 0xf1) > Issues: This actually tests nothing, since top will show the data from base even if it was empty. We can verify that top size did not change after the operation. Line 368: Line 369: # base now should include original data and top's data Line 370: qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '0', 0xf2) Line 371: qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '512', 0xf1) -- To view, visit https://gerrit.ovirt.org/64222 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7a13be40541fb268541bd8614a642263b96b487 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemuimg commit
Nir Soffer has posted comments on this change. Change subject: [WIP] core: Expose API for qemuimg commit .. Patch Set 4: (1 comment) https://gerrit.ovirt.org/#/c/64222/4/tests/qemuimg_test.py File tests/qemuimg_test.py: Line 347: Line 348: Line 349: @MonkeyPatch(qemuimg, 'config', CONFIG) Line 350: @permutations(((qemuimg.FORMAT.RAW,), (qemuimg.FORMAT.QCOW2,))) Line 351: def test_commit(self, baseFormat): Use only lower_case names - in the module api we want to be consistent with the old apis, but in the tests we are free to use new vdsm style. Line 352: with namedTemporaryDir() as tmpdir: Line 353: base = os.path.join(tmpdir, 'base.img') Line 354: top = os.path.join(tmpdir, 'top.img') Line 355: size = 1048576 -- To view, visit https://gerrit.ovirt.org/64222 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7a13be40541fb268541bd8614a642263b96b487 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemuimg commit
Nir Soffer has posted comments on this change. Change subject: [WIP] core: Expose API for qemuimg commit .. Patch Set 4: (1 comment) https://gerrit.ovirt.org/#/c/64222/4/tests/qemuimg_test.py File tests/qemuimg_test.py: Line 334: Line 335: @expandPermutations Line 336: class TestCommit(TestCaseBase): Line 337: Line 338: @MonkeyPatch(qemuimg, 'config', CONFIG) This class does not care about the qcow_compat, so we don't need to monkeypatch the config. Line 339: def test_write_and_verify(self): Line 340: with namedTemporaryDir() as tmpdir: Line 341: base = os.path.join(tmpdir, 'base.img') Line 342: size = 1048576 -- To view, visit https://gerrit.ovirt.org/64222 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7a13be40541fb268541bd8614a642263b96b487 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemuimg commit
Nir Soffer has posted comments on this change. Change subject: [WIP] core: Expose API for qemuimg commit .. Patch Set 4: (3 comments) https://gerrit.ovirt.org/#/c/64222/4/tests/qemuimg_test.py File tests/qemuimg_test.py: Line 380: Line 381: qemuimg.create(base, size=size, format=qemuimg.FORMAT.RAW) Line 382: qemu_pattern_write(base, qemuimg.FORMAT.RAW, '0', 0xf0) Line 383: Line 384: qemuimg.create(internal, size=size, format=qemuimg.FORMAT.QCOW2, size is not needed when creating image with backing chain. Line 385:backing=base) Line 386: qemu_pattern_write(internal, qemuimg.FORMAT.QCOW2, '512', 0xf1) Line 387: Line 388: qemuimg.create(top, format=qemuimg.FORMAT.QCOW2, backing=internal) Line 385:backing=base) Line 386: qemu_pattern_write(internal, qemuimg.FORMAT.QCOW2, '512', 0xf1) Line 387: Line 388: qemuimg.create(top, format=qemuimg.FORMAT.QCOW2, backing=internal) Line 389: qemu_pattern_write(top, qemuimg.FORMAT.QCOW2, '800', 0xf2) Use same offsets and patterns as in the previous test : - base: 0-1k, 0xf0 - internal: 1k-2k, 0xf1 - top: 2k-3k, 0xf2 Line 390: Line 391: op = qemuimg.commit(top, base=base) Line 392: op.wait_for_completion() Line 393: Line 396: Line 397: # base now should include original data and top's data Line 398: qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '0', 0xf2) Line 399: qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '512', 0xf1) Line 400: qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '800', 0xf2) Use kwargs and same offsets. -- To view, visit https://gerrit.ovirt.org/64222 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7a13be40541fb268541bd8614a642263b96b487 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemuimg commit
Nir Soffer has posted comments on this change. Change subject: [WIP] core: Expose API for qemuimg commit .. Patch Set 4: (2 comments) https://gerrit.ovirt.org/#/c/64222/4/tests/qemuimg_test.py File tests/qemuimg_test.py: Line 363: op = qemuimg.commit(top) Line 364: op.wait_for_completion() Line 365: Line 366: # top should not change after commit Line 367: qemu_pattern_verify(top, qemuimg.FORMAT.RAW, '0', 0xf1) Issues: - Top always use qemuimg.FORMAT.QCOW2 - Use kwargs - 0xf1 is the length in this call, so the verification is incorrect Line 368: Line 369: # base now should include original data and top's data Line 370: qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '0', 0xf2) Line 371: qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '512', 0xf1) Line 367: qemu_pattern_verify(top, qemuimg.FORMAT.RAW, '0', 0xf1) Line 368: Line 369: # base now should include original data and top's data Line 370: qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '0', 0xf2) Line 371: qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '512', 0xf1) Issues: - Both call must use baseFormat - Use offset and len in 1k units - The pattern should be 0xf0 for the first 1k and 0xf1 for the second 1k. Line 372: Line 373: @MonkeyPatch(qemuimg, 'config', CONFIG) Line 374: def test_commit_backing_chain(self): Line 375: with namedTemporaryDir() as tmpdir: -- To view, visit https://gerrit.ovirt.org/64222 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7a13be40541fb268541bd8614a642263b96b487 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemuimg commit
Nir Soffer has posted comments on this change. Change subject: [WIP] core: Expose API for qemuimg commit .. Patch Set 4: (2 comments) https://gerrit.ovirt.org/#/c/64222/4/tests/qemuimg_test.py File tests/qemuimg_test.py: Line 338: @MonkeyPatch(qemuimg, 'config', CONFIG) Line 339: def test_write_and_verify(self): Line 340: with namedTemporaryDir() as tmpdir: Line 341: base = os.path.join(tmpdir, 'base.img') Line 342: size = 1048576 We don't need this variable, just inline the value bellow. Line 343: Line 344: qemuimg.create(base, size=size, format=qemuimg.FORMAT.RAW) Line 345: qemu_pattern_write(base, qemuimg.FORMAT.RAW, '0') Line 346: qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '0', 0xf1) Line 340: with namedTemporaryDir() as tmpdir: Line 341: base = os.path.join(tmpdir, 'base.img') Line 342: size = 1048576 Line 343: Line 344: qemuimg.create(base, size=size, format=qemuimg.FORMAT.RAW) size=10485576 is fine. Line 345: qemu_pattern_write(base, qemuimg.FORMAT.RAW, '0') Line 346: qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '0', 0xf1) Line 347: Line 348: -- To view, visit https://gerrit.ovirt.org/64222 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7a13be40541fb268541bd8614a642263b96b487 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemuimg commit
Nir Soffer has posted comments on this change. Change subject: [WIP] core: Expose API for qemuimg commit .. Patch Set 4: (1 comment) https://gerrit.ovirt.org/#/c/64222/4/tests/qemuimg_test.py File tests/qemuimg_test.py: Line 369: # base now should include original data and top's data Line 370: qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '0', 0xf2) Line 371: qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '512', 0xf1) Line 372: Line 373: @MonkeyPatch(qemuimg, 'config', CONFIG) Running this with both raw and qcow base can be useful to detect qemu-img regression, and cost almost nothing. Line 374: def test_commit_backing_chain(self): Line 375: with namedTemporaryDir() as tmpdir: Line 376: base = os.path.join(tmpdir, 'base.img') Line 377: internal = os.path.join(tmpdir, 'internal.img') -- To view, visit https://gerrit.ovirt.org/64222 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7a13be40541fb268541bd8614a642263b96b487 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemuimg commit
Nir Soffer has posted comments on this change. Change subject: [WIP] core: Expose API for qemuimg commit .. Patch Set 4: (1 comment) https://gerrit.ovirt.org/#/c/64222/4/lib/vdsm/qemuimg.py File lib/vdsm/qemuimg.py: Line 184: Line 185: return QemuImgOperation(cmd, cwd=cwdPath) Line 186: Line 187: Line 188: def commit(top, topFormat=None, base=None): > We should require topFormat, more secure to never let qemu detect the forma I think topFormat should be baseFormat. qemu-img does not specify what is the -f fmt argument, but it cannot be the top format since the top must be qcow image to be a "top" image. Since qemu allow fmt as optional parameter, lest keep it as optional. This is also more consistent with other functions in this module. Line 189: cmd = [_qemuimg.cmd, "commit", "-p"] Line 190: cwdir = None Line 191: Line 192: if base: -- To view, visit https://gerrit.ovirt.org/64222 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7a13be40541fb268541bd8614a642263b96b487 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemuimg commit
Nir Soffer has posted comments on this change. Change subject: [WIP] core: Expose API for qemuimg commit .. Patch Set 4: (2 comments) https://gerrit.ovirt.org/#/c/64222/4/tests/qemuimg_test.py File tests/qemuimg_test.py: Line 342: size = 1048576 Line 343: Line 344: qemuimg.create(base, size=size, format=qemuimg.FORMAT.RAW) Line 345: qemu_pattern_write(base, qemuimg.FORMAT.RAW, '0') Line 346: qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '0', 0xf1) This is broken because 0xf1 is not the pattern but the length. Please use call kwargs using key=value - for example: qemu_pattern_write(base, qemuimg.FORMAT.RAW, offset='0', len='1k', pattern=0xf0) Line 347: Line 348: Line 349: @MonkeyPatch(qemuimg, 'config', CONFIG) Line 350: @permutations(((qemuimg.FORMAT.RAW,), (qemuimg.FORMAT.QCOW2,))) Line 349: @MonkeyPatch(qemuimg, 'config', CONFIG) Line 350: @permutations(((qemuimg.FORMAT.RAW,), (qemuimg.FORMAT.QCOW2,))) Line 351: def test_commit(self, baseFormat): Line 352: with namedTemporaryDir() as tmpdir: Line 353: base = os.path.join(tmpdir, 'base.img') Lets move all the operations together for each volume: base = ... qemuimg.create(base, ...) qemu_pattern_write(base, ...) Then we probably can move this into a little helper: def make_image(path, size, format, index, backing=None): qemuimg.create(path, size=size, format=format, backing=backing) qemu_pattern_write(path, format, offset="%dk" % index, len='1k', 0xf0 + index) This will make the test much easier to get wrong, image always have data at the correct offset with the correct pattern. Line 354: top = os.path.join(tmpdir, 'top.img') Line 355: size = 1048576 Line 356: Line 357: qemuimg.create(base, size=size, format=baseFormat) -- To view, visit https://gerrit.ovirt.org/64222 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7a13be40541fb268541bd8614a642263b96b487 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemuimg commit
Nir Soffer has posted comments on this change. Change subject: [WIP] core: Expose API for qemuimg commit .. Patch Set 4: (5 comments) https://gerrit.ovirt.org/#/c/64222/4/lib/vdsm/qemuimg.py File lib/vdsm/qemuimg.py: Line 184: Line 185: return QemuImgOperation(cmd, cwd=cwdPath) Line 186: Line 187: Line 188: def commit(top, topFormat=None, base=None): We should require topFormat, more secure to never let qemu detect the format. Line 189: cmd = [_qemuimg.cmd, "commit", "-p"] Line 190: cwdir = None Line 191: Line 192: if base: Line 185: return QemuImgOperation(cmd, cwd=cwdPath) Line 186: Line 187: Line 188: def commit(top, topFormat=None, base=None): Line 189: cmd = [_qemuimg.cmd, "commit", "-p"] Add -t none. Line 190: cwdir = None Line 191: Line 192: if base: Line 193: cmd.extend(("-b", base)) Line 186: Line 187: Line 188: def commit(top, topFormat=None, base=None): Line 189: cmd = [_qemuimg.cmd, "commit", "-p"] Line 190: cwdir = None workdir? Line 191: Line 192: if base: Line 193: cmd.extend(("-b", base)) Line 194: if not os.path.isabs(base): Line 191: Line 192: if base: Line 193: cmd.extend(("-b", base)) Line 194: if not os.path.isabs(base): Line 195: cwdir = cwdPath = os.path.dirname(base) Lets always use workdir, to simplify the code. Line 196: else: Line 197: # If base volume is not provided, qemuimg commit will empty the top Line 198: # volume after the operation has succeeded. Providing '-d' option Line 199: # will cause qemuimg commit not to empty the top volume. Note that Line 201: # '-d' is always implied. Line 202: cmd.append("-d") Line 203: Line 204: if topFormat: Line 205: cmd.extend(("-f", str(topFormat))) str not needed Line 206: Line 207: cmd.append(top) Line 208: Line 209: return QemuImgOperation(cmd, cwd=cwdir) -- To view, visit https://gerrit.ovirt.org/64222 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7a13be40541fb268541bd8614a642263b96b487 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemuimg commit
gerrit-hooks has posted comments on this change. Change subject: [WIP] core: Expose API for qemuimg commit .. Patch Set 4: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64222 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7a13be40541fb268541bd8614a642263b96b487 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: **WIP** tool: reconfigure containers networks
gerrit-hooks has posted comments on this change. Change subject: **WIP** tool: reconfigure containers networks .. Patch Set 16: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/60918 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6053e283c004cd61ba7727cea22ba73a631180ba Gerrit-PatchSet: 16 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemuimg commit
gerrit-hooks has posted comments on this change. Change subject: [WIP] core: Expose API for qemuimg commit .. Patch Set 3: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64222 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7a13be40541fb268541bd8614a642263b96b487 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemu-img commit
Nir Soffer has posted comments on this change. Change subject: [WIP] core: Expose API for qemu-img commit .. Patch Set 2: (6 comments) Great work! https://gerrit.ovirt.org/#/c/64222/2//COMMIT_MSG Commit Message: Line 3: AuthorDate: 2016-09-20 20:30:58 +0300 Line 4: Commit: Ala Hino Line 5: CommitDate: 2016-09-20 20:36:48 +0300 Line 6: Line 7: [WIP] core: Expose API for qemu-img commit Use qemuimg: ... Line 8: Line 9: Change-Id: If7a13be40541fb268541bd8614a642263b96b487 https://gerrit.ovirt.org/#/c/64222/2/lib/vdsm/qemuimg.py File lib/vdsm/qemuimg.py: Line 185: return QemuImgOperation(cmd, cwd=cwdPath) Line 186: Line 187: Line 188: def commit(top, base=None): Line 189: cmd = [_qemuimg.cmd, "commit", "-p"] We should also use -t none like we use in convert, and if possible, also -T none. This use directio, avoiding spamming the page cache with data from the image, and also safer since the page cache may not be correct if another host was writing to the same image before. Line 190: if base: Line 191: cmd.extend(("-b", base)) Line 192: else: Line 193: cmd.append("-d") Line 188: def commit(top, base=None): Line 189: cmd = [_qemuimg.cmd, "commit", "-p"] Line 190: if base: Line 191: cmd.extend(("-b", base)) Line 192: else: Please explain why -d is needed, the code is very clear about adding it when base is not specified, but we need to know why. I see the patch - "removed unneeded -d option (works for me)". Line 193: cmd.append("-d") Line 194: Line 195: return QemuImgOperation(cmd) Line 196: Line 189: cmd = [_qemuimg.cmd, "commit", "-p"] Line 190: if base: Line 191: cmd.extend(("-b", base)) Line 192: else: Line 193: cmd.append("-d") We must use -f to enforce the format in the metadata. Letting qemu detect the format is a security issue. Line 194: Line 195: return QemuImgOperation(cmd) Line 196: Line 197: Line 190: if base: Line 191: cmd.extend(("-b", base)) Line 192: else: Line 193: cmd.append("-d") Line 194: Appending top the command will increase the chance for successful commit. Line 195: return QemuImgOperation(cmd) Line 196: Line 197: Line 198: class QemuImgOperation(object): Line 191: cmd.extend(("-b", base)) Line 192: else: Line 193: cmd.append("-d") Line 194: Line 195: return QemuImgOperation(cmd) I think we must change the working directory to the image directory as we do in convert() - we need the same logic, maybe we should move the code to a little helper (in another patch before this one). Line 196: Line 197: Line 198: class QemuImgOperation(object): Line 199: REGEXPR = re.compile(r'\s*\(([\d.]+)/100%\)\s*') -- To view, visit https://gerrit.ovirt.org/64222 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7a13be40541fb268541bd8614a642263b96b487 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: Yes ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemu-img commit
gerrit-hooks has posted comments on this change. Change subject: [WIP] core: Expose API for qemu-img commit .. Patch Set 2: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64222 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7a13be40541fb268541bd8614a642263b96b487 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemu-img commit
gerrit-hooks has posted comments on this change. Change subject: [WIP] core: Expose API for qemu-img commit .. Patch Set 1: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/64222 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If7a13be40541fb268541bd8614a642263b96b487 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP] core: Expose API for qemu-img commit
Ala Hino has uploaded a new change for review. Change subject: [WIP] core: Expose API for qemu-img commit .. [WIP] core: Expose API for qemu-img commit Change-Id: If7a13be40541fb268541bd8614a642263b96b487 Signed-off-by: Ala Hino --- M lib/vdsm/qemuimg.py M tests/qemuimg_test.py 2 files changed, 35 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/22/64222/1 diff --git a/lib/vdsm/qemuimg.py b/lib/vdsm/qemuimg.py index 61ebec3..4ad7073 100644 --- a/lib/vdsm/qemuimg.py +++ b/lib/vdsm/qemuimg.py @@ -185,6 +185,16 @@ return QemuImgOperation(cmd, cwd=cwdPath) +def commit(top, base=None): +cmd = [_qemuimg.cmd, "commit", "-p"] +if base: +cmd.extend(("-b", base)) +else: +cmd.append("-d") + +return QemuImgOperation(cmd) + + class QemuImgOperation(object): REGEXPR = re.compile(r'\s*\(([\d.]+)/100%\)\s*') diff --git a/tests/qemuimg_test.py b/tests/qemuimg_test.py index d7d9fab..3fd97ea 100644 --- a/tests/qemuimg_test.py +++ b/tests/qemuimg_test.py @@ -23,6 +23,7 @@ from functools import partial from monkeypatch import MonkeyPatch, MonkeyPatchScope +from storagetestlib import qemu_pattern_write, qemu_pattern_verify from testlib import VdsmTestCase as TestCaseBase from testlib import permutations, expandPermutations from testlib import make_config @@ -329,3 +330,27 @@ p.poll() self.assertEquals(p.finished, True) + +class TestCommit(TestCaseBase): + +@MonkeyPatch(qemuimg, 'config', CONFIG) +def test_commit(self): +with namedTemporaryDir() as tmpdir: +base = os.path.join(tmpdir, 'base.img') +top = os.path.join(tmpdir, 'top.img') +size = 1048576 +qemuimg.create(base, size=size, format=qemuimg.FORMAT.RAW) +qemu_pattern_write(base, qemuimg.FORMAT.RAW, '0', 0xf0) + +qemuimg.create(top, format=qemuimg.FORMAT.QCOW2, backing=base) +qemu_pattern_write(top, qemuimg.FORMAT.QCOW2, '1024', 0xf1) + +op = qemuimg.commit(top=top) +op.wait_for_completion() + +# top should not change after commit +qemu_pattern_verify(top, qemuimg.FORMAT.RAW, '0', 0xf1) + +# base now should include original data and top's data +qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '0', 0xf0) +qemu_pattern_verify(base, qemuimg.FORMAT.RAW, '1024', 0xf1) -- To view, visit https://gerrit.ovirt.org/64222 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If7a13be40541fb268541bd8614a642263b96b487 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Ala Hino ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [wip] build: assumptions about the path do not work for dist...
Piotr Kliczewski has posted comments on this change. Change subject: [wip] build: assumptions about the path do not work for distcheck .. Patch Set 1: After rebase this patch is not needed anymore. There are new issues that I noticed in vdsm/static dir. Deleting this change. -- To view, visit https://gerrit.ovirt.org/52508 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If396ce1d8e2b4ce487c56044974ea71fa15e994f Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr Kliczewski Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Sandro Bonazzola Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: WIP: add helper to enforce the `common` rules
gerrit-hooks has posted comments on this change. Change subject: WIP: add helper to enforce the `common` rules .. Patch Set 8: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/63925 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic6f7f374240c8ed379a874cf2324fa4b3b15feaa Gerrit-PatchSet: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: WIP: API: more cleanups
gerrit-hooks has posted comments on this change. Change subject: WIP: API: more cleanups .. Patch Set 16: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61591 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I07cca8d3e6ee56c0e190e884410074431221371d Gerrit-PatchSet: 16 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: WIP benchmark decorator module speed
gerrit-hooks has posted comments on this change. Change subject: WIP benchmark decorator module speed .. Patch Set 7: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/63833 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id619702a42a37150fb6772790430f70a259ab2b6 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [wip] build: assumptions about the path do not work for dist...
Piotr Kliczewski has posted comments on this change. Change subject: [wip] build: assumptions about the path do not work for distcheck .. Patch Set 1: sure -- To view, visit https://gerrit.ovirt.org/52508 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If396ce1d8e2b4ce487c56044974ea71fa15e994f Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr Kliczewski Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Sandro Bonazzola Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: **WIP** tool: reconfigure containers networks
gerrit-hooks has posted comments on this change. Change subject: **WIP** tool: reconfigure containers networks .. Patch Set 15: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/60918 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6053e283c004cd61ba7727cea22ba73a631180ba Gerrit-PatchSet: 15 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: **WIP** tool: reconfigure containers networks
gerrit-hooks has posted comments on this change. Change subject: **WIP** tool: reconfigure containers networks .. Patch Set 14: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/60918 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6053e283c004cd61ba7727cea22ba73a631180ba Gerrit-PatchSet: 14 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: WIP: add helper to enforce the `common` rules
gerrit-hooks has posted comments on this change. Change subject: WIP: add helper to enforce the `common` rules .. Patch Set 7: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/63925 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic6f7f374240c8ed379a874cf2324fa4b3b15feaa Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: WIP benchmark decorator module speed
gerrit-hooks has posted comments on this change. Change subject: WIP benchmark decorator module speed .. Patch Set 6: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/63833 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id619702a42a37150fb6772790430f70a259ab2b6 Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: WIP: API: more cleanups
gerrit-hooks has posted comments on this change. Change subject: WIP: API: more cleanups .. Patch Set 15: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/61591 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I07cca8d3e6ee56c0e190e884410074431221371d Gerrit-PatchSet: 15 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP]fencenode: split fenceNode into its own module
Dan Kenigsberg has abandoned this change. Change subject: [WIP]fencenode: split fenceNode into its own module .. Abandoned On Sun, Sep 18, 2016 at 09:32:19AM +0300, Yaniv Bronheim wrote: > Hi Dan, please abandon this patch -- To view, visit https://gerrit.ovirt.org/43597 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I7bd5e7246cf6da21e355849014a8fc71d5edbde6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Oved Ourfali Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [WIP]fencenode: split fenceNode into its own module
gerrit-hooks has posted comments on this change. Change subject: [WIP]fencenode: split fenceNode into its own module .. Patch Set 1: * Update tracker: IGNORE, no Bug-Url found -- To view, visit https://gerrit.ovirt.org/43597 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I7bd5e7246cf6da21e355849014a8fc71d5edbde6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Yeela Kaplan Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Oved Ourfali Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: wip: tests: change testing framework to pytest
gerrit-hooks has posted comments on this change. Change subject: wip: tests: change testing framework to pytest .. Patch Set 3: * Update tracker: IGNORE, no Bug-Url found -- To view, visit https://gerrit.ovirt.org/60217 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ife527b9274c31a72b57da9b958a1dd2f9f1e5ea0 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: wip: tests: change testing framework to pytest
Irit Goihman has abandoned this change. Change subject: wip: tests: change testing framework to pytest .. Abandoned -- To view, visit https://gerrit.ovirt.org/60217 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ife527b9274c31a72b57da9b958a1dd2f9f1e5ea0 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Irit Goihman Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: [wip] build: assumptions about the path do not work for dist...
Sandro Bonazzola has posted comments on this change. Change subject: [wip] build: assumptions about the path do not work for distcheck .. Patch Set 1: Can you please rebase? -- To view, visit https://gerrit.ovirt.org/52508 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If396ce1d8e2b4ce487c56044974ea71fa15e994f Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Piotr Kliczewski Gerrit-Reviewer: Piotr Kliczewski Gerrit-Reviewer: Sandro Bonazzola Gerrit-Reviewer: Yaniv Bronhaim Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org
Change in vdsm[master]: wip: copy_data take resource locks
gerrit-hooks has posted comments on this change. Change subject: wip: copy_data take resource locks .. Patch Set 1: * Update tracker: IGNORE, no Bug-Url found -- To view, visit https://gerrit.ovirt.org/61353 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1b008c38dab5478f13175659bd2103e994802cf7 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: wip: copy_data take resource locks
Adam Litke has abandoned this change. Change subject: wip: copy_data take resource locks .. Abandoned Alternate solution merged. -- To view, visit https://gerrit.ovirt.org/61353 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: I1b008c38dab5478f13175659bd2103e994802cf7 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: wip: copy_data locking
gerrit-hooks has posted comments on this change. Change subject: wip: copy_data locking .. Patch Set 1: * Update tracker: IGNORE, no Bug-Url found -- To view, visit https://gerrit.ovirt.org/60825 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie44e1f1709ee81c14b3d165bbf3a6597ac50b68e Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: wip: copy_data locking
Adam Litke has abandoned this change. Change subject: wip: copy_data locking .. Abandoned Alternate solution merged. -- To view, visit https://gerrit.ovirt.org/60825 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: abandon Gerrit-Change-Id: Ie44e1f1709ee81c14b3d165bbf3a6597ac50b68e Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: WIP: add helper to enforce the `common` rules
gerrit-hooks has posted comments on this change. Change subject: WIP: add helper to enforce the `common` rules .. Patch Set 6: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/63925 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic6f7f374240c8ed379a874cf2324fa4b3b15feaa Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org
Change in vdsm[master]: WIP: add helper to enforce the `common` rules
gerrit-hooks has posted comments on this change. Change subject: WIP: add helper to enforce the `common` rules .. Patch Set 5: * Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 'ovirt-4.0']) -- To view, visit https://gerrit.ovirt.org/63925 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic6f7f374240c8ed379a874cf2324fa4b3b15feaa Gerrit-PatchSet: 5 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org