Yaniv Dary
Technical Product Manager
Red Hat Israel Ltd.
34 Jerusalem Road
Building A, 4th floor
Ra'anana, Israel 4350109
Tel : +972 (9) 7692306
8272306
Email: ydary@redhat.com
IRC : ydary
> Whats extremely prone to errors is the way the guest agent checks the active user in GuestAgentLinux2.py line 325:
>
> users = os.popen('/usr/bin/users').read().split()
That is something we could probably improve. The maintainer is Vinzenz Feenstra.
Martin
On Fri, Mar 18, 2016 at 3:13 PM, Andreas Trawöger
<andreas.trawoeger@qitasc.com> wrote:
> Hi Martin,
>
> Whats extremely prone to errors is the way the guest agent checks the active user in GuestAgentLinux2.py line 325:
>
> users = os.popen('/usr/bin/users').read().split()
>
> This creates a new subprocess every time it is executed and if that doesn't work for whatever reason the ovirt guest agent crashes instantly.
>
> But I probably should make that suggestions on the devel list.
>
> Regards
>
> ________________________________________
> Von: Martin Sivak <msivak@redhat.com>
> Gesendet: Freitag, 18. März 2016 14:44
> An: Andreas Trawöger
> Cc: oVirt Userlist
> Betreff: Re: [ovirt-users] MOM crashes ovirt-guest-agent
>
> Hi,
>
> it is not really a bug. You should give the VM more memory if you
> expect that it will need it that fast. The ballooning mechanism has
> its disadvantages and this is one of those. We do not react fast
> enough when such a fast allocation happens.
>
> There is really not much we can do from the mom / guest agent side. We
> could slowly increase the available memory when the guest agent dies
> (pretty easy to implement) and we might inform the system that a guest
> agent is an important process (if that is even possible) so OOM killer
> will avoid it. But that would not help with Cannot allocate memory
> error as even the OOM killer takes time before it reacts.
>
> Using low guaranteed memory values with ballooning for critical VMs is
> probably not the best idea.
>
> Regards
>
> --
> Martin Sivak
> msivak@redhat.com
> SLA / oVirt
>
> On Fri, Mar 18, 2016 at 1:00 PM, Andreas Trawöger
> <andreas.trawoeger@qitasc.com> wrote:
>> Hi,
>>
>>
>> I'm trying to track down why my Foreman Centos7 VM continuously crashes with
>> out of Memory errors on my ovirt-3.6 hosts and what seems to happen is the
>> following:
>>
>>
>> 1. The Foreman VM only uses 1GB at the beginning and MOM over time reduces
>> the memory size from 8GB Ram to the defined minimum of 2GB
>>
>>
>> mom.log:
>> 2016-03-18 12:25:42,669 - mom.Controllers.Balloon - INFO - Ballooning
>> guest:qvie-foreman from 2210584 to 2100054
>>
>>
>> 2. When the VM needs RAM very quickly like if you do an 'cp /dev/zero
>> /run/zero' the ovirt guest agent crashes with an out of memory error.
>>
>>
>> ovirt-guest-agent.log:
>>
>> Traceback (most recent call last):
>> File "/usr/share/ovirt-guest-agent/OVirtAgentLogic.py", line 239, in
>> doWork
>> self.sendUserInfo()
>> File "/usr/share/ovirt-guest-agent/OVirtAgentLogic.py", line 355, in
>> sendUserInfo
>> cur_user = self.dr.getActiveUser()
>> File "/usr/share/ovirt-guest-agent/GuestAgentLinux2.py", line 325, in
>> getActiveUser
>> users = os.popen('/usr/bin/users').read().split()
>> OSError: [Errno 12] Cannot allocate memory
>>
>> 3. Resulting in an MOM warning that it can't get any memory stats from the
>> VM. Leaving the memory size at its minimum size:.
>>
>>
>> mom.log:
>>
>> mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The
>> ovirt-guest-agent is not active
>>
>>
>> Any chances to prevent that from happening? Or is this a bug in MOM /
>> ovirt-guest-agent that should be fixed?
>>
>>
>> Greetings
>>
>> Andreas
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users@ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users
>>
_______________________________________________
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users