Yaniv Bronhaim has posted comments on this change.
Change subject: xmlrpc: Parsing error logging enhancement - vdsClient
......................................................................
Patch Set 4:
(2 comments)
....................................................
File lib/vdsm/vdscli.py.in
Line 40:
Line 41: def __getattr__(self, name):
Line 42: if hasattr(self._transport, name):
Line 43: func = getattr(self._transport, name)
Line 44: if name == 'parse_response':
do you wrap only one function called parse_response?? so modify only the specific function.. why do you need it for each call
Line 45: return lambda *args, **kwargs: self._wrap(name,
Line 46: func, args, kwargs)
Line 47: else:
Line 48: return func
Line 57: except ExpatError as e:
Line 58: sys.stderr.write('Parsing error was thrown during parsing '
Line 59: 'response. Following arguments were passed: ')
Line 60: for arg in enumerate(args):
Line 61: sys.stdout.write(arg[1])
you need to specify "\n" in this usage btw.. not sure if here its needed.
and why did you change this part ? can you add comment what should be settled in arg[1] in this case?
Line 62: raise e
Line 63: return result
Line 64:
Line 65:
--
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: 4
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
oVirt Jenkins CI Server has posted comments on this change.
Change subject: xmlrpc: Parsing error logging enhancement - vdsClient
......................................................................
Patch Set 4:
Build Failed
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/4421/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/5225/ : 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/5301/ : 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/20627
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ife29c4f7749b9cd8a4ad892f486d91509e505ae4
Gerrit-PatchSet: 4
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: No
Martin Polednik has uploaded a new change for review.
Change subject: [WIP] vm: cleanup of vm.py - removed old api references
......................................................................
[WIP] vm: cleanup of vm.py
- removed old api references
Change-Id: I2712148b670c9f85beaea40a0b2e870d829b2b4b
Signed-off-by: mpolednik <mpoledni(a)redhat.com>
---
M vdsm/vm.py
1 file changed, 2 insertions(+), 171 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/47/18047/1
diff --git a/vdsm/vm.py b/vdsm/vm.py
index a0b7310..e16a316 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -1811,172 +1811,6 @@
dev['target'] = int(self.conf.get('memSize')) * 1024
return devices
- def buildConfDevices(self):
- """
- Return the "devices" section of this Vm's conf.
- If missing, create it according to old API.
- """
- # For BC we need to save previous behaviour for old type parameters.
- # The new/old type parameter will be distinguished
- # by existence/absence of the 'devices' key
- devices = {}
- # Build devices structure
- if self.conf.get('devices') is None:
- with self._confLock:
- self.conf['devices'] = []
- devices[DISK_DEVICES] = self.getConfDrives()
- devices[NIC_DEVICES] = self.getConfNetworkInterfaces()
- devices[SOUND_DEVICES] = self.getConfSound()
- devices[VIDEO_DEVICES] = self.getConfVideo()
- devices[CONTROLLER_DEVICES] = self.getConfController()
- devices[GENERAL_DEVICES] = []
- devices[BALLOON_DEVICES] = []
- devices[WATCHDOG_DEVICES] = []
- devices[SMARTCARD_DEVICES] = self.getConfSmartcard()
- devices[REDIR_DEVICES] = []
- devices[CONSOLE_DEVICES] = []
- else:
- devices = self.getConfDevices()
-
- # 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")
-
- # Normalize vdsm images
- for drv in devices[DISK_DEVICES]:
- if isVdsmImage(drv):
- self._normalizeVdsmImg(drv)
-
- # Preserve old behavior. Since libvirt add a memory balloon device
- # to all guests, we need to specifically request not to add it.
- if len(devices[BALLOON_DEVICES]) == 0:
- devices[BALLOON_DEVICES].append({
- 'type': BALLOON_DEVICES,
- 'device': 'memballoon',
- 'specParams': {
- 'model': 'none'}})
-
- return devices
-
- def getConfController(self):
- """
- Normalize controller device.
- """
- controllers = []
- # For now we create by default only 'virtio-serial' controller
- controllers.append({'type': CONTROLLER_DEVICES,
- 'device': 'virtio-serial'})
- return controllers
-
- def getConfVideo(self):
- """
- Normalize video device provided by conf.
- """
- vcards = []
- if self.conf.get('display') == 'vnc':
- devType = 'cirrus'
- elif self.conf.get('display') == 'qxl':
- devType = 'qxl'
-
- monitors = int(self.conf.get('spiceMonitors', '1'))
- vram = '65536' if (monitors <= 2) else '32768'
- for idx in range(monitors):
- vcards.append({'type': VIDEO_DEVICES, 'specParams': {'vram': vram},
- 'device': devType})
-
- return vcards
-
- def getConfSmartcard(self):
- """
- Normalize smartcard device (now there is only one)
- """
- cards = []
- if self.conf.get('smartcard'):
- cards.append({'device': SMARTCARD_DEVICES,
- 'specParams': {'mode': 'passthrough',
- 'type': 'spicevmc'}})
- return cards
-
- def getConfSound(self):
- """
- Normalize sound device provided by conf.
- """
- scards = []
- if self.conf.get('soundDevice'):
- scards.append({'type': SOUND_DEVICES,
- 'device': self.conf.get('soundDevice')})
-
- return scards
-
- def getConfNetworkInterfaces(self):
- """
- Normalize networks interfaces provided by conf.
- """
- nics = []
- macs = self.conf.get('macAddr', '').split(',')
- models = self.conf.get('nicModel', '').split(',')
- bridges = self.conf.get('bridge', DEFAULT_BRIDGE).split(',')
- if macs == ['']:
- macs = []
- if models == ['']:
- models = []
- if bridges == ['']:
- bridges = []
- if len(models) < len(macs) or len(models) < len(bridges):
- raise ValueError('Bad nic specification')
- if models and not (macs or bridges):
- raise ValueError('Bad nic specification')
- if not macs or not models or not bridges:
- return ''
- macs = macs + [macs[-1]] * (len(models) - len(macs))
- bridges = bridges + [bridges[-1]] * (len(models) - len(bridges))
-
- for mac, model, bridge in zip(macs, models, bridges):
- if model == 'pv':
- model = 'virtio'
- nics.append({'type': NIC_DEVICES, 'macAddr': mac,
- 'nicModel': model, 'network': bridge,
- 'device': 'bridge'})
- return nics
-
- def getConfDrives(self):
- """
- Normalize drives provided by conf.
- """
- # FIXME
- # Will be better to change the self.conf but this implies an API change
- # Remove this when the API parameters will be consistent.
- confDrives = self.conf.get('drives', [])
- if not confDrives:
- confDrives.extend(self.__legacyDrives())
- confDrives.extend(self.__removableDrives())
-
- for drv in confDrives:
- drv['type'] = DISK_DEVICES
- drv['format'] = drv.get('format') or 'raw'
- drv['propagateErrors'] = drv.get('propagateErrors') or 'off'
- drv['readonly'] = False
- drv['shared'] = False
- # FIXME: For BC we have now two identical keys: iface = if
- # Till the day that conf will not returned as a status anymore.
- drv['iface'] = drv.get('iface') or drv.get('if', 'ide')
-
- # Update indices for drives devices
- self.normalizeDrivesIndices(confDrives)
-
- return confDrives
-
def updateDriveIndex(self, drv):
if not drv['iface'] in self._usedIndices:
self._usedIndices[drv['iface']] = []
@@ -2825,9 +2659,9 @@
def _run(self):
self.log.info("VM wrapper has started")
self.conf['smp'] = self.conf.get('smp', '1')
+ devices = self.getConfDevices()
if not 'recover' in self.conf:
- devices = self.buildConfDevices()
self.preparePaths(devices[DISK_DEVICES])
# Update self.conf with updated devices
# For old type vmParams, new 'devices' key will be
@@ -2851,10 +2685,7 @@
# For BC we should to keep running VM run after vdsm upgrade.
# So, because this vm doesn't have normalize conf we need to build
# it in recovery flow
- if not self.conf.get('devices'):
- devices = self.buildConfDevices()
- else:
- devices = self.getConfDevices()
+ pass
devMap = {DISK_DEVICES: Drive,
NIC_DEVICES: NetworkInterfaceDevice,
--
To view, visit http://gerrit.ovirt.org/18047
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2712148b670c9f85beaea40a0b2e870d829b2b4b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpoledni(a)redhat.com>
Nir Soffer has uploaded a new change for review.
Change subject: lvm: Do not use udev cache for obtaining device list
......................................................................
lvm: Do not use udev cache for obtaining device list
lvm is obtaining the device list from udev. When using concurrently,
udev sometimes returns incomplete list, which cause lvm to think that a
vg is missing, and the command may fail with "Volume group not found"
error, or "Cannot change VG test while PVs are missing".
lvm fixed this issue in version 2.02.100-7.el6 by disabling udev cache,
setting obtain_device_list_from_udev to 0. Unfortunatlly, lvm fix is not
enough for vdsm, as the fix is applied only if no lvm.conf file exists.
When upgrading existing lvm installation, lvm creates a lvm.conf.rpmnew
file, and the system administrator is responsible for updating lvm
configuration.
This patch disable udev cache using the --config option, used to
override many other lvm options, ensuring proper configuration on both
new and upgraded systems.
Disabling udev cache may have minimal performance effect according to
lvm developers.
Change-Id: Ib55c8d444f3be9f63bfd23d8def60607b5b3dff0
Bug-Url: https://bugzilla.redhat.com/1014942
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M vdsm/storage/lvm.py
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/90/20890/1
diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py
index 0c2964e..065e1ea 100644
--- a/vdsm/storage/lvm.py
+++ b/vdsm/storage/lvm.py
@@ -105,6 +105,7 @@
ignore_suspended_devices=1
write_cache_state=0
disable_after_error_count=3
+obtain_device_list_from_udev=0
%s
}
--
To view, visit http://gerrit.ovirt.org/20890
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib55c8d444f3be9f63bfd23d8def60607b5b3dff0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>