Hello Antoni Segura Puimedon, Dead Horse,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/17591
to review the following change.
Change subject: spec: vdsm-hook-sriov on el6 should not require non-existing rpm
......................................................................
spec: vdsm-hook-sriov on el6 should not require non-existing rpm
As reported by a dead horse, el6 does not carry
libvirt-daemon-driver-nodedev so the said hook should not require this
subrpm. Since it the rpm hook is meaningful only when vdsm is installed,
and el6's vdsm requires al libvirt, we need no special requirement
there.
Change-Id: I25bfec65fd017a048102d6321335c747a17b5dd4
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/17554
Reviewed-by: Antoni Segura Puimedon <asegurap(a)redhat.com>
Reviewed-by: Dead Horse <deadhorseconsulting(a)gmail.com>
Tested-by: Dead Horse <deadhorseconsulting(a)gmail.com>
---
M vdsm.spec.in
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/91/17591/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index d95bb2a..87bc231 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -483,7 +483,9 @@
%package hook-sriov
Summary: sr-iov support for VDSM
+%if 0%{?rhel} >= 7 || 0%{?fedora} >= 18
Requires: libvirt-daemon-driver-nodedev
+%endif
BuildArch: noarch
%description hook-sriov
--
To view, visit http://gerrit.ovirt.org/17591
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I25bfec65fd017a048102d6321335c747a17b5dd4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Dead Horse <deadhorseconsulting(a)gmail.com>
Dan Kenigsberg has uploaded a new change for review.
Change subject: spec: vdsm-hook-sriov on el6 should require libvirt
......................................................................
spec: vdsm-hook-sriov on el6 should require libvirt
As reported by a dead horse, el6 does not carry
libvirt-daemon-driver-nodedev so the said hook should not require this
subrpm.
Change-Id: I25bfec65fd017a048102d6321335c747a17b5dd4
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/54/17554/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index d95bb2a..1305eec 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -483,7 +483,11 @@
%package hook-sriov
Summary: sr-iov support for VDSM
+%if 0%{?rhel} >= 7 || 0%{?fedora} >= 18
Requires: libvirt-daemon-driver-nodedev
+%else
+Requires: libvirt
+%endif
BuildArch: noarch
%description hook-sriov
--
To view, visit http://gerrit.ovirt.org/17554
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I25bfec65fd017a048102d6321335c747a17b5dd4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Martin Sivák has uploaded a new change for review.
Change subject: Add support for direct setting of cpu_shares when creating a VM
......................................................................
Add support for direct setting of cpu_shares when creating a VM
This adds new API field to the Vm structures. The new field
'cpuShares' will override the old 'nice' when used.
Change-Id: I7ef73cf0579a0efd5a31c32638efcc6cdf2447d7
Signed-off-by: Martin Sivak <msivak(a)redhat.com>
---
M vdsm/vm.py
M vdsm_api/vdsmapi-schema.json
2 files changed, 15 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/28/17528/1
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 2fa5a45..c1cc51f 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -2804,8 +2804,15 @@
nice = int(self.conf.get('nice', '0'))
nice = max(min(nice, 19), 0)
+
+ # if cpu_shares weren't configured we derive the value from the
+ # niceness, cpu_shares has not unit, it is only meaningful when
+ # compared to other VMs (and can't be negative)
+ cpu_shares = int(self.conf.get('cpuShares', str((20 - nice) * 51)))
+ cpu_shares = max(cpu_shares, 0)
+
try:
- self._dom.setSchedulerParameters({'cpu_shares': (20 - nice) * 51})
+ self._dom.setSchedulerParameters({'cpu_shares': cpu_shares})
except:
self.log.warning('failed to set Vm niceness', exc_info=True)
diff --git a/vdsm_api/vdsmapi-schema.json b/vdsm_api/vdsmapi-schema.json
index 71878e4..fdb4c66 100644
--- a/vdsm_api/vdsmapi-schema.json
+++ b/vdsm_api/vdsmapi-schema.json
@@ -2632,6 +2632,8 @@
#
# @clientIp: The IP address of the client connected to the display
#
+# @cpuShares: The host scheduling priority (relative to other VMs)
+#
# @cpuType: #optional The type of CPU being emulated
# special values 'hostPassthrough' and 'hostModel'
# are reserved for host-passthrough and host-mode cpu
@@ -2694,8 +2696,8 @@
# Since: 4.10.0
##
{'type': 'VmDefinition',
- 'data': {'acpiEnable': 'bool', 'clientIp': 'str', '*cpuType': 'str',
- '*custom': 'StringMap', '*devices': ['VmDevice'],
+ 'data': {'acpiEnable': 'bool', 'clientIp': 'str', 'cpuShares': 'str',
+ '*cpuType': 'str', '*custom': 'StringMap', '*devices': ['VmDevice'],
'display': 'VmDisplayType', 'displayIp': 'str',
'displayPort': 'int', 'displaySecurePort': 'int',
'*emulatedMachine': 'str', '*keyboardLayout': 'str',
@@ -2713,6 +2715,8 @@
# Parameters for creating a new virtual machine
#
# @acpiEnable: Indicates if ACPI is enabled inside the VM
+#
+# @cpuShares: The host scheduling priority (relative to other VMs)
#
# @custom: #optional A dictionary of custom, free-form properties
#
@@ -2747,7 +2751,7 @@
##
{'type': 'VmParameters',
'data': {'acpiEnable': 'bool',
- '*custom': 'StringMap', '*devices': ['VmDevice'],
+ 'cpuShares': 'str', '*custom': 'StringMap', '*devices': ['VmDevice'],
'display': 'VmDisplayType', 'kvmEnable': 'bool', 'memSize': 'uint',
'nice': 'int', 'smp': 'uint', '*smpCoresPerSocket': 'uint',
'*smpThreadsPerCore': 'uint', 'timeOffset': 'uint',
--
To view, visit http://gerrit.ovirt.org/17528
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ef73cf0579a0efd5a31c32638efcc6cdf2447d7
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <msivak(a)redhat.com>