Dan Kenigsberg has posted comments on this change.
Change subject: test: unstable jsonrpc tests
......................................................................
Patch Set 1: Code-Review-1
(1 comment)
http://gerrit.ovirt.org/#/c/24624/1//COMMIT_MSG
Commit Message:
Line 5: CommitDate: 2014-02-18 11:06:32 +0100
Line 6:
Line 7: test: unstable jsonrpc tests
Line 8:
Line 9: I am not sure whether this will fix test instability because I am not
Your commit message should state which instability you are trying to fix. In any case, another instability is still here:
======================================================================
FAIL: testLeakFd (miscTests.WatchCmd)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/jenkins/workspace/vdsm_unit_tests_gerrit/vdsm/tests/miscTests.py", line 988, in testLeakFd
self.assertEquals(openFdNum(), openFds)
AssertionError: 78 != 79
-------------------- >> begin captured logging << --------------------
Line 10: able to recreate it (saw only one failure in jenkins history). The ssl
Line 11: flag was not passed to constructReactor so plain tcp reactors were
Line 12: reused which might caused the issue.
Line 13:
--
To view, visit http://gerrit.ovirt.org/24624
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ibb6dfa4d6324baa0b7091ad6713854d146ec999d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
oVirt Jenkins CI Server has posted comments on this change.
Change subject: test: declare unstable test as broken
......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/7309/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/6407/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/7191/ : SUCCESS
--
To view, visit http://gerrit.ovirt.org/24645
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I0ef53ee34fdcc022c7f2984f4aad4b82ee06840a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
Francesco Romani has uploaded a new change for review.
Change subject: vdsm: prepareVolumePath payload detection cleanup
......................................................................
vdsm: prepareVolumePath payload detection cleanup
the prepareVolumePath code path for cdrom/floppy
images is complicated due the fact the code has to
deal with both regular and payload-created
images (vmPayload).
This lead to complicate and error-prone code paths,
which subsequent fixes made even more cumbersome.
This patch is a more aggressive and deep cleanup of
the code aiming to properly fix bz1047356.
The idea behind the patch is to simplify the detection
by factoring the conditions, changing the order
of the checks and factoring out the image creation
in the payload case.
This code proven to be tricky, so deep and extensive
verification is due.
Change-Id: I3a630d74ec0910c669e0326ad343c5dbea25357e
Bug-Url: https://bugzilla.redhat.com/1047356
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/clientIF.py
1 file changed, 37 insertions(+), 30 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/28/22928/1
diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py
index 8e7f5f4..134b805 100644
--- a/vdsm/clientIF.py
+++ b/vdsm/clientIF.py
@@ -241,10 +241,30 @@
self.log.info('Error finding path for device', exc_info=True)
raise vm.VolumeError(uuid)
+ def _prepareVolumeFromPayload(self, vmId, drive, device, params):
+ '''
+ vmPayload is a key in params
+ 'vmPayload': {'volId': 'volume id', # volId is optional
+ 'file': {'filename': 'content', ...}}
+ '''
+ mkFsNames = {'cdrom': 'mkIsoFs', 'floppy': 'mkFloppyFs'}
+ try:
+ mkFsFunction = getattr(supervdsm.getProxy(),
+ mkFsNames[device])
+ except AttributeError:
+ raise vm.VolumeError("Unsupported 'device': %s in "
+ "drive: %s" % (device, drive))
+ else:
+ payload = params['vmPayload']
+ files = payload['file']
+ volId = payload.get('volId')
+ return mkFsFunction(vmId, files, volId)
+
def prepareVolumePath(self, drive, vmId=None):
if type(drive) is dict:
+ device = drive['device']
# PDIV drive format
- if drive['device'] == 'disk' and vm.isVdsmImage(drive):
+ if device == 'disk' and vm.isVdsmImage(drive):
res = self.irs.prepareImage(
drive['domainID'], drive['poolID'],
drive['imageID'], drive['volumeID'])
@@ -272,36 +292,23 @@
elif "UUID" in drive:
volPath = self._getUUIDSpecPath(drive["UUID"])
- # leave path == '' for empty cdrom and floppy drives ...
- elif (drive['device'] in ('cdrom', 'floppy') and
- 'specParams' in drive and
- # next line can be removed in future, when < 3.3 engine
- # is not supported
- drive['specParams'].get('path', '') == '' and
- drive.get('path', '') == '' and
- 'vmPayload' not in drive['specParams']):
+ # cdrom and floppy drives
+ elif (device in ('cdrom', 'floppy') and 'specParams' in drive):
+ # vmPayload is a special case for those devices
+ # which needs to be handled first.
+ # caution: this code is trickier than it seems.
+ # see for example:
+ # https://bugzilla.redhat.com/shoaw_bug.cgi?id=1047356
+ params = drive['specParams']
+ if 'vmPayload' in params:
+ volPath = self._prepareVolumeFromPayload(vmId, drive,
+ device, params)
+ # leave path == '' for empty cdrom and floppy drives ...
+ elif (params.get('path', '') == '' and
+ # line above can be removed in future, when < 3.3 engine
+ # is not supported
+ drive.get('path', '') == ''):
volPath = ''
-
- # ... or load the drive from vmPayload:
- elif drive['device'] in ('cdrom', 'floppy') and \
- 'specParams' in drive and \
- 'vmPayload' in drive['specParams']:
- '''
- vmPayload is a key in specParams
- 'vmPayload': {'volId': 'volume id', # volId is optional
- 'file': {'filename': 'content', ...}}
- '''
- mkFsNames = {'cdrom': 'mkIsoFs', 'floppy': 'mkFloppyFs'}
- try:
- mkFsFunction = getattr(supervdsm.getProxy(),
- mkFsNames[drive['device']])
- except AttributeError:
- raise vm.VolumeError("Unsupported 'device': %s in "
- "drive: %" % (drive['device'], drive))
- else:
- files = drive['specParams']['vmPayload']['file']
- volId = drive['specParams']['vmPayload'].get('volId')
- volPath = mkFsFunction(vmId, files, volId)
elif "path" in drive:
volPath = drive['path']
--
To view, visit http://gerrit.ovirt.org/22928
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a630d74ec0910c669e0326ad343c5dbea25357e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
Itamar Heim has posted comments on this change.
Change subject: Add functions getNetworkList and getNetworkInfo to API
......................................................................
Patch Set 4:
ping
--
To view, visit http://gerrit.ovirt.org/2664
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6689b31541fc98ff7a7951eedbb99270c60a0738
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Lei Li <lilei(a)linux.vnet.ibm.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: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: Lei Li <lilei(a)linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
Itamar Heim has posted comments on this change.
Change subject: Schema: Typemap changes
......................................................................
Patch Set 1:
ping?
--
To view, visit http://gerrit.ovirt.org/23375
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I7af8f07e07450fda97819f64fd120536cb318717
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No