Martin Polednik has uploaded a new change for review.
Change subject: vdsm: move watchdog default params to WatchdogDevice
......................................................................
vdsm: move watchdog default params to WatchdogDevice
Watchdog device creation is currently for no reason in buildConfDevices
while it belongs to WatchdogDevice getXML method
Change-Id: Ic76f040bf78cbec3129569eb30fbf14447f742d6
Signed-off-by: Martin Polednik <mpoledni(a)redhat.com>
---
M vdsm/vm.py
1 file changed, 2 insertions(+), 10 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/31/19331/1
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 92d274e..ba268f6 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -1616,8 +1616,8 @@
</watchdog>
"""
m = self.createXmlElem(self.type, None, ['address'])
- m.setAttrs(model=self.specParams['model'],
- action=self.specParams['action'])
+ m.setAttrs(model=self.specParams.get('model', 'i6300esb'),
+ action=self.specParams.get('action', 'none'))
return m
@@ -1908,14 +1908,6 @@
# libvirt only support one watchdog device
if len(devices[WATCHDOG_DEVICES]) > 1:
raise ValueError("only a single watchdog device is supported")
- if len(devices[WATCHDOG_DEVICES]) == 1:
- if not 'specParams' in devices[WATCHDOG_DEVICES][0]:
- devices[WATCHDOG_DEVICES][0]['specParams'] = {}
- if not 'model' in devices[WATCHDOG_DEVICES][0]['specParams']:
- devices[WATCHDOG_DEVICES][0]['specParams']['model'] = \
- 'i6300esb'
- if not 'action' in devices[WATCHDOG_DEVICES][0]['specParams']:
- devices[WATCHDOG_DEVICES][0]['specParams']['action'] = 'none'
if len(devices[CONSOLE_DEVICES]) > 1:
raise ValueError("Only a single console device is supported")
--
To view, visit http://gerrit.ovirt.org/19331
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic76f040bf78cbec3129569eb30fbf14447f742d6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpoledni(a)redhat.com>
Yaniv Bronhaim has posted comments on this change.
Change subject: xmlrpc: Parsing error logging enhancement - vdsClient
......................................................................
Patch Set 2:
(1 comment)
....................................................
File lib/vdsm/vdscli.py.in
Line 37: class TransportWrapper:
Line 38: def __init__(self, transport):
Line 39: self._transport = transport
Line 40:
Line 41: def __getattr__(self, name):
imo wrapper is the right way here. you just modify the getattr which is common for attributes, and wrap the call
Line 42: if hasattr(self._transport, name):
Line 43: func = getattr(self._transport, name)
Line 44: return lambda *args, **kwargs: self._wrap(name, func, args, kwargs)
Line 45: raise AttributeError(name)
--
To view, visit http://gerrit.ovirt.org/20627
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ife29c4f7749b9cd8a4ad892f486d91509e505ae4
Gerrit-PatchSet: 2
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: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(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
Dan Kenigsberg has posted comments on this change.
Change subject: xmlrpc: Parsing error logging enhancement - vdsClient
......................................................................
Patch Set 2:
(1 comment)
....................................................
File lib/vdsm/vdscli.py.in
Line 37: class TransportWrapper:
Line 38: def __init__(self, transport):
Line 39: self._transport = transport
Line 40:
Line 41: def __getattr__(self, name):
I suspect that in this case, it would be clearer what you want to wrap.
Line 42: if hasattr(self._transport, name):
Line 43: func = getattr(self._transport, name)
Line 44: return lambda *args, **kwargs: self._wrap(name, func, args, kwargs)
Line 45: raise AttributeError(name)
--
To view, visit http://gerrit.ovirt.org/20627
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ife29c4f7749b9cd8a4ad892f486d91509e505ae4
Gerrit-PatchSet: 2
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: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(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
Dan Kenigsberg has posted comments on this change.
Change subject: xmlrpc: Parsing error logging enhancement - vdsClient
......................................................................
Patch Set 2: Code-Review-1
(5 comments)
....................................................
Commit Message
Line 5: CommitDate: 2013-10-31 09:51:44 +0100
Line 6:
Line 7: xmlrpc: Parsing error logging enhancement - vdsClient
Line 8:
Line 9: Logging enhancement which help to understand the issues with
English: which helps understand
Line 10: parsing xml response during connection to vdsm. Parsing
Line 11: issues can occur when bad characters are in xml etc.
Line 12:
Line 13: This part of fix improves debug information by printing
Line 9: Logging enhancement which help to understand the issues with
Line 10: parsing xml response during connection to vdsm. Parsing
Line 11: issues can occur when bad characters are in xml etc.
Line 12:
Line 13: This part of fix improves debug information by printing
Is there another part to the fix?
Line 14: parameters passed for function execution. During parsing
Line 15: it will be always raw response.
Line 16:
Line 17: Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=982065
Line 11: issues can occur when bad characters are in xml etc.
Line 12:
Line 13: This part of fix improves debug information by printing
Line 14: parameters passed for function execution. During parsing
Line 15: it will be always raw response.
English: I do not understand the last sentence.
Line 16:
Line 17: Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=982065
Line 18: Change-Id: Ife29c4f7749b9cd8a4ad892f486d91509e505ae4
....................................................
File lib/vdsm/vdscli.py.in
Line 37: class TransportWrapper:
Line 38: def __init__(self, transport):
Line 39: self._transport = transport
Line 40:
Line 41: def __getattr__(self, name):
which method(s) is(are) expected to raise ExpatError? I'd rather be more specific and wrap only the thing we need.
I suppose Saggy would freak out, but if its a couple of functions, how about inheriting from TransportClass?
Line 42: if hasattr(self._transport, name):
Line 43: func = getattr(self._transport, name)
Line 44: return lambda *args, **kwargs: self._wrap(name, func, args, kwargs)
Line 45: raise AttributeError(name)
Line 50: result = func(*args, **kwargs)
Line 51: else:
Line 52: result = func(self._transport, *args, **kwargs)
Line 53: except ExpatError as e:
Line 54: sys.stdout.write('Parsing error was thrown during parsing '
better use stderr for reporting errors.
Line 55: 'response. Following arguments were passed:')
Line 56: for name, value in kwargs.items():
Line 57: sys.stdout.write('{0} = {1}'.format(name, value))
Line 58: raise e
--
To view, visit http://gerrit.ovirt.org/20627
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ife29c4f7749b9cd8a4ad892f486d91509e505ae4
Gerrit-PatchSet: 2
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: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(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
Sergey Gotliv has uploaded a new change for review.
Change subject: getIsoList() returns dict with files metadata
......................................................................
getIsoList() returns dict with files metadata
Previously getIsoList() returned only list of file names although it has
additional information such as file size. Absence of this information
prevented Engine to display correct data.
Now this API returns all information about these files. It also returns
the information in the old format in order to support old Engine
versions.
Change-Id: I0b28488a81cec756188ed763e4489b8a39b2b05d
Bug-Url: https://bugzilla.redhat.com/1005889
Signed-off-by: Sergey Gotliv <sgotliv(a)redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 12 insertions(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/44/19544/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 9cfabdb..10ab687 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -2240,7 +2240,8 @@
@public
def getIsoList(self, spUUID, extension='iso', options=None):
"""
- Gets a list of all ISO/Floppy volumes in a storage pool.
+ Gets a dict of ISO/floppy files in a storage pool. For backward
+ compatibility also return a list of file names.
:param spUUID: The UUID of the storage pool you want to query.
:type spUUID: UUID
@@ -2248,7 +2249,7 @@
:type extension: str
:options: ?
- :returns: a dict of all the volumes found.
+ :returns: a dict with files info
:rtype: dict
"""
vars.task.setDefaultException(se.GetIsoListError(spUUID))
@@ -2257,18 +2258,20 @@
if not isoDom:
raise se.GetIsoListError(spUUID)
- # Get full iso files dictionary
- isodict = isoDom.getFileList(pattern='*.' + extension,
+ found = isoDom.getFileList(pattern='*.' + extension,
caseSensitive=False)
- # Get list of iso images with proper permissions only
- isolist = [key for key, value in isodict.items()
- if isodict[key]['status'] == 0]
- return {'isolist': isolist}
+
+ # Filter out files without proper permissions
+ filtered = dict((key, value) for key, value in found.items()
+ if found[key]['status'] == 0)
+
+ return {'isolist': filtered.keys(), 'isodict': filtered}
@public
def getFloppyList(self, spUUID, options=None):
"""
- Gets a list of all Floppy volumes if a storage pool.
+ Gets a dict of floppy files in a storage pool. For backward
+ compatibility also return a list of file names.
:param spUUID: The UUID of the storage pool you want to query.
:type spUUID: UUID
--
To view, visit http://gerrit.ovirt.org/19544
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b28488a81cec756188ed763e4489b8a39b2b05d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Sergey Gotliv <sgotliv(a)redhat.com>
Sergey Gotliv has uploaded a new change for review.
Change subject: getFileList() filters files in case incensitive manner
......................................................................
getFileList() filters files in case incensitive manner
Currently Engine is using getIsoList() and getFloppyList() APIs to
retrieve the list of iso and floppy files respectively. Both these APIs
are working in case incensitive manner but don't provide file
statistics. Changing getFileList(), which is already providing full
information about files, to be case incensitive will make it adoption
easier.
Change-Id: I550827c7b4c7e11fe09e41745fcc9d91249c6c23
Signed-off-by: Sergey Gotliv <sgotliv(a)redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/76/20476/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 4579763..e0423c4 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -2245,7 +2245,7 @@
dom = sdCache.produce(sdUUID=sdUUID)
if not dom.isISO or dom.getStorageType() != sd.NFS_DOMAIN:
raise se.GetFileListError(sdUUID)
- filesDict = dom.getFileList(pattern=pattern, caseSensitive=True)
+ filesDict = dom.getFileList(pattern=pattern, caseSensitive=False)
return {'files': filesDict}
@public
--
To view, visit http://gerrit.ovirt.org/20476
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I550827c7b4c7e11fe09e41745fcc9d91249c6c23
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Sergey Gotliv <sgotliv(a)redhat.com>