Change in vdsm[master]: snapshot: Add VM.freeze() and VM.thaw() apis.
by automation@ovirt.org
automation(a)ovirt.org has posted comments on this change.
Change subject: snapshot: Add VM.freeze() and VM.thaw() apis.
......................................................................
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.5', 'ovirt-3.4', 'ovirt-3.3'])
--
To view, visit https://gerrit.ovirt.org/43058
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I44c4237841e44548f48f626f4241d3f2e484930e
Gerrit-PatchSet: 2
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: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No
7 years, 9 months
Change in vdsm[master]: gluster:refactor: User specified backup servers option
by ahino@redhat.com
Ala Hino has uploaded a new change for review.
Change subject: gluster:refactor: User specified backup servers option
......................................................................
gluster:refactor: User specified backup servers option
Move handling user specified backup servers option from
_get_backup_servers_option method to options property.
Change-Id: I4238328cfe230852182a1d997bd51b00f686f4a8
Signed-off-by: Ala Hino <ahino(a)redhat.com>
---
M vdsm/storage/storageServer.py
1 file changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/03/43003/1
diff --git a/vdsm/storage/storageServer.py b/vdsm/storage/storageServer.py
index 3d62694..e71b88c 100644
--- a/vdsm/storage/storageServer.py
+++ b/vdsm/storage/storageServer.py
@@ -297,7 +297,11 @@
@property
def options(self):
- backup_servers_option = self._get_backup_servers_option()
+ if "backup-volfile-servers" in self._options:
+ self.log.warn("Using user specified backup-volfile-servers option")
+ backup_servers_option = ""
+ else:
+ backup_servers_option = self._get_backup_servers_option()
return ",".join(
p for p in (self._options, backup_servers_option) if p)
@@ -313,10 +317,6 @@
raise se.UnsupportedGlusterVolumeReplicaCountError(replicaCount)
def _get_backup_servers_option(self):
- if "backup-volfile-servers" in self._options:
- self.log.warn("Using user specified backup-volfile-servers option")
- return ""
-
servers = [brick.split(":")[0] for brick in self.volinfo['bricks']]
servers.remove(self._volfileserver)
if not servers:
--
To view, visit https://gerrit.ovirt.org/43003
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4238328cfe230852182a1d997bd51b00f686f4a8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ala Hino <ahino(a)redhat.com>
7 years, 9 months
Change in vdsm[master]: tests: add HostStatsThread._getCpuCoreStats test
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: tests: add HostStatsThread._getCpuCoreStats test
......................................................................
tests: add HostStatsThread._getCpuCoreStats test
Next patch wants to refactor
HostStatsThread._getCpuCoreStats into a free function,
so this patch adds very basic test coverage.
This test needs to be refactored as well, and will
be done alongside the method refactoring.
Change-Id: I6c6a82c77054e76d7d08322ad83d086302c2bbad
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M tests/samplingTests.py
M tests/vmfakelib.py
2 files changed, 49 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/72/41372/1
diff --git a/tests/samplingTests.py b/tests/samplingTests.py
index 9e3c3c3..74218e7 100644
--- a/tests/samplingTests.py
+++ b/tests/samplingTests.py
@@ -30,11 +30,14 @@
from vdsm.password import ProtectedPassword
import virt.sampling as sampling
+import caps
+
from testValidation import brokentest, ValidateRunningAsRoot
from testlib import permutations, expandPermutations
from testlib import VdsmTestCase as TestCaseBase
from monkeypatch import MonkeyPatchScope
from functional import dummy
+import vmfakelib as fake
class SamplingTests(TestCaseBase):
@@ -269,6 +272,36 @@
}
self.assertEquals(self._hs.get(), expected)
+ def testCpuCoreStats(self):
+ node_id, cpu_id = 0, 0
+ self._hs = sampling.HostStatsThread(self.log)
+ cpu_sample = {'user': 1.0, 'sys': 2.0}
+
+ for fake_ts in xrange(5): # FIXME
+ self._hs._samples.append(
+ fake.HostSample(fake_ts, {cpu_id: cpu_sample}))
+
+ def fakeNumaTopology():
+ return {
+ node_id: {
+ 'cpus': [cpu_id]
+ }
+ }
+
+ expected = {
+ '0': {
+ 'cpuIdle': '100.00',
+ 'cpuSys': '0.00',
+ 'cpuUser': '0.00',
+ 'nodeIndex': 0
+ }
+ }
+
+ with MonkeyPatchScope([(caps, 'getNumaTopology',
+ fakeNumaTopology)]):
+ self.assertEqual(self._hs._getCpuCoresStats(),
+ expected)
+
class StatsCacheTests(TestCaseBase):
diff --git a/tests/vmfakelib.py b/tests/vmfakelib.py
index 995508c..61ac448 100644
--- a/tests/vmfakelib.py
+++ b/tests/vmfakelib.py
@@ -240,3 +240,19 @@
def last(self):
return self._samples
+
+
+class CpuCoreSample(object):
+
+ def __init__(self, samples):
+ self._samples = samples
+
+ def getCoreSample(self, key):
+ return self._samples[key]
+
+
+class HostSample(object):
+
+ def __init__(self, timestamp, samples):
+ self.timestamp = timestamp
+ self.cpuCores = CpuCoreSample(samples)
--
To view, visit https://gerrit.ovirt.org/41372
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c6a82c77054e76d7d08322ad83d086302c2bbad
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
7 years, 9 months
Change in vdsm[master]: sampling: rename variables for clarity
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: sampling: rename variables for clarity
......................................................................
sampling: rename variables for clarity
Rename:
hs0 -> first_sample
hs1 -> last_sample
for clarity, and to conform to naming used elsewhere in the
module/package. No changes in logic.
Change-Id: I24d07414c96dcd047966bb28cd2f756640692f1c
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/virt/sampling.py
1 file changed, 17 insertions(+), 13 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/19/41219/1
diff --git a/vdsm/virt/sampling.py b/vdsm/virt/sampling.py
index 9ad6143..1ee485e 100644
--- a/vdsm/virt/sampling.py
+++ b/vdsm/virt/sampling.py
@@ -613,37 +613,41 @@
'elapsedTime': int(time.time() - self.startTime)
}
- hs0, hs1, _ = self._samples.stats()
+ first_sample, last_sample, _ = self._samples.stats()
# we need a different interval, see below
- if hs0 is None or hs1 is None:
+ if first_sample is None or last_sample is None:
return stats
stats.update(self._getInterfacesStats())
- interval = hs1.timestamp - hs0.timestamp
+ interval = last_sample.timestamp - first_sample.timestamp
- jiffies = (hs1.pidcpu.user - hs0.pidcpu.user) % (2 ** 32)
+ jiffies = (
+ last_sample.pidcpu.user - first_sample.pidcpu.user) % (2 ** 32)
stats['cpuUserVdsmd'] = jiffies / interval
- jiffies = (hs1.pidcpu.sys - hs0.pidcpu.sys) % (2 ** 32)
+ jiffies = (
+ last_sample.pidcpu.sys - first_sample.pidcpu.sys) % (2 ** 32)
stats['cpuSysVdsmd'] = jiffies / interval
- jiffies = (hs1.totcpu.user - hs0.totcpu.user) % (2 ** 32)
+ jiffies = (
+ last_sample.totcpu.user - first_sample.totcpu.user) % (2 ** 32)
stats['cpuUser'] = jiffies / interval / self._ncpus
- jiffies = (hs1.totcpu.sys - hs0.totcpu.sys) % (2 ** 32)
+ jiffies = (
+ last_sample.totcpu.sys - first_sample.totcpu.sys) % (2 ** 32)
stats['cpuSys'] = jiffies / interval / self._ncpus
stats['cpuIdle'] = max(0.0,
100.0 - stats['cpuUser'] - stats['cpuSys'])
- stats['memUsed'] = hs1.memUsed
- stats['anonHugePages'] = hs1.anonHugePages
- stats['cpuLoad'] = hs1.cpuLoad
+ stats['memUsed'] = last_sample.memUsed
+ stats['anonHugePages'] = last_sample.anonHugePages
+ stats['cpuLoad'] = last_sample.cpuLoad
- stats['diskStats'] = hs1.diskStats
- stats['thpState'] = hs1.thpState
+ stats['diskStats'] = last_sample.diskStats
+ stats['thpState'] = last_sample.thpState
if self._boot_time():
stats['bootTime'] = self._boot_time()
- stats['numaNodeMemFree'] = hs1.numaNodeMem.nodesMemSample
+ stats['numaNodeMemFree'] = last_sample.numaNodeMem.nodesMemSample
stats['cpuStatistics'] = self._getCpuCoresStats()
stats['v2vJobs'] = v2v.get_jobs_status()
--
To view, visit https://gerrit.ovirt.org/41219
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I24d07414c96dcd047966bb28cd2f756640692f1c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
7 years, 9 months
Change in vdsm[master]: gluster: create pv with custom dataalignment value
by tjeyasin@redhat.com
Timothy Asir has uploaded a new change for review.
Change subject: gluster: create pv with custom dataalignment value
......................................................................
gluster: create pv with custom dataalignment value
Blivet creates pv with 1mb dataalignment forcefully for
whatever given value. So that we have used vdsm.storage.lvm
module to create pv. But due to some lvm configuration
VDSM also creates pv with 1mb dataalignment value.
Seperate bug oppend for vdsm to fix this issue in
https://bugzilla.redhat.com/show_bug.cgi?id=1235086
This patch uses lvm pvcreate command as a workaround till
this bug fixed in either vdsm or blivet.
Change-Id: I5eb58f81679729af4d3dc34bc9f7edba757acc67
Signed-off-by: Timothy Asir Jeyasingh <tjeyasin(a)redhat.com>
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1178705
---
M vdsm/gluster/storagedev.py
1 file changed, 9 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/82/42782/1
diff --git a/vdsm/gluster/storagedev.py b/vdsm/gluster/storagedev.py
index eb8b103..ec18d19 100644
--- a/vdsm/gluster/storagedev.py
+++ b/vdsm/gluster/storagedev.py
@@ -32,7 +32,6 @@
from blivet.devices import LVMThinLogicalVolumeDevice
from blivet import udev
-import storage.lvm as lvm
from vdsm import utils
import fstab
@@ -41,6 +40,9 @@
log = logging.getLogger("Gluster")
+_pvCreateCommandPath = utils.CommandPath("lvcreate",
+ "/sbin/pvcreate",
+ "/usr/sbin/pvcreate",)
_vgCreateCommandPath = utils.CommandPath("vgcreate",
"/sbin/vgcreate",
"/usr/sbin/vgcreate",)
@@ -156,9 +158,12 @@
def _createPV(deviceList, alignment=0):
def _createAlignedPV(deviceList, alignment):
for dev in deviceList:
- rc, out, err = lvm._createpv(
- [dev.path], metadataSize=0,
- options=('--dataalignment', '%sK' % alignment))
+ # bz#1178705: Blivet always creates pv with 1MB dataalignment
+ # Workaround: Till blivet fixes the issue, we use lvm pvcreate
+ rc, out, err = utils.execCmd([_pvCreateCommandPath.cmd,
+ '--dataalignment',
+ '%sk' % alignment,
+ dev.path])
if rc:
raise ge.GlusterHostStorageDevicePVCreateFailedException(
dev.path, alignment, rc, out, err)
--
To view, visit https://gerrit.ovirt.org/42782
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5eb58f81679729af4d3dc34bc9f7edba757acc67
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Timothy Asir <tjeyasin(a)redhat.com>
7 years, 9 months
Change in vdsm[master]: tests: skip jsonrpc tests
by Piotr Kliczewski
Piotr Kliczewski has uploaded a new change for review.
Change subject: tests: skip jsonrpc tests
......................................................................
tests: skip jsonrpc tests
Change-Id: Ia0dcf7b83178ac539a12b3cc6857f7dd18dd6c15
Signed-off-by: pkliczewski <piotr.kliczewski(a)gmail.com>
---
M tests/jsonRpcTests.py
1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/74/42774/1
diff --git a/tests/jsonRpcTests.py b/tests/jsonRpcTests.py
index 3606bba..3a99696 100644
--- a/tests/jsonRpcTests.py
+++ b/tests/jsonRpcTests.py
@@ -22,6 +22,7 @@
from clientIF import clientIF
from contextlib import contextmanager
from monkeypatch import MonkeyPatch
+from testValidation import brokentest
from testlib import VdsmTestCase as TestCaseBase, \
expandPermutations, \
@@ -101,6 +102,7 @@
finally:
client.close()
+ @brokentest
@MonkeyPatch(clientIF, 'getInstance', getInstance)
@permutations(PERMUTATIONS)
def testMethodCallArgList(self, ssl, type):
@@ -117,6 +119,7 @@
self.assertEquals(self._callTimeout(client, "echo",
(data,), CALL_ID), data)
+ @brokentest
@MonkeyPatch(clientIF, 'getInstance', getInstance)
@permutations(PERMUTATIONS)
def testMethodCallArgDict(self, ssl, type):
@@ -132,6 +135,7 @@
self.assertEquals(self._callTimeout(client, "echo",
{'text': data}, CALL_ID), data)
+ @brokentest
@MonkeyPatch(clientIF, 'getInstance', getInstance)
@permutations(PERMUTATIONS)
def testMethodMissingMethod(self, ssl, type):
@@ -150,6 +154,7 @@
self.assertEquals(cm.exception.code,
JsonRpcMethodNotFoundError().code)
+ @brokentest
@MonkeyPatch(clientIF, 'getInstance', getInstance)
@permutations(PERMUTATIONS)
def testMethodBadParameters(self, ssl, type):
@@ -170,6 +175,7 @@
self.assertEquals(cm.exception.code,
JsonRpcInternalError().code)
+ @brokentest
@MonkeyPatch(clientIF, 'getInstance', getInstance)
@permutations(PERMUTATIONS)
def testMethodReturnsNullAndServerReturnsTrue(self, ssl, type):
@@ -186,6 +192,7 @@
CALL_ID)
self.assertEquals(res, True)
+ @brokentest
@MonkeyPatch(clientIF, 'getInstance', getInstance)
@permutations(PERMUTATIONS)
def testDoubleResponse(self, ssl, type):
@@ -205,6 +212,7 @@
CALL_ID)
self.assertEquals(res, 'sent')
+ @brokentest
@MonkeyPatch(clientIF, 'getInstance', getInstance)
@permutations(PERMUTATIONS)
def testSlowMethod(self, ssl, type):
--
To view, visit https://gerrit.ovirt.org/42774
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia0dcf7b83178ac539a12b3cc6857f7dd18dd6c15
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
7 years, 9 months
Change in vdsm[master]: hostdev: fix address type for generic devices
by Martin Polednik
Martin Polednik has uploaded a new change for review.
Change subject: hostdev: fix address type for generic devices
......................................................................
hostdev: fix address type for generic devices
Change 155e823f refactored some common elements of generic and
interface passthrough, but added type to address element only in case
of interface. Using default empty type led to invalid address being
generated.
Change-Id: Icf9e3f801e219c6a3cb4d54a77a288bd770a3697
Signed-off-by: Martin Polednik <mpolednik(a)redhat.com>
---
M vdsm/virt/vmdevices/hostdevice.py
1 file changed, 4 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/41/43041/1
diff --git a/vdsm/virt/vmdevices/hostdevice.py b/vdsm/virt/vmdevices/hostdevice.py
index 2817250..38b9cc4 100644
--- a/vdsm/virt/vmdevices/hostdevice.py
+++ b/vdsm/virt/vmdevices/hostdevice.py
@@ -85,7 +85,10 @@
type=CAPABILITY_TO_XML_ATTR[self._deviceParams['capability']])
source = hostdev.appendChildWithArgs('source')
- self._add_source_address(source)
+ self._add_source_address(
+ source,
+ type=CAPABILITY_TO_XML_ATTR[self._deviceParams['capability']]
+ )
return hostdev
--
To view, visit https://gerrit.ovirt.org/43041
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icf9e3f801e219c6a3cb4d54a77a288bd770a3697
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik(a)redhat.com>
7 years, 9 months
Change in vdsm[master]: snapshot: Add VM.freeze() and VM.thaw() apis.
by michal.skrivanek@redhat.com
Michal Skrivanek has posted comments on this change.
Change subject: snapshot: Add VM.freeze() and VM.thaw() apis.
......................................................................
Patch Set 1:
why do we want to expose freeze/thaw in API?
--
To view, visit https://gerrit.ovirt.org/43058
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I44c4237841e44548f48f626f4241d3f2e484930e
Gerrit-PatchSet: 1
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: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-HasComments: No
7 years, 9 months
Change in vdsm[master]: Revised the format of output from the vdsm-tool vdsm-id comm...
by Alon Bar-Lev
Alon Bar-Lev has posted comments on this change.
Change subject: Revised the format of output from the vdsm-tool vdsm-id command.
......................................................................
Patch Set 1:
guys, this is just adding new line.
--
To view, visit https://gerrit.ovirt.org/34583
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I7379e969881931aaa4745dedf85ddfb61487f4a4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Andrew Dahms <andrewjdahms(a)gmail.com>
Gerrit-Reviewer: Alon Bar-Lev <alonbl(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: mooli tayer <mtayer(a)redhat.com>
Gerrit-HasComments: No
7 years, 9 months