Change in vdsm[master]: pyroute2: release() is deprecated
by phoracek@redhat.com
Petr Horáček has uploaded a new change for review.
Change subject: pyroute2: release() is deprecated
......................................................................
pyroute2: release() is deprecated
release() method is deprecated, use close() instead.
Change-Id: Idbfe663b6180654dba76d69ccc11ecbf14abff8e
Signed-off-by: Petr Horáček <phoracek(a)redhat.com>
---
M vdsm/network/configurators/pyroute_two.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/99/34199/1
diff --git a/vdsm/network/configurators/pyroute_two.py b/vdsm/network/configurators/pyroute_two.py
index 08df1c4..1e41266 100644
--- a/vdsm/network/configurators/pyroute_two.py
+++ b/vdsm/network/configurators/pyroute_two.py
@@ -164,4 +164,4 @@
libvirt.removeNetwork(network)
def releaseSocket(self):
- self.ip.release()
+ self.ip.close()
--
To view, visit http://gerrit.ovirt.org/34199
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idbfe663b6180654dba76d69ccc11ecbf14abff8e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phoracek(a)redhat.com>
8 years, 11 months
Change in vdsm[master]: networkTests: setupNetworksAddBondWithManyVlans bond not found
by phoracek@redhat.com
Petr Horáček has uploaded a new change for review.
Change subject: networkTests: setupNetworksAddBondWithManyVlans bond not found
......................................................................
networkTests: setupNetworksAddBondWithManyVlans bond not found
testSetupNetworksAddBondWithManyVlans always fails on Jenkins
with 'bond0.0' not found in ...' error
(http://jenkins.ovirt.org/job/vdsm_master_network_functional_
tests_gerrit/1837/testReport/junit/networkTests/NetworkTest/
testSetupNetworksAddBondWithManyVlans_kwargs_False_/)
Change-Id: Iccd0ba18ac223a63c6633ee64772cfe6998288b1
Signed-off-by: Petr Horáček <phoracek(a)redhat.com>
---
M tests/functional/networkTests.py
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/55/31855/1
diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py
index ed45b2a..581400b 100644
--- a/tests/functional/networkTests.py
+++ b/tests/functional/networkTests.py
@@ -294,6 +294,8 @@
@ValidateRunningAsRoot
def testSetupNetworksAddBondWithManyVlans(self, bridged):
def assertDevStatsReported():
+ # import time
+ # time.sleep(1)
status, msg, hostStats = self.vdsm_net.getVdsStats()
self.assertEqual(status, SUCCESS, msg)
self.assertIn('network', hostStats)
--
To view, visit http://gerrit.ovirt.org/31855
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iccd0ba18ac223a63c6633ee64772cfe6998288b1
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phoracek(a)redhat.com>
8 years, 11 months
Change in vdsm[master]: Revert "hba: Run fc-scan in supervdsm"
by Nir Soffer
Nir Soffer has uploaded a new change for review.
Change subject: Revert "hba: Run fc-scan in supervdsm"
......................................................................
Revert "hba: Run fc-scan in supervdsm"
In commit 0636b8607b (Revert "supervdsm: Add zombiereaper to supervdsm")
We removed zombiereaper from supervdsm, but hba._scan(), called from
supervdsm was depending on zombiereaper reaping stuck fc-scan processes.
This cause stuck fc-scan Python processes to run as zombie for the whole
lifetime of the supervdsm processs.
This revert back to running fc-scan using sudo from vdsm. We can
reintrocude the reverted patch when we have a working zombiereaper in
supervdsm.
This reverts commit 5a6ae1a266e6808861a10933d7cacb81838050f1.
Change-Id: Ica493bd2e269ae3fcee2e2ec91df5aa5e323a23f
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
M vdsm/storage/hba.py
M vdsm/sudoers.vdsm.in
M vdsm/supervdsmServer
3 files changed, 7 insertions(+), 26 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/61/37261/1
diff --git a/vdsm/storage/hba.py b/vdsm/storage/hba.py
index efd0273..0d4e688 100644
--- a/vdsm/storage/hba.py
+++ b/vdsm/storage/hba.py
@@ -31,7 +31,6 @@
from vdsm.infra import zombiereaper
import misc
-import supervdsm
log = logging.getLogger("Storage.HBA")
@@ -44,41 +43,27 @@
NODE_NAME = "node_name"
-class Error(Exception):
- """ hba operation failed """
-
-
@misc.samplingmethod
def rescan():
"""
Rescan HBAs discovering new devices.
"""
- log.debug("Starting scan")
- try:
- supervdsm.getProxy().hbaRescan()
- except Error as e:
- log.error("Scan failed: %s", e)
- else:
- log.debug("Scan finished")
-
-
-def _rescan():
- """
- Called from supervdsm to perform rescan as root.
- """
timeout = config.getint('irs', 'scsi_rescan_maximal_timeout')
- proc = utils.execCmd([constants.EXT_FC_SCAN], sync=False,
+ log.debug("Starting scan")
+ proc = utils.execCmd([constants.EXT_FC_SCAN], sync=False, sudo=True,
execCmdLogger=log)
try:
proc.wait(timeout)
finally:
if proc.returncode is None:
+ log.warning("Timeout scanning")
zombiereaper.autoReapPID(proc.pid)
- raise Error("Timeout scanning (pid=%s)" % proc.pid)
elif proc.returncode != 0:
stderr = proc.stderr.read(512)
- raise Error("Scan failed: %r" % stderr)
+ log.error("Scan failed: %r", stderr)
+ else:
+ log.debug("Scan finished")
def getiSCSIInitiators():
diff --git a/vdsm/sudoers.vdsm.in b/vdsm/sudoers.vdsm.in
index da88ff2..0572866 100644
--- a/vdsm/sudoers.vdsm.in
+++ b/vdsm/sudoers.vdsm.in
@@ -15,6 +15,7 @@
@BINDIR@/vdsm-tool service-restart multipathd, \
@BINDIR@/vdsm-tool service-reload multipathd, \
@ISCSIADM_PATH@ *, \
+ @LIBEXECDIR@/fc-scan, \
@LVM_PATH@, \
@CAT_PATH@ /sys/block/*/device/../../*, \
@CAT_PATH@ /sys/devices/platform/host*, \
diff --git a/vdsm/supervdsmServer b/vdsm/supervdsmServer
index 7a984e4..1c10c81 100755
--- a/vdsm/supervdsmServer
+++ b/vdsm/supervdsmServer
@@ -65,7 +65,6 @@
from storage.iscsi import getDevIscsiInfo as _getdeviSCSIinfo
from storage.iscsi import readSessionInfo as _readSessionInfo
from supervdsm import _SuperVdsmManager
-from storage import hba
from storage.fileUtils import chown, resolveGid, resolveUid
from storage.fileUtils import validateAccess as _validateAccess
from vdsm.constants import METADATA_GROUP, EXT_CHOWN, EXT_UDEVADM, \
@@ -347,10 +346,6 @@
@logDecorator
def fuser(self, *args, **kwargs):
return fuser.fuser(*args, **kwargs)
-
- @logDecorator
- def hbaRescan(self):
- return hba._rescan()
@logDecorator
def set_rp_filter_loose(self, dev):
--
To view, visit http://gerrit.ovirt.org/37261
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica493bd2e269ae3fcee2e2ec91df5aa5e323a23f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
8 years, 11 months
Change in vdsm[master]: WIP client: allow tuning of more SLA params
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: WIP client: allow tuning of more SLA params
......................................................................
WIP client: allow tuning of more SLA params
still WIP, we probably don't want this.
Change-Id: I03e0900b829d49a63bef89e260ad2dc0be7e0a79
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M client/vdsClient.py
M vdsm/API.py
2 files changed, 14 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/38/38938/1
diff --git a/client/vdsClient.py b/client/vdsClient.py
index 546deab..7ed4c89 100644
--- a/client/vdsClient.py
+++ b/client/vdsClient.py
@@ -272,8 +272,11 @@
return self.ExecAndExit(self.s.setNumberOfCpus(args[0], args[1]))
def updateVmPolicy(self, args):
- params = {'vmId': args[0], 'vcpuLimit': args[1]}
- return self.ExecAndExit(self.s.updateVmPolicy(params))
+ if args[1] in ('vcpuLimit', 'vcpuQuota', 'vcpuPeriod'):
+ params = {'vmId': args[0], args[1]: args[2]}
+ return self.ExecAndExit(self.s.updateVmPolicy(params))
+ else:
+ raise ValueError('Invalid argument "%s".' % args[1])
def do_changeCD(self, args):
vmId = args[0]
@@ -2807,7 +2810,7 @@
)),
'updateVmPolicy': (
serv.updateVmPolicy, (
- '<vmId> <vcpuLimit>',
+ '<vmId> [vcpuLimit|vcpuQuota|vcpuPeriod] value',
'set SLA parameter for a VM'
)),
'externalVMList': (
diff --git a/vdsm/API.py b/vdsm/API.py
index 8151ff4..8d6f0a7 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -496,6 +496,14 @@
# Remove the vmId parameter from params we do not need it anymore
del params["vmId"]
+ vcpuQuota = params.pop('vcpuQuota', None)
+ if vcpuQuota:
+ return curVm.setCpuTuneQuota(vcpuQuota)
+
+ vcpuPeriod = params.pop('vcpuPeriod', None)
+ if vcpuPeriod:
+ return curVm.setCpuTunePeriod(vcpuPeriod)
+
return curVm.updateVmPolicy(params)
def migrate(self, params):
--
To view, visit https://gerrit.ovirt.org/38938
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I03e0900b829d49a63bef89e260ad2dc0be7e0a79
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
8 years, 11 months
Change in vdsm[master]: client: add terse list output
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: client: add terse list output
......................................................................
client: add terse list output
Mostly a debug aid to make sure to exercise
the short output of getVMList API
(getVMList(fullStatus=False, ...)
Change-Id: I6cb93285dca4d52a07147eba394c7070545c54db
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M client/vdsClient.py
1 file changed, 11 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/23/38823/1
diff --git a/client/vdsClient.py b/client/vdsClient.py
index 1fdf432..546deab 100644
--- a/client/vdsClient.py
+++ b/client/vdsClient.py
@@ -287,7 +287,7 @@
def do_list(self, args):
"""
- Usage: vdsClient 0 list [table/long/ids] [vms:vmId1,vmId2]
+ Usage: vdsClient 0 list [table/long/sort/ids] [vms:vmId1,vmId2]
"""
def _vmsParser(vmsParam):
vmsList = vmsParam.split(':')[1].strip()
@@ -297,7 +297,7 @@
raise ValueError('Empty VMs list.')
return vmsList
- vmListViews = ('table', 'long', 'ids')
+ vmListViews = ('table', 'long', 'terse', 'ids')
view = 'long' # Default view
vms = []
@@ -323,7 +323,8 @@
if not vms or res['vmId'] in vms:
allStats[res['vmId']] = res
- response = self.s.list(True, vms)
+ fullStatus = True if view == 'long' else False
+ response = self.s.list(fullStatus, vms)
if response['status']['code']:
return response['status']['code'], response['status']['message']
@@ -333,6 +334,12 @@
conf['sysprepInf'] = '<<exists>>'
if not self.quiet:
printConf(conf)
+
+ elif view == 'terse':
+ vmId = conf.pop('vmId')
+ status = conf.pop('status')
+ extra = " extra=%s" % str(conf) if conf else ""
+ print("%-36s %-20s%s" % (vmId, status, extra))
elif view == 'table':
vmId = conf['vmId']
@@ -2144,6 +2151,7 @@
" 'vmId1,vmId2,...'",
'Optional views:',
' "long" all available configuration info (Default).',
+ ' "terse" terse output with vmId, Status.',
' "table" table output with the fields: vmId, vmName, '
'Status and IP.',
' "ids" all vmIds.'
--
To view, visit https://gerrit.ovirt.org/38823
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6cb93285dca4d52a07147eba394c7070545c54db
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
8 years, 11 months
Change in vdsm[master]: client: add option to make quiet
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: client: add option to make quiet
......................................................................
client: add option to make quiet
When used for (quite brutal) benchmarking, the output
from vdsClient can add noise and can cause a (little)
slowdown.
Add an option to make it quiet.
Change-Id: Icbb9654b47fd993aee34b2292a1d94d1e4019b6a
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M client/vdsClient.py
1 file changed, 25 insertions(+), 12 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/40/35340/1
diff --git a/client/vdsClient.py b/client/vdsClient.py
index 583a0a2..d675228 100644
--- a/client/vdsClient.py
+++ b/client/vdsClient.py
@@ -183,11 +183,12 @@
self.useSSL = False
self.truststore = None
self.pretty = True
+ self.quiet = False
def do_connect(self, hostPort):
self.s = vdscli.connect(hostPort, self.useSSL, self.truststore)
- def ExecAndExit(self, response, parameterName='none'):
+ def printResponse(self, response, parameterName='none'):
if response['status']['code'] != 0:
print response['status']['message']
else:
@@ -202,6 +203,10 @@
printDict(response['info'], self.pretty)
else:
printDict(response['status'], self.pretty)
+
+ def ExecAndExit(self, response, parameterName='none'):
+ if not self.quiet:
+ self.printResponse(response, parameterName)
sys.exit(response['status']['code'])
def do_create(self, args):
@@ -309,7 +314,8 @@
if view == 'long':
if 'sysprepInf' in conf:
conf['sysprepInf'] = '<<exists>>'
- printConf(conf)
+ if not self.quiet:
+ printConf(conf)
elif view == 'table':
vmId = conf['vmId']
@@ -318,20 +324,23 @@
status = conf['status']
if allStats[vmId].get('monitorResponse') == '-1':
status += '*'
- print("%-36s %6s %-20s %-20s %-20s" %
- (vmId, conf.get('pid', 'none'),
- conf.get('vmName', '<< NO NAME >>'),
- status, allStats[vmId].get('guestIPs', '')))
+ if not self.quiet:
+ print("%-36s %6s %-20s %-20s %-20s" %
+ (vmId, conf.get('pid', 'none'),
+ conf.get('vmName', '<< NO NAME >>'),
+ status, allStats[vmId].get('guestIPs', '')))
elif view == 'ids':
- print conf['vmId']
+ if not self.quiet:
+ print conf['vmId']
sys.exit(response['status']['code'])
def do_destroy(self, args):
vmId = args[0]
response = self.s.destroy(vmId)
- print response['status']['message']
+ if not self.quiet:
+ print response['status']['message']
sys.exit(response['status']['code'])
def do_pause(self, args):
@@ -356,7 +365,8 @@
response = self.s.shutdown(vmId, delay, message, reboot)
else:
response = self.s.shutdown(vmId, delay, message)
- print response['status']['message']
+ if not self.quiet:
+ print response['status']['message']
sys.exit(response['status']['code'])
def do_setVmTicket(self, args):
@@ -2765,9 +2775,10 @@
commands.update(ge.getGlusterCmdDict(serv))
try:
- opts, args = getopt.getopt(sys.argv[1:], "hmso", ["help", "methods",
- "SSL", "truststore=",
- "oneliner"])
+ opts, args = getopt.getopt(sys.argv[1:],
+ "hmsoq",
+ ["help", "methods", "SSL", "truststore=",
+ "oneliner", "quiet"])
for o, v in opts:
if o == "-h" or o == "--help":
@@ -2782,6 +2793,8 @@
serv.truststore = v
if o == '-o' or o == '--oneliner':
serv.pretty = False
+ if o == '-q' or o == '--quiet':
+ serv.quiet = True
if len(args) < 2:
raise Exception("Need at least two arguments")
server, command = args[0:2]
--
To view, visit http://gerrit.ovirt.org/35340
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icbb9654b47fd993aee34b2292a1d94d1e4019b6a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
8 years, 11 months
Change in vdsm[master]: client: vm params from JSON
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: client: vm params from JSON
......................................................................
client: vm params from JSON
the 'create' parameter accepts a configuration
file as source to define the parameters of the VM
being created.
This patch add support to
1. use JSON for this configuration file, so there is
little to no need to reformat data from Engine,
for example took from VDSM logs
2. use stdin as input, avoiding the need to write
(temporary) files.
Change-Id: Ic6a73bc0e5fe87eb1a48c708e7ea316c6d9df7e5
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M client/vdsClient.py
1 file changed, 95 insertions(+), 68 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/92/35292/1
diff --git a/client/vdsClient.py b/client/vdsClient.py
index aabf7a1..583a0a2 100644
--- a/client/vdsClient.py
+++ b/client/vdsClient.py
@@ -19,6 +19,7 @@
import sys
import ast
+import json
import getopt
import traceback
import xmlrpclib
@@ -204,74 +205,13 @@
sys.exit(response['status']['code'])
def do_create(self, args):
- params = {}
- drives = []
- devices = []
- cpuPinning = {}
- numaTune = {}
- guestNumaNodes = []
- confLines = []
- confFile = open(args[0])
- for line in confFile.readlines():
- line = re.sub("\s+", '', line)
- line = re.sub("\#.*", '', line)
- if line:
- confLines.append(line)
- if len(args) > 1:
- confLines.extend(args[1:])
- for line in confLines:
- if '=' in line:
- param, value = line.split("=", 1)
- if param == 'devices':
- devices.append(self._parseDriveSpec(value))
- elif param == 'drive':
- drives.append(self._parseDriveSpec(value))
- elif param == 'cpuPinning':
- cpuPinning, rStr = self._parseNestedSpec(value)
- elif param == 'numaTune':
- numaTune, rStr = self._parseNestedSpec(value)
- elif param == 'guestNumaNodes':
- guestNumaNodes.append(self._parseDriveSpec(value))
- elif param.startswith('custom_'):
- if 'custom' not in params:
- params['custom'] = {}
- params['custom'][param[7:]] = value
- else:
- if param in ('cdrom', 'floppy'):
- value = self._parseDriveSpec(value)
- params[param] = value
- else:
- params[line.strip()] = ''
- if cpuPinning:
- params['cpuPinning'] = cpuPinning
- if numaTune:
- params['numaTune'] = numaTune
- if guestNumaNodes:
- params['guestNumaNodes'] = guestNumaNodes
- if drives:
- params['drives'] = drives
- if devices:
- params['devices'] = devices
- # Backward compatibility for vdsClient users
- if 'vt' in params:
- params['kvmEnable'] = params['vt']
-
- if 'imageFile' in params:
- params['hda'] = params['imageFile']
-
- drives = ['hdd', 'hdc', 'hdb']
- if 'moreImages' in params:
- for image in params['moreImages'].split(','):
- params[drives.pop()] = image
-
- if 'sysprepInf' in params:
- infFile = open(params['sysprepInf'], 'rb')
- try:
- params['sysprepInf'] = xmlrpclib.Binary(infFile.read())
- finally:
- infFile.close()
-
- return self.ExecAndExit(self.s.create(params))
+ if args[0] == '-' or args[0].endswith('.json'):
+ params = self._readVmParamsFromJson(args)
+ else:
+ params = self._readVmParamsFromConf(args)
+ if params is not None:
+ return self.ExecAndExit(self.s.create(params))
+ return sys.exit(1)
def vmUpdateDevice(self, args):
params = self._eqSplit(args[1:])
@@ -1884,6 +1824,93 @@
return status['status']['code'], status['status']['message']
+ def _readVmParamsFromJson(self, args):
+ if args[0] == "-":
+ data = sys.stdin.read()
+ else:
+ try:
+ with open(args[0]) as f:
+ data = f.read()
+ except IOError as e:
+ print "failed to read VM config: %s" % str(e)
+ return None
+ try:
+ return json.loads(data)
+ except ValueError as e:
+ print "failed to decode VM config: %s" % str(e)
+ return None
+
+ def _readVmParamsFromConf(self, args):
+ params = {}
+ drives = []
+ devices = []
+ cpuPinning = {}
+ numaTune = {}
+ guestNumaNodes = []
+ confLines = []
+ confFile = open(args[0])
+ for line in confFile.readlines():
+ line = re.sub("\s+", '', line)
+ line = re.sub("\#.*", '', line)
+ if line:
+ confLines.append(line)
+ if len(args) > 1:
+ confLines.extend(args[1:])
+ for line in confLines:
+ if '=' in line:
+ param, value = line.split("=", 1)
+ if param == 'devices':
+ devices.append(self._parseDriveSpec(value))
+ elif param == 'drive':
+ drives.append(self._parseDriveSpec(value))
+ elif param == 'cpuPinning':
+ cpuPinning, rStr = self._parseNestedSpec(value)
+ elif param == 'numaTune':
+ numaTune, rStr = self._parseNestedSpec(value)
+ elif param == 'guestNumaNodes':
+ guestNumaNodes.append(self._parseDriveSpec(value))
+ elif param.startswith('custom_'):
+ if 'custom' not in params:
+ params['custom'] = {}
+ params['custom'][param[7:]] = value
+ else:
+ if param in ('cdrom', 'floppy'):
+ value = self._parseDriveSpec(value)
+ params[param] = value
+ else:
+ params[line.strip()] = ''
+ if cpuPinning:
+ params['cpuPinning'] = cpuPinning
+ if numaTune:
+ params['numaTune'] = numaTune
+ if guestNumaNodes:
+ params['guestNumaNodes'] = guestNumaNodes
+ if drives:
+ params['drives'] = drives
+ if devices:
+ params['devices'] = devices
+ # Backward compatibility for vdsClient users
+ if 'vt' in params:
+ params['kvmEnable'] = params['vt']
+
+ if 'imageFile' in params:
+ params['hda'] = params['imageFile']
+
+ drives = ['hdd', 'hdc', 'hdb']
+ if 'moreImages' in params:
+ for image in params['moreImages'].split(','):
+ params[drives.pop()] = image
+
+ if 'sysprepInf' in params:
+ infFile = open(params['sysprepInf'], 'rb')
+ try:
+ params['sysprepInf'] = xmlrpclib.Binary(infFile.read())
+ finally:
+ infFile.close()
+
+ return params
+
+
if __name__ == '__main__':
if _glusterEnabled:
serv = ge.GlusterService()
--
To view, visit http://gerrit.ovirt.org/35292
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic6a73bc0e5fe87eb1a48c708e7ea316c6d9df7e5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
8 years, 11 months
Change in vdsm[master]: vdsm: removed optional markers for volUUID
by cshereme@redhat.com
Candace Sheremeta has uploaded a new change for review.
Change subject: vdsm: removed optional markers for volUUID
......................................................................
vdsm: removed optional markers for volUUID
after examining the code, it's clear that the volUUID parameter
for vdsClient's prepareImage command is NOT optional. therefore,
I have removed any comments marking it as optional in the
vdsClient documentation and in vdsmapi-schema.json
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1115556
Change-Id: Ic88bc322bbf84bf79e51edd714687565b123a9c8
Signed-off-by: Candace Sheremeta <cshereme(a)redhat.com>
---
M client/vdsClient.py
M vdsm/rpc/vdsmapi-schema.json
2 files changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/40/38440/1
diff --git a/client/vdsClient.py b/client/vdsClient.py
index 07dbaa2..c8aa7cf 100644
--- a/client/vdsClient.py
+++ b/client/vdsClient.py
@@ -2595,7 +2595,7 @@
'methodArgs.'
)),
'prepareImage': (serv.prepareImage, (
- '<spUUID> <sdUUID> <imgUUID> [<volUUID>]',
+ '<spUUID> <sdUUID> <imgUUID> <volUUID>',
'Prepare an image, making the needed volumes available.'
)),
'teardownImage': (serv.teardownImage, (
diff --git a/vdsm/rpc/vdsmapi-schema.json b/vdsm/rpc/vdsmapi-schema.json
index 1d919e8..5b99aaa 100644
--- a/vdsm/rpc/vdsmapi-schema.json
+++ b/vdsm/rpc/vdsmapi-schema.json
@@ -4715,13 +4715,13 @@
#
# @imageID: The UUID of the Image
#
-# @volumeID: #optional The UUID of the Volume (optional)
+# @volumeID: The UUID of the Volume
#
# Since: 4.15.0
##
{'command': {'class': 'Image', 'name': 'prepare'},
'data': {'storagepoolID': 'UUID', 'storagedomainID': 'UUID',
- 'imageID': 'UUID', '*volumeID': 'UUID'}}
+ 'imageID': 'UUID', 'volumeID': 'UUID'}}
##
# @Image.teardown:
--
To view, visit https://gerrit.ovirt.org/38440
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic88bc322bbf84bf79e51edd714687565b123a9c8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Candace Sheremeta <cshereme(a)redhat.com>
8 years, 11 months
Change in vdsm[master]: api: use recommended logging
by fromani@redhat.com
Francesco Romani has uploaded a new change for review.
Change subject: api: use recommended logging
......................................................................
api: use recommended logging
Update the logging in setLogLevel to use
less convoluted and more modern idiom.
Change-Id: I91c3b4aa3344b5093d13fb11e017394cf0bf52b2
Signed-off-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/API.py
1 file changed, 1 insertion(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/22/38422/1
diff --git a/vdsm/API.py b/vdsm/API.py
index 42c471e..6b8da3a 100644
--- a/vdsm/API.py
+++ b/vdsm/API.py
@@ -1369,8 +1369,7 @@
Doesn't survive a restart
"""
- logging.getLogger('clientIF.setLogLevel').info('Setting loglevel '
- 'to %s' % level)
+ logging.info('Setting loglevel to %s', level)
handlers = logging.getLogger().handlers
[fileHandler] = [h for h in handlers if
isinstance(h, logging.FileHandler)]
--
To view, visit https://gerrit.ovirt.org/38422
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I91c3b4aa3344b5093d13fb11e017394cf0bf52b2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
8 years, 11 months
Change in vdsm[master]: gluster.hostname: simplify by using a constant for the 'host...
by osvoboda@redhat.com
Ondřej Svoboda has uploaded a new change for review.
Change subject: gluster.hostname: simplify by using a constant for the 'hostname' executable
......................................................................
gluster.hostname: simplify by using a constant for the 'hostname' executable
Change-Id: Ic4b4a0062bedc41bee6528c1d06d707b4f7547e6
Signed-off-by: Ondřej Svoboda <osvoboda(a)redhat.com>
---
M lib/vdsm/constants.py.in
M vdsm/gluster/Makefile.am
R vdsm/gluster/hostname.py
3 files changed, 5 insertions(+), 16 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/21/37621/1
diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in
index 89bdebd..fa65b0c 100644
--- a/lib/vdsm/constants.py.in
+++ b/lib/vdsm/constants.py.in
@@ -114,6 +114,8 @@
EXT_GREP = '@GREP_PATH@'
+EXT_HOSTNAME = '@HOSTNAME_PATH@'
+
EXT_IFDOWN = '@IFDOWN_PATH@'
EXT_IFUP = '@IFUP_PATH@'
EXT_IONICE = '@IONICE_PATH@'
diff --git a/vdsm/gluster/Makefile.am b/vdsm/gluster/Makefile.am
index 96b8054..da32685 100644
--- a/vdsm/gluster/Makefile.am
+++ b/vdsm/gluster/Makefile.am
@@ -22,10 +22,6 @@
vdsmglusterdir = $(vdsmdir)/gluster
-nodist_vdsmgluster_PYTHON = \
- hostname.py
- $(NULL)
-
dist_vdsmgluster_PYTHON = \
__init__.py \
api.py \
@@ -33,19 +29,9 @@
cli.py \
exception.py \
gfapi.py \
+ hostname.py \
hooks.py \
services.py \
storagedev.py \
tasks.py \
$(NULL)
-
-EXTRA_DIST = \
- hostname.py.in
- $(NULL)
-
-CLEANFILES = \
- hostname.py
- $(NULL)
-
-all-local: \
- $(nodist_vdsmgluster_PYTHON)
diff --git a/vdsm/gluster/hostname.py.in b/vdsm/gluster/hostname.py
similarity index 91%
rename from vdsm/gluster/hostname.py.in
rename to vdsm/gluster/hostname.py
index c817b0a..6b30ac3 100644
--- a/vdsm/gluster/hostname.py.in
+++ b/vdsm/gluster/hostname.py
@@ -18,6 +18,7 @@
# Refer to the README and COPYING files for full details of the license
#
+from vdsm import constants
from vdsm import utils
@@ -31,7 +32,7 @@
def getHostNameFqdn():
- rc, out, err = utils.execCmd(['@HOSTNAME_PATH@', '--fqdn'])
+ rc, out, err = utils.execCmd([constants.EXT_HOSTNAME, '--fqdn'])
if rc:
raise HostNameException(rc)
else:
--
To view, visit http://gerrit.ovirt.org/37621
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic4b4a0062bedc41bee6528c1d06d707b4f7547e6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda(a)redhat.com>
8 years, 11 months