Change in vdsm[ovirt-3.4]: Do not add the memtune/min_guarantee element to the libvirt xml

msivak at redhat.com msivak at redhat.com
Wed Sep 10 15:20:26 UTC 2014


Hello Adam Litke, Dan Kenigsberg, Francesco Romani,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/32789

to review the following change.

Change subject: Do not add the memtune/min_guarantee element to the libvirt xml
......................................................................

Do not add the memtune/min_guarantee element to the libvirt xml

VDSM does not need to put the min_guarantee to the libvirt XML.
It was only set and then nobody was accessing it. It will break
compatibility with tools that read data through libvirt directly,
but we do not officially support that anyway.

This part will fix all new VMs. Old VMs need a migration
hook that will be included as another patch.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1138340
Change-Id: Idb9a5a467ecee3235c842aa0b9b5fa9ccfd31ed9
Signed-off-by: Martin Sivak <msivak at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/32774
Reviewed-by: Adam Litke <alitke at redhat.com>
Reviewed-by: Francesco Romani <fromani at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M tests/vmTests.py
M tests/vmTestsData.py
M vdsm/vm.py
3 files changed, 0 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/89/32789/1

diff --git a/tests/vmTests.py b/tests/vmTests.py
index fc56f1a..73f2b6a 100644
--- a/tests/vmTests.py
+++ b/tests/vmTests.py
@@ -112,9 +112,6 @@
               <memory>1048576</memory>
               <currentMemory>1048576</currentMemory>
               <vcpu current="8">160</vcpu>
-              <memtune>
-                  <min_guarantee>524288</min_guarantee>
-              </memtune>
               <devices/>
            </domain>"""
 
diff --git a/tests/vmTestsData.py b/tests/vmTestsData.py
index d95fe58..cd03c76 100644
--- a/tests/vmTestsData.py
+++ b/tests/vmTestsData.py
@@ -38,9 +38,6 @@
             <memory>1048576</memory>
             <currentMemory>1048576</currentMemory>
             <vcpu current="1">160</vcpu>
-            <memtune>
-                <min_guarantee>524288</min_guarantee>
-            </memtune>
             <devices>
                 <channel type="unix">
                     <target name="com.redhat.rhevm.vdsm" type="virtio"/>
@@ -107,9 +104,6 @@
             <memory>1048576</memory>
             <currentMemory>1048576</currentMemory>
             <vcpu current="1">160</vcpu>
-            <memtune>
-                <min_guarantee>524288</min_guarantee>
-            </memtune>
             <devices>
                 <channel type="unix">
                     <target name="com.redhat.rhevm.vdsm" type="virtio"/>
@@ -156,9 +150,6 @@
         <memory>65536</memory>
         <currentMemory>65536</currentMemory>
         <vcpu current="1">160</vcpu>
-        <memtune>
-            <min_guarantee>16384</min_guarantee>
-        </memtune>
         <devices>
             <channel type="unix">
                 <target name="org.qemu.guest_agent.0" type="virtio"/>
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 16037fa..3dccdf8 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -979,9 +979,6 @@
             <vcpu current='smp'>160</vcpu>
             <devices>
             </devices>
-            <memtune>
-                <min_guarantee>0</min_guarantee>
-            </memtune>
         </domain>
 
         """
@@ -1017,16 +1014,6 @@
         self.dom.appendChildWithArgs('currentMemory', text=memSizeKB)
         vcpu = self.dom.appendChildWithArgs('vcpu', text=self._getMaxVCpus())
         vcpu.setAttrs(**{'current': self._getSmp()})
-
-        memSizeGuaranteedKB = str(1024 * int(
-            self.conf.get('memGuaranteedSize', '0')
-        ))
-
-        memtune = XMLElement('memtune')
-        self.dom.appendChild(memtune)
-
-        memtune.appendChildWithArgs('min_guarantee',
-                                    text=memSizeGuaranteedKB)
 
         self._devices = XMLElement('devices')
         self.dom.appendChild(self._devices)


-- 
To view, visit http://gerrit.ovirt.org/32789
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb9a5a467ecee3235c842aa0b9b5fa9ccfd31ed9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>


More information about the vdsm-patches mailing list