Hello Adam Litke, Dan Kenigsberg, Francesco Romani,

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

    http://gerrit.ovirt.org/32788

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 <msi...@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/32774
Reviewed-by: Adam Litke <ali...@redhat.com>
Reviewed-by: Francesco Romani <from...@redhat.com>
Reviewed-by: Dan Kenigsberg <dan...@redhat.com>
---
M tests/vmTests.py
M tests/vmTestsData.py
M vdsm/virt/vm.py
3 files changed, 0 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/88/32788/1

diff --git a/tests/vmTests.py b/tests/vmTests.py
index aa73a6e..32fa5e0 100644
--- a/tests/vmTests.py
+++ b/tests/vmTests.py
@@ -194,9 +194,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 69d2c6b..c14efe9 100644
--- a/tests/vmTestsData.py
+++ b/tests/vmTestsData.py
@@ -39,9 +39,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"/>
@@ -108,9 +105,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"/>
@@ -155,9 +149,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/virt/vm.py b/vdsm/virt/vm.py
index 7d2f98c..0f9e4ce 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -721,9 +721,6 @@
             <vcpu current='smp'>160</vcpu>
             <devices>
             </devices>
-            <memtune>
-                <min_guarantee>0</min_guarantee>
-            </memtune>
         </domain>
 
         """
@@ -759,16 +756,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/32788
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.5
Gerrit-Owner: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: Adam Litke <ali...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to