Adam Litke has posted comments on this change.

Change subject: Use balloon_min to set the minimum guaranteed memory available
......................................................................


Patch Set 4: I would prefer that you didn't submit this

(1 inline comment)

....................................................
File mom/Collectors/GuestBalloon.py
Line 19:     """
Line 20:     This Collector uses hypervisor interface to collect guest balloon 
info
Line 21:     """
Line 22:     def getFields(self=None):
Line 23:         return set(['balloon_cur', 'balloon_max', 'balloon_min'])
This is not the right place to put this.  It makes the Balloon collector 
interface incompatible with the libvirt hypervisor interface.  If you want to 
supply this variable, it should be added as a named policy:

01_variables:

(def set_balloon_min (guest)
{
    (if (= "my_vm_1" guest.Prop("name")) guest.SetVar("balloon_min" 1048576) 0)
})

(with Guests guest (set_balloon_min guest))

I realize this is a bit convoluted but policy should not be set via the 
collectors.  A better approach might be to add a guest lookup primitive to the 
policy language that would allow you to put the following in a policy:

Guest("my_vm_1").SetVar("balloon_min" 1048576)

This would have to fail gracefully if no guest can be found by that name.
Line 24: 
Line 25:     def __init__(self, properties):
Line 26:         self.hypervisor_iface = properties['hypervisor_iface']
Line 27:         self.uuid = properties['uuid']


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I376ac6b2cdadc567314899a95c6b855f820e746b
Gerrit-PatchSet: 4
Gerrit-Project: mom
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to