Dan Kenigsberg has uploaded a new change for review.
Change subject: vdsm startup: fix assert statement
......................................................................
vdsm startup: fix assert statement
SyntaxWarning: assertion is always true, perhaps remove parentheses?
Change-Id: I0b8cb905494b0719147bf299bb6411c3c4616407
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm/vdsm
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/45/9745/1
diff --git a/vdsm/vdsm b/vdsm/vdsm
index 035ea5d..5c81a40 100755
--- a/vdsm/vdsm
+++ b/vdsm/vdsm
@@ -118,9 +118,9 @@
"to run from user %s" % (constants.VDSM_USER, username)
)
group = grp.getgrnam(constants.VDSM_GROUP)
- assert ((constants.VDSM_USER in group.gr_mem
- or pwd.getpwnam(constants.VDSM_USER).pw_gid == group.gr_gid),
- "VDSM failed to start: vdsm user is not in KVM group")
+ assert (constants.VDSM_USER in group.gr_mem
+ or pwd.getpwnam(constants.VDSM_USER).pw_gid == group.gr_gid), \
+ "VDSM failed to start: vdsm user is not in KVM group"
if __name__ == '__main__':
__assertVdsmUser()
--
To view, visit http://gerrit.ovirt.org/9745
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b8cb905494b0719147bf299bb6411c3c4616407
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Zhou Zheng Sheng has uploaded a new change for review.
Change subject: iscsi.py: fix log message format
......................................................................
iscsi.py: fix log message format
The logging methods accept the first argument as message, and rest
arguments as format values and options. The original code wrongly splits
a message into several arguments, so only the first part is recognized as
message and the rest are recognized as values.
Since there are no format specifiers in the actually recognized message,
it will raise error when it finds there are format values.
This patch utilizes the implicit string concat feature and fix this bug.
Change-Id: I005f6343f2d8775dbf8406dffe04f6de93a81fce
Signed-off-by: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
---
M vdsm/storage/iscsi.py
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/90/9690/1
diff --git a/vdsm/storage/iscsi.py b/vdsm/storage/iscsi.py
index ac4d7f6..d84187b 100644
--- a/vdsm/storage/iscsi.py
+++ b/vdsm/storage/iscsi.py
@@ -394,9 +394,9 @@
if (minTimeout > maxTimeout or minTimeout < 0):
minTimeout = 2
maxTimeout = 30
- log.warning("One of the following configuration arguments has an ",
- "illegal value: scsi_rescan_minimal_timeout or ",
- "scsi_rescan_maximal_timeout. Set to %s and %s seconds ",
+ log.warning("One of the following configuration arguments has an "
+ "illegal value: scsi_rescan_minimal_timeout or "
+ "scsi_rescan_maximal_timeout. Set to %s and %s seconds "
"respectively.", minTimeout, maxTimeout)
log.debug("Performing SCSI scan, this will take up to %s seconds",
maxTimeout)
--
To view, visit http://gerrit.ovirt.org/9690
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I005f6343f2d8775dbf8406dffe04f6de93a81fce
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou(a)linux.vnet.ibm.com>
Igor Lvovsky has uploaded a new change for review.
Change subject: Add default MTU=1500 to NIC's ifcfg files.
......................................................................
Add default MTU=1500 to NIC's ifcfg files.
When we add bridge with custom MTU on top of nic, this MTU will be set properly
on interface. But if we'll remove this bridge (including removing of MTU
keyword from NIC's ifcfg file) and add instead the bridge with default MTU
(without MTU keyword at all in ifcfg file) the actual MTU on the interface
will stay as before.
The only way to change the actual MTU is add MTU keyword explicitly to ifcfg file.
Change-Id: I0553a3956ea06586e0ece758932f00a9af640611
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=873745
Signed-off-by: Igor Lvovsky <ilvovsky(a)redhat.com>
---
M vdsm/configNetwork.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/47/9547/1
diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
index 75f6e43..570f6b1 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/configNetwork.py
@@ -515,7 +515,7 @@
try:
hwlines = [line for line in open(cf).readlines()
if line.startswith('HWADDR=')]
- l = ['DEVICE=%s\n' % nic, 'ONBOOT=yes\n'] + hwlines
+ l = ['DEVICE=%s\n' % nic, 'ONBOOT=yes\n', 'MTU=1500\n'] + hwlines
open(cf, 'w').writelines(l)
except IOError:
pass
--
To view, visit http://gerrit.ovirt.org/9547
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0553a3956ea06586e0ece758932f00a9af640611
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Igor Lvovsky <ilvovsky(a)redhat.com>
Laszlo Hornyak has uploaded a new change for review.
Change subject: cpu mode support for vdsm
......................................................................
cpu mode support for vdsm
This patch adds special hostPassthrough and hostModel as cpuType values.
If the cpuType is one of these values, the <model> tag will not be
created for libvirt, instead, a mode attribute will be crated in the
<cpu> tag with value 'host-passthrough' or 'host-model'.
Change-Id: I54fb440ef52255f0a7933b000b9b599c2d056021
Signed-off-by: Laszlo Hornyak <lhornyak(a)redhat.com>
---
M vdsm/libvirtvm.py
M vdsm_api/vdsmapi-schema.json
2 files changed, 14 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/07/9507/1
diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py
index f20968f..465a688 100644
--- a/vdsm/libvirtvm.py
+++ b/vdsm/libvirtvm.py
@@ -721,9 +721,17 @@
model = features[0]
cpu = self.doc.createElement('cpu')
cpu.setAttribute('match', 'exact')
- m = self.doc.createElement('model')
- m.appendChild(self.doc.createTextNode(model))
- cpu.appendChild(m)
+
+ #and now for something completely different
+ if model == 'hostPassthrough':
+ cpu.setAttribute('mode', 'host-passthrough')
+ elif model == 'hostModel':
+ cpu.setAttribute('mode', 'host-model')
+ else:
+ m = self.doc.createElement('model')
+ m.appendChild(self.doc.createTextNode(model))
+ cpu.appendChild(m)
+
if ('smpCoresPerSocket' in self.conf or
'smpThreadsPerCore' in self.conf):
topo = self.doc.createElement('topology')
diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json
index aa45059..dbfe153 100644
--- a/vdsm_api/vdsmapi-schema.json
+++ b/vdsm_api/vdsmapi-schema.json
@@ -2383,6 +2383,9 @@
# @clientIp: The IP address of the client connected to the display
#
# @cpuType: The type of CPU being emulated
+# special values 'hostPassthrough' and 'hostModel'
+# are reserved for host-passthrough and host-mode cpu
+# mode
#
# @custom: A dictionary of custom, free-form properties
#
--
To view, visit http://gerrit.ovirt.org/9507
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I54fb440ef52255f0a7933b000b9b599c2d056021
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <lhornyak(a)redhat.com>
Antoni Segura Puimedon has uploaded a new change for review.
Change subject: netwiring: [1/3] Add API definitions.
......................................................................
netwiring: [1/3] Add API definitions.
First of the Network Wiring feature patches. It adds the schema
definitions as described in:
http://wiki.ovirt.org/wiki/Feature/DetailedNetworkWiring#New_API
Change-Id: I9d8352f237dbe0229dff368f7c1dfa4f5f8fc766
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
---
M vdsm/BindingXMLRPC.py
M vdsm_api/vdsmapi-schema.json
2 files changed, 51 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/60/9560/1
diff --git a/vdsm/BindingXMLRPC.py b/vdsm/BindingXMLRPC.py
index d460910..60efbdf 100644
--- a/vdsm/BindingXMLRPC.py
+++ b/vdsm/BindingXMLRPC.py
@@ -262,6 +262,10 @@
vm = API.VM(params['vmId'])
return vm.hotunplugNic(params)
+ def updateVmDevice(self, vmId, params):
+ vm = API.VM(vmId)
+ return vm.updateDevice(params)
+
def vmSnapshot(self, vmId, snapDrives):
vm = API.VM(vmId)
return vm.snapshot(snapDrives)
@@ -789,7 +793,8 @@
(self.vmHotplugDisk, 'hotplugDisk'),
(self.vmHotunplugDisk, 'hotunplugDisk'),
(self.vmHotplugNic, 'hotplugNic'),
- (self.vmHotunplugNic, 'hotunplugNic'))
+ (self.vmHotunplugNic, 'hotunplugNic'),
+ (self.updateVmDevice, 'updateVmDevice'))
def getIrsMethods(self):
return ((self.domainActivate, 'activateStorageDomain'),
diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json
index 843cbc7..3818ab7 100644
--- a/vdsm_api/vdsmapi-schema.json
+++ b/vdsm_api/vdsmapi-schema.json
@@ -4849,6 +4849,51 @@
'data': {'hibernationVolHandle': 'HibernationVolumeHandle'}}
##
+# @updateVmDeviceParams:
+#
+# Parameters for @VM.updateVmDevice
+#
+# @type: The type of device to update. For example 'interface' for network
+# devices or 'disk' for disk storage devices.
+#
+# @alias: Alias used to identify this device in commands.
+#
+# @network: Name of the bridge the interface will be added to.
+#
+# @linkState: The state in which the link of the interface will be upon
+# successful completion of the api request. The values can be 'up' or 'down'.
+#
+# @promisc: If present, indicates the traffic of the network which should be
+# mirrored to the interface identified by alias.
+#
+# Since 4.11.0
+##
+{'type': 'updateVmDeviceParams',
+ 'data': {'type': 'str', 'network': 'str',
+ 'linkState': 'NetworkInterfaceState', 'alias': 'str', 'promisc': ''}}
+
+##
+# @VM.updateVmDevice:
+#
+# Update the status of a VM's device.
+#
+# @vmId: The UUID of the VM to modify
+#
+# @params: The VM UUID and device information.
+#
+# Returns:
+# The VM definition, as updated
+#
+# Since: 4.11.0
+#
+# Notes:
+# XXX: Split 'params' into direct parameters
+##
+{'command': {'class': 'VM', 'name': 'updateVmDevice'},
+ 'data': {'vmId': 'UUID', 'params': 'updateVmDeviceParams'},
+ 'returns': 'VmDefinition'}
+
+##
# @HotplugNicParams:
#
# Parameters for @VM.hotplugNic.
--
To view, visit http://gerrit.ovirt.org/9560
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d8352f237dbe0229dff368f7c1dfa4f5f8fc766
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>