Change in vdsm[master]: migration: add MIGRATION_STATUS enumeration
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: migration: add MIGRATION_STATUS enumeration
......................................................................
migration: add MIGRATION_STATUS enumeration
Use constants for migration status messages.
Change-Id: I0c311e915c4129af9b9bff8699db1cab96e92c69
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/virt/migration.py
1 file changed, 16 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/26/40526/1
diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py
index 7520abb..8e52b4d 100644
--- a/vdsm/virt/migration.py
+++ b/vdsm/virt/migration.py
@@ -43,6 +43,14 @@
METHOD_ONLINE = 'online'
+class MIGRATION_STATUS(object):
+ IN_PROGRESS = 'Migration in progress'
+ SUCCEEDED = 'Migration done'
+ SAVED_STATE = 'SaveState done'
+ ABORTED = 'Migration canceled' # for hystorical reasons
+ CANCELED = 'Migration process cancelled'
+
+
class SourceThread(threading.Thread):
"""
A thread that takes care of migration on the source vdsm.
@@ -80,7 +88,8 @@
self._status = {
'status': {
'code': 0,
- 'message': 'Migration in progress'},
+ 'message': MIGRATION_STATUS.IN_PROGRESS
+ },
'progress': 0}
threading.Thread.__init__(self)
self._preparingMigrationEvt = True
@@ -213,7 +222,7 @@
self._status['progress'] = 100
if not self.hibernating:
self._vm.setDownStatus(NORMAL, vmexitreason.MIGRATION_SUCCEEDED)
- self._status['status']['message'] = 'Migration done'
+ self._status['status']['message'] = MIGRATION_STATUS.SUCCEEDED
else:
# don't pickle transient params
for ignoreParam in ('displayIp', 'display', 'pid'):
@@ -228,7 +237,7 @@
self._vm.cif.teardownVolumePath(self._dstparams)
self._vm.setDownStatus(NORMAL, vmexitreason.SAVE_STATE_SUCCEEDED)
- self._status['status']['message'] = 'SaveState done'
+ self._status['status']['message'] = MIGRATION_STATUS.SAVED_STATE
def _patchConfigForLegacy(self):
"""
@@ -286,8 +295,9 @@
self._finishSuccessfully()
except libvirt.libvirtError as e:
if e.get_error_code() == libvirt.VIR_ERR_OPERATION_ABORTED:
- self._status = response.error('migCancelErr',
- message='Migration canceled')
+ self._status = response.error(
+ 'migCancelErr',
+ message=MIGRATION_STATUS.ABORTED)
raise
finally:
if '_migrationParams' in self._vm.conf:
@@ -388,8 +398,7 @@
if not self._preparingMigrationEvt:
raise
else:
- self._status['status']['message'] = \
- 'Migration process cancelled'
+ self._status['status']['message'] = MIGRATION_STATUS.CANCELED
return self._status
--
To view, visit https://gerrit.ovirt.org/40526
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c311e915c4129af9b9bff8699db1cab96e92c69
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
8 years, 11 months
Change in vdsm[master]: migration: return a copy of the internal status
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: migration: return a copy of the internal status
......................................................................
migration: return a copy of the internal status
migration.SourceThread.getStat() used to return a reference
of its internal state.
This has no obvious benefits, and raises concerns about the safety
of this operation.
This patch makes the method always return a copy of the state,
for the sake of safety.
Change-Id: I690b16c8880e044020af50620a630ecf6bf3f44d
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/virt/migration.py
1 file changed, 11 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/25/40525/1
diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py
index 6702608..7520abb 100644
--- a/vdsm/virt/migration.py
+++ b/vdsm/virt/migration.py
@@ -109,7 +109,17 @@
Get the status of the migration.
"""
self.update()
- return self._status
+
+ status = {
+ 'code': self._status['code'],
+ 'message': self._status['message']
+ }
+
+ return {
+ 'status': status,
+ 'progress': self._status['progress'],
+ 'downtime': self._status['downtime']
+ }
def _setupVdsConnection(self):
if self.hibernating:
--
To view, visit https://gerrit.ovirt.org/40525
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I690b16c8880e044020af50620a630ecf6bf3f44d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
8 years, 11 months
Change in vdsm[master]: migration: make SourceThread.status private
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: migration: make SourceThread.status private
......................................................................
migration: make SourceThread.status private
The status field should never be accessed directly anymore,
the getStat() method already provides up-to-date information.
Change-Id: I7b720c03c1ee363c20522ac531fa25fc1d9bf4e8
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/virt/migration.py
1 file changed, 16 insertions(+), 16 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/23/40523/1
diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py
index 61d5a7b..de6d21c 100644
--- a/vdsm/virt/migration.py
+++ b/vdsm/virt/migration.py
@@ -77,7 +77,7 @@
config.get('vars', 'migration_downtime')
self._autoConverge = autoConverge
self._compressed = compressed
- self.status = {
+ self._status = {
'status': {
'code': 0,
'message': 'Migration in progress'},
@@ -97,13 +97,13 @@
"""
if self._monitorThread is not None:
# fetch migration status from the monitor thread
- self.status['progress'] = self._monitorThread.progress
+ self._status['progress'] = self._monitorThread.progress
stat = self._vm._dom.jobStats(libvirt.VIR_DOMAIN_JOB_STATS_COMPLETED)
if 'downtime' in stat:
- self.status['downtime'] = stat['downtime']
+ self._status['downtime'] = stat['downtime']
- return self.status
+ return self._status
def _setupVdsConnection(self):
if self.hibernating:
@@ -129,10 +129,10 @@
status = self._destServer.getVmStats(self._vm.id)
if not status['status']['code']:
self.log.error("Machine already exists on the destination")
- self.status = response.error('exist')
+ self._status = response.error('exist')
except Exception:
self.log.exception("Error initiating connection")
- self.status = response.error('noConPeer')
+ self._status = response.error('noConPeer')
def _setupRemoteMachineParams(self):
self._machineParams.update(self._vm.status())
@@ -179,8 +179,8 @@
self._vm.lastStatus = vmstatus.MIGRATION_SOURCE
def _recover(self, message):
- if not self.status['status']['code']:
- self.status = response.error('migrateErr')
+ if not self._status['status']['code']:
+ self._status = response.error('migrateErr')
self.log.error(message)
if not self.hibernating:
try:
@@ -194,10 +194,10 @@
self._vm.lastStatus = vmstatus.UP
def _finishSuccessfully(self):
- self.status['progress'] = 100
+ self._status['progress'] = 100
if not self.hibernating:
self._vm.setDownStatus(NORMAL, vmexitreason.MIGRATION_SUCCEEDED)
- self.status['status']['message'] = 'Migration done'
+ self._status['status']['message'] = 'Migration done'
else:
# don't pickle transient params
for ignoreParam in ('displayIp', 'display', 'pid'):
@@ -212,7 +212,7 @@
self._vm.cif.teardownVolumePath(self._dstparams)
self._vm.setDownStatus(NORMAL, vmexitreason.SAVE_STATE_SUCCEEDED)
- self.status['status']['message'] = 'SaveState done'
+ self._status['status']['message'] = 'SaveState done'
def _patchConfigForLegacy(self):
"""
@@ -270,8 +270,8 @@
self._finishSuccessfully()
except libvirt.libvirtError as e:
if e.get_error_code() == libvirt.VIR_ERR_OPERATION_ABORTED:
- self.status = response.error('migCancelErr',
- message='Migration canceled')
+ self._status = response.error('migCancelErr',
+ message='Migration canceled')
raise
finally:
if '_migrationParams' in self._vm.conf:
@@ -307,7 +307,7 @@
destCreationTime)
if result['status']['code']:
- self.status = result
+ self._status = result
raise RuntimeError('migration destination error: ' +
result['status']['message'])
if config.getboolean('vars', 'ssl'):
@@ -372,9 +372,9 @@
if not self._preparingMigrationEvt:
raise
else:
- self.status['status']['message'] = \
+ self._status['status']['message'] = \
'Migration process cancelled'
- return self.status
+ return self._status
def exponential_downtime(downtime, steps):
--
To view, visit https://gerrit.ovirt.org/40523
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7b720c03c1ee363c20522ac531fa25fc1d9bf4e8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
8 years, 11 months
Change in vdsm[ovirt-3.5]: netlink: fix PEP8 missing line in netlink memory leak patch
by phoracek@redhat.com
Petr Horáček has uploaded a new change for review.
Change subject: netlink: fix PEP8 missing line in netlink memory leak patch
......................................................................
netlink: fix PEP8 missing line in netlink memory leak patch
Change-Id: I659123c9e1f18e6ecb887f3eb59123acd986217a
Bug-Url: https://bugzilla.redhat.com/1158108
Signed-off-by: Petr Horáček <phoracek(a)redhat.com>
---
M lib/vdsm/netlink.py
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/88/40488/1
diff --git a/lib/vdsm/netlink.py b/lib/vdsm/netlink.py
index 8aae2e5..caed7b5 100644
--- a/lib/vdsm/netlink.py
+++ b/lib/vdsm/netlink.py
@@ -68,6 +68,7 @@
_rtnl_link_put(link)
return link_info
+
class NLSocketPool(object):
"""Pool of netlink sockets."""
def __init__(self, size):
--
To view, visit https://gerrit.ovirt.org/40488
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I659123c9e1f18e6ecb887f3eb59123acd986217a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Petr Horáček <phoracek(a)redhat.com>
8 years, 11 months
Change in vdsm[master]: ceph: Initial support for network disk
by fromani@redhat.com
Francesco Romani has posted comments on this change.
Change subject: ceph: Initial support for network disk
......................................................................
Patch Set 5: Code-Review+1
--
To view, visit https://gerrit.ovirt.org/38766
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1c5792bb6206a227ee0c2df9490b771a69c0093c
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Sahina Bose <sabose(a)redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeyasin(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No
8 years, 11 months
Change in vdsm[master]: systemd: set KillMode to process for vdsmd
by Sandro Bonazzola
Sandro Bonazzola has uploaded a new change for review.
Change subject: systemd: set KillMode to process for vdsmd
......................................................................
systemd: set KillMode to process for vdsmd
When using gluster as file system, glusterfs process
is spawned by mount command within the same cgroup
used by vdsmd:
└─system.slice
├─supervdsmd.service
│ └─22370 /usr/bin/python /usr/share/vdsm/supervdsmServer...
├─vdsmd.service
│ ├─22483 /usr/bin/python /usr/share/vdsm/vdsm
│ ├─22777 /usr/sbin/glusterfs --volfile-server=...
│ ├─22789 /usr/libexec/ioprocess ...
│ ├─22799 /usr/libexec/ioprocess ...
│ └─22822 /usr/libexec/ioprocess ...
Using default killmode which is control-group, will kill also
glusterfs process making the storage domain unreachable.
Moving the killmode to process allow to nicely kill vdsm and ioprocess
keeping glusterfs alive:
└─system.slice
├─supervdsmd.service
│ └─22370 /usr/bin/python /usr/share/vdsm/supervdsmServer...
├─vdsmd.service
│ └─22777 /usr/sbin/glusterfs --volfile-server=...
Change-Id: Ifc0d7a6db7c59bbddbcd2a7dff8e2379802f51f5
Signed-off-by: Sandro Bonazzola <sbonazzo(a)redhat.com>
---
M init/systemd/vdsmd.service.in
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/83/40183/1
diff --git a/init/systemd/vdsmd.service.in b/init/systemd/vdsmd.service.in
index 5ff3e56..598003b 100644
--- a/init/systemd/vdsmd.service.in
+++ b/init/systemd/vdsmd.service.in
@@ -20,6 +20,7 @@
Group=@VDSMGROUP@
PermissionsStartOnly=true
TimeoutStopSec=@SERVICE_STOP_TIMEOUT@
+KillMode=process
[Install]
WantedBy=multi-user.target
--
To view, visit https://gerrit.ovirt.org/40183
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc0d7a6db7c59bbddbcd2a7dff8e2379802f51f5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Sandro Bonazzola <sbonazzo(a)redhat.com>
8 years, 11 months
Change in vdsm[master]: ceph: Initial support for network disk
by Piotr Kliczewski
Piotr Kliczewski has posted comments on this change.
Change subject: ceph: Initial support for network disk
......................................................................
Patch Set 5: Code-Review+1
schema change looks good.
--
To view, visit https://gerrit.ovirt.org/38766
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1c5792bb6206a227ee0c2df9490b771a69c0093c
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Sahina Bose <sabose(a)redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeyasin(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No
8 years, 11 months
Change in vdsm[master]: pytho3: libmodernize.fixes.fix_raise_six
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: pytho3: libmodernize.fixes.fix_raise_six
......................................................................
pytho3: libmodernize.fixes.fix_raise_six
This patch introduces a new dependency on the "six" module
Change-Id: I991be53a5321e7950badce44359dc4bd13f70b5b
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M configure.ac
M lib/vdsm/utils.py
M tests/utilsTests.py
M vdsm.spec.in
M vdsm/API.py
M vdsm/storage/storageServer.py
6 files changed, 12 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/14/40214/1
diff --git a/configure.ac b/configure.ac
index 0a30c3e..6d4662e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -275,6 +275,7 @@
AX_PYTHON_MODULE([pthreading], [fatal])
AX_PYTHON_MODULE([pyinotify], [fatal])
AX_PYTHON_MODULE([selinux], [fatal])
+AX_PYTHON_MODULE([six], [fatal])
# External programs (sorted, please keep in order)
AC_PATH_PROG([BLKID_PATH], [blkid], [/sbin/blkid])
diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py
index c88a1d7..ad9a323 100644
--- a/lib/vdsm/utils.py
+++ b/lib/vdsm/utils.py
@@ -40,6 +40,7 @@
import itertools
import logging
import re
+import six
import sys
import os
import platform
@@ -1150,7 +1151,7 @@
undoExcInfo = sys.exc_info()
if exc_type is None and undoExcInfo is not None:
- raise undoExcInfo[0], undoExcInfo[1], undoExcInfo[2]
+ six.reraise(undoExcInfo[0], undoExcInfo[1], undoExcInfo[2])
def defer(self, func, *args, **kwargs):
self._finally.append((func, args, kwargs))
diff --git a/tests/utilsTests.py b/tests/utilsTests.py
index a5ecc11..1578480 100644
--- a/tests/utilsTests.py
+++ b/tests/utilsTests.py
@@ -24,6 +24,7 @@
import errno
import logging
import os.path
+import six
import sys
import threading
import time
@@ -541,7 +542,7 @@
for worker in self.workers:
if worker.exc_info:
t, v, tb = worker.exc_info
- raise t, v, tb
+ six.reraise(t, v, tb)
def read_stderr(self):
args = ['if=/dev/zero',
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 25506cf..535e278 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -96,6 +96,7 @@
BuildRequires: python-devel
BuildRequires: python-netaddr
BuildRequires: python-nose
+BuildRequires: python-six
BuildRequires: rpm-build
# BuildRequires needed by the tests during the build
@@ -155,6 +156,7 @@
Requires: python-cpopen >= 1.3
Requires: python-ioprocess >= 0.14
Requires: python-pthreading >= 0.1.3-3
+Requires: python-six
Requires: %{name}-infra = %{version}-%{release}
Requires: rpm-python
Requires: nfs-utils
diff --git a/vdsm/API.py b/vdsm/API.py
index 3cdc465..22e80e3 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -23,6 +23,7 @@
from contextlib import contextmanager
import os
import signal
+import six
import sys
import time
import logging
@@ -1574,7 +1575,7 @@
# exception that might have happened on rollback is
# properly logged and derived from actions to respond to
# the original exception.
- raise excType, value, tb
+ six.reraise(excType, value, tb)
def setSafeNetworkConfig(self):
"""Declare current network configuration as 'safe'"""
diff --git a/vdsm/storage/storageServer.py b/vdsm/storage/storageServer.py
index 22a90d1..4d08e1a 100644
--- a/vdsm/storage/storageServer.py
+++ b/vdsm/storage/storageServer.py
@@ -27,6 +27,7 @@
from collections import namedtuple
import misc
from functools import partial
+import six
import sys
from vdsm.compat import pickle
@@ -216,7 +217,7 @@
except OSError as e:
self.log.warn("Error removing mountpoint directory %r: %s",
self._getLocalPath(), e)
- raise t, v, tb
+ six.reraise(t, v, tb)
else:
try:
fileSD.validateDirAccess(
@@ -227,7 +228,7 @@
self.disconnect()
except OSError:
self.log.exception("Error disconnecting")
- raise t, v, tb
+ six.reraise(t, v, tb)
def isConnected(self):
return self._mount.isMounted()
--
To view, visit https://gerrit.ovirt.org/40214
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I991be53a5321e7950badce44359dc4bd13f70b5b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
8 years, 11 months
Change in vdsm[master]: migration: typo: destServer attribute is private
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: migration: typo: destServer attribute is private
......................................................................
migration: typo: destServer attribute is private
A typo in migration.py cause all migrations to fail.
Change-Id: I78f079fc5503d6cddf5f08280bb4be6e6beec924
Bug-Url: https://bugzilla.redhat.com/1217362
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/virt/migration.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/91/40491/1
diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py
index 67b05a4..b6b6c15 100644
--- a/vdsm/virt/migration.py
+++ b/vdsm/virt/migration.py
@@ -125,7 +125,7 @@
self.log.debug('Destination server is: ' + hostPort)
try:
self.log.debug('Initiating connection with destination')
- status = self.destServer.getVmStats(self._vm.id)
+ status = self._destServer.getVmStats(self._vm.id)
if not status['status']['code']:
self.log.error("Machine already exists on the destination")
self.status = errCode['exist']
--
To view, visit https://gerrit.ovirt.org/40491
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I78f079fc5503d6cddf5f08280bb4be6e6beec924
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
8 years, 11 months
Change in vdsm[master]: vm: hyperv: hypervclock dosn't have 'tickpolicy'
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: vm: hyperv: hypervclock dosn't have 'tickpolicy'
......................................................................
vm: hyperv: hypervclock dosn't have 'tickpolicy'
'hypervclock' (and kvmclock as well) does not
support the tickpolicy attribute.
This patch removes the setting, while preserving
it for 'rtc' clocksources.
Change-Id: If38dba9f9667b43a2b00338135b901f7886224f4
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M tests/vmTests.py
M vdsm/virt/vmxml.py
2 files changed, 6 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/87/40387/1
diff --git a/tests/vmTests.py b/tests/vmTests.py
index 25aac90..3cd4967 100644
--- a/tests/vmTests.py
+++ b/tests/vmTests.py
@@ -285,7 +285,7 @@
def testHyperVClockXML(self):
clockXML = """
<clock adjustment="-3600" offset="variable">
- <timer name="hypervclock" tickpolicy="catchup"/>
+ <timer name="hypervclock"/>
<timer name="pit" tickpolicy="delay"/>
<timer name="hpet" present="no"/>
</clock>"""
diff --git a/vdsm/virt/vmxml.py b/vdsm/virt/vmxml.py
index c4fd60c..02bbb52 100644
--- a/vdsm/virt/vmxml.py
+++ b/vdsm/virt/vmxml.py
@@ -183,18 +183,16 @@
for hyperv:
<clock offset="variable" adjustment="-3600">
- <timer name="hypervclock" tickpolicy="catchup">
+ <timer name="hypervclock">
</clock>
"""
- if utils.tobool(self.conf.get('hypervEnable', 'false')):
- clockName = 'hypervclock'
- else:
- clockName = 'rtc'
-
m = Element('clock', offset='variable',
adjustment=str(self.conf.get('timeOffset', 0)))
- m.appendChildWithArgs('timer', name=clockName, tickpolicy='catchup')
+ if utils.tobool(self.conf.get('hypervEnable', 'false')):
+ m.appendChildWithArgs('timer', name='hypervclock')
+ else:
+ m.appendChildWithArgs('timer', name='rtc', tickpolicy='catchup')
m.appendChildWithArgs('timer', name='pit', tickpolicy='delay')
if self.arch == caps.Architecture.X86_64:
--
To view, visit https://gerrit.ovirt.org/40387
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If38dba9f9667b43a2b00338135b901f7886224f4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
8 years, 11 months