Change in vdsm[master]: vdsm: update size of LUN volume in prepareVolume
by derez@redhat.com
Daniel Erez has uploaded a new change for review.
Change subject: vdsm: update size of LUN volume in prepareVolume
......................................................................
vdsm: update size of LUN volume in prepareVolume
In order to handle resize of DirectLUN disks
(i.e. when a LUN volume is extended by user),
relevant data should be retrieved when invoking getVmStats.
Hence, added the following information to disks stats for
DirectLUN disks: truesize, apparentsize and lunGUID
(the sizes values already exist but are zeroed).
Using these values, the engine could keep the DB updated.
The following changes are introduced:
* hsm:
Added getLunVolumeSize for fetching LUN's device size
using blockSD -> _tellEnd.
* clientIF:
For LUN devices, updated drive's truesize/apparentsize
using getLunVolumeSize method.
* vm:
_getDiskStats -> in order to identify each LUN
(e.g. on engine side), added 'lunGUID' to dStats
when vmDrive.GUID exists (applicable for DirectLUN disks).
Change-Id: I48b4343c6519fed366beec415c47226d4e3c8fef
Bug-Url: https://bugzilla.redhat.com/961532
Signed-off-by: Daniel Erez <derez(a)redhat.com>
---
M vdsm/clientIF.py
M vdsm/storage/hsm.py
M vdsm/vm.py
3 files changed, 28 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/76/22976/1
diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py
index 565d6ee..338df74 100644
--- a/vdsm/clientIF.py
+++ b/vdsm/clientIF.py
@@ -268,6 +268,11 @@
if res['status']['code']:
raise vm.VolumeError(drive)
+ # Update size for LUN volume
+ volSize = self.irs.getLunVolumeSize(volPath)
+ drive["truesize"] = volSize['truesize']
+ drive["apparentsize"] = volSize['apparentsize']
+
# UUID drive format
elif "UUID" in drive:
volPath = self._getUUIDSpecPath(drive["UUID"])
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 6bae0bd..513ead1 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -3019,6 +3019,26 @@
volUUID=volUUID).refreshVolume()
@public
+ def getLunVolumeSize(self, volPath, options=None):
+ """
+ Gets the size of a LUN volume.
+
+ :param volPath: The LUN volume path.
+ :type volPath: string
+
+ :returns: a dict with the size of the volume.
+ :rtype: dict
+ """
+ try:
+ size = str(blockSD._tellEnd(volPath))
+ except IOError:
+ self.log.warn("Could not get size of LUN device in volPath %s",
+ volPath, exc_info=True)
+ raise
+
+ return dict(truesize=size, apparentsize=size)
+
+ @public
def getVolumeSize(self, sdUUID, spUUID, imgUUID, volUUID, options=None):
"""
Gets the size of a volume.
@@ -3034,7 +3054,7 @@
:param options: ?
:returns: a dict with the size of the volume.
- :rtype: dict
+ :rtype: dict/usr/share/vdsm
"""
# Return string because xmlrpc's "int" is very limited
dom = sdCache.produce(sdUUID=sdUUID)
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 6467e0e..a98f073 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -622,6 +622,8 @@
'apparentsize': str(vmDrive.apparentsize)}
if vmDrive.isVdsmImage():
dStats['imageID'] = vmDrive.imageID
+ if vmDrive.GUID:
+ dStats['lunGUID'] = vmDrive.GUID
dStats['readRate'] = ((eInfo[dName][1] - sInfo[dName][1]) /
sampleInterval)
dStats['writeRate'] = ((eInfo[dName][3] - sInfo[dName][3]) /
--
To view, visit http://gerrit.ovirt.org/22976
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I48b4343c6519fed366beec415c47226d4e3c8fef
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <derez(a)redhat.com>
10 years, 4 months
Change in vdsm[master]: jsonrpc: Vdsm changes
by smizrahi@redhat.com
Saggi Mizrahi has posted comments on this change.
Change subject: jsonrpc: Vdsm changes
......................................................................
Patch Set 25:
(3 comments)
http://gerrit.ovirt.org/#/c/19497/25/lib/yajsonrpc/betterAsyncore.py
File lib/yajsonrpc/betterAsyncore.py:
Line 115: return SSLSocket(SSL.Connection(context, sock=sock), self)
Line 116:
Line 117:
Line 118: # This is a copy of the standard library asyncore converted to support
Line 119: # compositing. Also fixes races in original implementation.
> just want explanation here.. what fixes?.. :/
the original implementation doesn't take the fifo lock at all the places it should.
It doesn't matter as this class is meant to be replaced later.
Line 120: class AsyncChat(object):
Line 121: # these are overridable defaults
Line 122:
Line 123: ac_in_buffer_size = 4096
http://gerrit.ovirt.org/#/c/19497/25/lib/yajsonrpc/protonReactor.py
File lib/yajsonrpc/protonReactor.py:
Line 25: FAILED = 0
Line 26: CONNECTED = 1
Line 27: SERVER_AUTH = 2
Line 28: CLIENT_AUTH = 3
Line 29:
> why 10?
Why not?
Line 30: MBUFF_SIZE = 10
Line 31:
Line 32:
Line 33: class ProtonError(RuntimeError):
http://gerrit.ovirt.org/#/c/19497/25/vdsm_api/BindingJsonRpc.py
File vdsm_api/BindingJsonRpc.py:
Line 72:
Line 73: def _createProtonListener(self, cfg):
Line 74: address = cfg.get("host", "0.0.0.0")
Line 75: port = cfg.get("port", 5672)
Line 76: return self._reactors["amqp"].createListener((address, port))
> port is hardcoded?
http://docs.python.org/2/library/stdtypes.html#dict.get
Line 77:
Line 78: def _createTcpReactor(self, truststore_path=None):
Line 79: if truststore_path is None:
Line 80: return AsyncoreReactor()
--
To view, visit http://gerrit.ovirt.org/19497
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If828355b7efe28fe6a2e784069425fefd2f3f25c
Gerrit-PatchSet: 25
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Bala.FA <barumuga(a)redhat.com>
Gerrit-Reviewer: Barak Azulay <bazulay(a)redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Sahina Bose <sabose(a)redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeyasin(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: mooli tayer <mtayer(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
10 years, 4 months
Change in vdsm[master]: spec: use Requires %{name}
by Douglas Schilling Landgraf
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: spec: use Requires %{name}
......................................................................
spec: use Requires %{name}
We should use macros instead of static names in the spec.
If in the future we decide to use different name for vdsm package
it's a matter to put the new package name in Name session.
Change-Id: I6a20093e59990127598d70918b62ab9ea3d5c429
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 7 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/01/24301/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 6efd430..08bfae5 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -353,7 +353,7 @@
%package debug-plugin
Summary: VDSM Debug Plugin
-Requires: vdsm
+Requires: %{name}
Requires: %{name}-xmlrpc = %{version}-%{release}
BuildArch: noarch
@@ -362,7 +362,7 @@
%package tests
Summary: VDSM Test Suite
-Requires: vdsm = %{version}-%{release}
+Requires: %{name} = %{version}-%{release}
Requires: dracut
Requires: python-nose
BuildArch: noarch
@@ -373,7 +373,7 @@
%package hook-checkimages
Summary: Qcow2 disk image format check hook for VDSM
BuildArch: noarch
-Requires: vdsm
+Requires: %{name}
%description hook-checkimages
VDSM hook used to perform consistency check on a qcow2 format disk image
@@ -392,7 +392,7 @@
%package hook-faqemu
Summary: Fake qemu process for VDSM quality assurance
BuildArch: noarch
-Requires: vdsm
+Requires: %{name}
%description hook-faqemu
VDSM hook used for testing VDSM with multiple fake virtual machines without
@@ -420,7 +420,7 @@
%package hook-extnet
Summary: Force a vNIC to connect to a specific libvirt network
BuildArch: noarch
-Requires: vdsm = %{version}-%{release}
+Requires: %{name} = %{version}-%{release}
%description hook-extnet
VDSM hook which allows to connect a vNIC to a libvirt network that is managed
@@ -511,7 +511,7 @@
%package hook-qemucmdline
Summary: QEMU cmdline hook for VDSM
BuildArch: noarch
-Requires: vdsm
+Requires: %{name}
%description hook-qemucmdline
Provides support for injecting QEMU cmdline via VDSM hook.
@@ -565,7 +565,7 @@
%package hook-vmfex-dev
Summary: VM-FEX vNIC support for VDSM
BuildArch: noarch
-Requires: vdsm = %{version}-%{release}
+Requires: %{name} = %{version}-%{release}
Conflicts: hook-vmfex
%description hook-vmfex-dev
--
To view, visit http://gerrit.ovirt.org/24301
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a20093e59990127598d70918b62ab9ea3d5c429
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
10 years, 4 months
Change in vdsm[master]: nettests: remove most of connectivity checks
by Dan Kenigsberg
Dan Kenigsberg has submitted this change and it was merged.
Change subject: nettests: remove most of connectivity checks
......................................................................
nettests: remove most of connectivity checks
With its default connectivityCheck=True, setupNetworks wait for a ping
before finishing successfully. This slows down the functional tests.
It is important to keep testing connectivityCheck, but it does not have
to happen so often.
Change-Id: I1895d266dfb2d7f8ca7dcff860e0d96b1fc07e14
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/24167
Reviewed-by: Antoni Segura Puimedon <asegurap(a)redhat.com>
---
M tests/functional/networkTests.py
1 file changed, 332 insertions(+), 346 deletions(-)
Approvals:
Antoni Segura Puimedon: Looks good to me, but someone else must approve
Dan Kenigsberg: Verified; Looks good to me, approved
--
To view, visit http://gerrit.ovirt.org/24167
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I1895d266dfb2d7f8ca7dcff860e0d96b1fc07e14
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Assaf Muller <amuller(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ondřej Svoboda <osvoboda(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
10 years, 4 months
Change in vdsm[master]: nettests: use a constant dict NOCHK
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: nettests: use a constant dict NOCHK
......................................................................
nettests: use a constant dict NOCHK
The options {'connectivityCheck': False} are very common, lets make it
easier to use them.
Change-Id: I06bed9ca60272d94d157f278fdf23e354dbf29dd
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M tests/functional/networkTests.py
1 file changed, 21 insertions(+), 21 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/66/24166/1
diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py
index 5484e99..9d9fcbc 100644
--- a/tests/functional/networkTests.py
+++ b/tests/functional/networkTests.py
@@ -66,6 +66,8 @@
dummyPool = set()
DUMMY_POOL_SIZE = 5
+NOCHK = {'connectivityCheck': False}
+
def setupModule():
"""Persists network configuration."""
@@ -316,7 +318,7 @@
{NETWORK_NAME + '0': {'bonding': BONDING_NAME,
'bridged': False}},
{BONDING_NAME: {'nics': nics}},
- {'connectivityCheck': False})
+ NOCHK)
self.assertEqual(status, SUCCESS, msg)
self.assertBondExists(BONDING_NAME, nics)
@@ -325,20 +327,20 @@
{NETWORK_NAME:
{'bonding': BONDING_NAME, 'bridged': bridged,
'vlan': VLAN_ID}},
- {}, {'connectivityCheck': False})
+ {}, NOCHK)
self.assertEqual(status, SUCCESS, msg)
self.assertNetworkExists(NETWORK_NAME, bridged)
status, msg = self.vdsm_net.setupNetworks(
{NETWORK_NAME: {'remove': True},
NETWORK_NAME + '0': {'remove': True}},
- {}, {'connectivityCheck': False})
+ {}, NOCHK)
self.assertEqual(status, SUCCESS, msg)
self.assertBondExists(BONDING_NAME, nics)
status, msg = self.vdsm_net.setupNetworks(
{},
- {BONDING_NAME: {'remove': True}}, {'connectivityCheck': False})
+ {BONDING_NAME: {'remove': True}}, NOCHK)
self.assertEqual(status, SUCCESS, msg)
@cleanupNet
@@ -651,20 +653,20 @@
def testSetupNetworksNicless(self):
status, msg = self.vdsm_net.setupNetworks(
{NETWORK_NAME: {'bridged': True}}, {},
- {'connectivityCheck': False})
+ NOCHK)
self.assertEqual(status, SUCCESS, msg)
self.assertNetworkExists(NETWORK_NAME)
status, msg = self.vdsm_net.setupNetworks(
{NETWORK_NAME: dict(remove=True)}, {},
- {'connectivityCheck': False})
+ NOCHK)
self.assertEqual(status, SUCCESS, msg)
@cleanupNet
def testSetupNetworksNiclessBridgeless(self):
status, msg = self.vdsm_net.setupNetworks(
{NETWORK_NAME: {'bridged': False}}, {},
- {'connectivityCheck': False})
+ NOCHK)
self.assertEqual(status, neterrors.ERR_BAD_PARAMS, msg)
@cleanupNet
@@ -672,13 +674,12 @@
@ValidateRunningAsRoot
def testSetupNetworksConvertVlanNetBridgeness(self):
"Convert a bridged networks to a bridgeless one and viceversa"
- opts = {'connectivityCheck': False}
- def setupNetworkBridged(nic, bridged, opts=opts):
+ def setupNetworkBridged(nic, bridged):
networks = {NETWORK_NAME: dict(vlan=VLAN_ID,
nic=nic, bridged=bridged)}
status, msg = self.vdsm_net.setupNetworks(networks, {},
- opts)
+ NOCHK)
self.assertEqual(status, SUCCESS, msg)
self.assertNetworkExists(NETWORK_NAME, bridged)
@@ -689,7 +690,7 @@
status, msg = self.vdsm_net.setupNetworks({NETWORK_NAME:
dict(remove=True)},
- {}, opts)
+ {}, NOCHK)
self.assertEqual(status, SUCCESS, msg)
@@ -1408,7 +1409,7 @@
{'nic': nics[0], 'bridged': bridged, 'ipaddr': IP_ADDRESS,
'netmask': prefix2netmask(int(IP_CIDR)),
'gateway': IP_GATEWAY}},
- {}, {'connectivityCheck': False})
+ {}, NOCHK)
self.assertEqual(status, SUCCESS, msg)
self.assertNetworkExists(NETWORK_NAME, bridged)
@@ -1431,7 +1432,7 @@
status, msg = self.vdsm_net.setupNetworks(
{NETWORK_NAME: {'remove': True}},
- {}, {'connectivityCheck': False})
+ {}, NOCHK)
self.assertEqual(status, SUCCESS, msg)
# Assert that routes and rules don't exist
@@ -1637,7 +1638,7 @@
'vlan': VLAN_ID, 'mtu': BIG_MTU}},
{BONDING_NAME:
{'nics': nics}},
- {'connectivityCheck': False})
+ NOCHK)
deviceLinks = getLinks()
deviceNames = [device.name for device in deviceLinks]
@@ -1663,7 +1664,7 @@
status, msg = self.vdsm_net.setupNetworks(
{NETWORK_NAME: {'remove': True}},
{BONDING_NAME: {'remove': True}},
- {'connectivityCheck': False})
+ NOCHK)
@cleanupNet
@RequireVethMod
@@ -1675,14 +1676,13 @@
with dnsmasqDhcp(left):
network = {NETWORK_NAME: {'nic': right, 'bridged': False,
'bootprot': 'dhcp'}}
- options = {'connectivityCheck': 0}
- status, msg = self.vdsm_net.setupNetworks(network, {}, options)
+ status, msg = self.vdsm_net.setupNetworks(network, {}, NOCHK)
self.assertEqual(status, SUCCESS, msg)
self.assertNetworkExists(NETWORK_NAME)
network = {NETWORK_NAME: {'remove': True}}
- status, msg = self.vdsm_net.setupNetworks(network, {}, options)
+ status, msg = self.vdsm_net.setupNetworks(network, {}, NOCHK)
self.assertEqual(status, SUCCESS, msg)
self.assertNetworkDoesntExist(NETWORK_NAME)
@@ -1728,18 +1728,18 @@
network = {NETWORK_NAME: {'nic': nic, 'vlan': VLAN_ID,
'bridged': False}}
status, msg = self.vdsm_net.setupNetworks(network, {},
- {'connectivityCheck': 0})
+ NOCHK)
self.assertEqual(status, SUCCESS, msg)
self.assertNetworkExists(NETWORK_NAME)
ipwrapper.linkDel(nic + '.' + VLAN_ID)
self.vdsm_net.refreshNetinfo()
self.assertNotIn(NETWORK_NAME, self.vdsm_net.netinfo.networks)
status, msg = self.vdsm_net.setupNetworks(network, {},
- {'connectivityCheck': 0})
+ NOCHK)
self.assertEqual(status, SUCCESS, msg)
self.assertNetworkExists(NETWORK_NAME)
network[NETWORK_NAME] = {'remove': True}
status, msg = self.vdsm_net.setupNetworks(network, {},
- {'connectivityCheck': 0})
+ NOCHK)
self.assertEqual(status, SUCCESS, msg)
self.assertNetworkDoesntExist(NETWORK_NAME)
--
To view, visit http://gerrit.ovirt.org/24166
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I06bed9ca60272d94d157f278fdf23e354dbf29dd
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
10 years, 4 months
Change in vdsm[master]: caps: Collect numa information
by Jenkins CI RO
oVirt Jenkins CI Server has posted comments on this change.
Change subject: caps: Collect numa information
......................................................................
Patch Set 5:
No Builds Executed
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6291/ : To avoid overloading the infrastructure, a whitelist for running gerrit triggered jobs has been set in place, if you feel like you should be in it, please contact infra at ovirt dot org.
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7181/ : To avoid overloading the infrastructure, a whitelist for running gerrit triggered jobs has been set in place, if you feel like you should be in it, please contact infra at ovirt dot org.
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7070/ : To avoid overloading the infrastructure, a whitelist for running gerrit triggered jobs has been set in place, if you feel like you should be in it, please contact infra at ovirt dot org.
--
To view, visit http://gerrit.ovirt.org/23703
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I63eeb697ab986c3b9cad0dc44f41924f329e52cd
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Xiaolei Shi <xiao-lei.shi(a)hp.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
10 years, 4 months
Change in vdsm[master]: nettests: remove most of connectivity checks
by Dan Kenigsberg
Dan Kenigsberg has posted comments on this change.
Change subject: nettests: remove most of connectivity checks
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit http://gerrit.ovirt.org/24167
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1895d266dfb2d7f8ca7dcff860e0d96b1fc07e14
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Assaf Muller <amuller(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Ondřej Svoboda <osvoboda(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
10 years, 4 months
Change in vdsm[ovirt-3.3]: vdsm: fix RTC offset
by mpoledni@redhat.com
Hello Dan Kenigsberg, Peter V. Saveliev,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/24260
to review the following change.
Change subject: vdsm: fix RTC offset
......................................................................
vdsm: fix RTC offset
Upon RTC update (hwclock --systohc) on the guest side, libvirt sends the event
with RTC offset from the qemu start -rtc value in seconds. The received offset
should not replace the previous value, but should be added to it. Since the
time update event is relative to the qemu start time, we should store the
initial value and use it for the calculation.
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=956741
Change-Id: I27c70a53f64fb05607e93bffbac25fdee7d1cd2a
Signed-off-by: Peter V. Saveliev <peet(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/14750
Tested-by: Martin Polednik <mpoledni(a)redhat.com>
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/vm.py
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/60/24260/1
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 475f6ce..eabb276 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -1742,6 +1742,7 @@
self.id = self.conf['vmId']
self._volPrepareLock = threading.Lock()
self._initTimePauseCode = None
+ self._initTimeRTC = long(self.conf.get('timeOffset', 0))
self.guestAgent = None
self._guestEvent = 'Powering up'
self._guestEventTime = 0
@@ -2268,9 +2269,10 @@
timer.start()
def _rtcUpdate(self, timeOffset):
- self.log.debug('new rtc offset %s', timeOffset)
+ newTimeOffset = str(self._initTimeRTC + long(timeOffset))
+ self.log.debug('new rtc offset %s', newTimeOffset)
with self._confLock:
- self.conf['timeOffset'] = timeOffset
+ self.conf['timeOffset'] = newTimeOffset
def extendDriveVolume(self, vmDrive):
if not vmDrive.blockDev:
--
To view, visit http://gerrit.ovirt.org/24260
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I27c70a53f64fb05607e93bffbac25fdee7d1cd2a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Martin Polednik <mpoledni(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Peter V. Saveliev <peet(a)redhat.com>
10 years, 4 months
Change in vdsm[ovirt-3.4]: vdsm: fix RTC offset
by fromani@redhat.com
Hello Dan Kenigsberg, Peter V. Saveliev, Martin Polednik,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/24196
to review the following change.
Change subject: vdsm: fix RTC offset
......................................................................
vdsm: fix RTC offset
Upon RTC update (hwclock --systohc) on the guest side, libvirt sends the event
with RTC offset from the qemu start -rtc value in seconds. The received offset
should not replace the previous value, but should be added to it. Since the
time update event is relative to the qemu start time, we should store the
initial value and use it for the calculation.
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=956741
Change-Id: I27c70a53f64fb05607e93bffbac25fdee7d1cd2a
Signed-off-by: Peter V. Saveliev <peet(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/14750
Tested-by: Martin Polednik <mpoledni(a)redhat.com>
Reviewed-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/vm.py
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/96/24196/1
diff --git a/vdsm/vm.py b/vdsm/vm.py
index bf64195..caec964 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -1914,6 +1914,7 @@
self.id = self.conf['vmId']
self._volPrepareLock = threading.Lock()
self._initTimePauseCode = None
+ self._initTimeRTC = long(self.conf.get('timeOffset', 0))
self.guestAgent = None
self._guestEvent = 'Powering up'
self._guestEventTime = 0
@@ -2413,9 +2414,10 @@
timer.start()
def _rtcUpdate(self, timeOffset):
- self.log.debug('new rtc offset %s', timeOffset)
+ newTimeOffset = str(self._initTimeRTC + long(timeOffset))
+ self.log.debug('new rtc offset %s', newTimeOffset)
with self._confLock:
- self.conf['timeOffset'] = timeOffset
+ self.conf['timeOffset'] = newTimeOffset
def extendDrivesIfNeeded(self):
extend = []
--
To view, visit http://gerrit.ovirt.org/24196
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I27c70a53f64fb05607e93bffbac25fdee7d1cd2a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Martin Polednik <mpoledni(a)redhat.com>
Gerrit-Reviewer: Peter V. Saveliev <peet(a)redhat.com>
10 years, 4 months
Change in vdsm[master]: jsonrpc: Vdsm changes
by ybronhei@redhat.com
Yaniv Bronhaim has posted comments on this change.
Change subject: jsonrpc: Vdsm changes
......................................................................
Patch Set 25: Code-Review+1
--
To view, visit http://gerrit.ovirt.org/19497
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If828355b7efe28fe6a2e784069425fefd2f3f25c
Gerrit-PatchSet: 25
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Bala.FA <barumuga(a)redhat.com>
Gerrit-Reviewer: Barak Azulay <bazulay(a)redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Sahina Bose <sabose(a)redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeyasin(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: mooli tayer <mtayer(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
10 years, 4 months