Bug 1234953 - the error "The ovirt-guest-agent is not active" should not appear when vm is in powering up state
Summary: the error "The ovirt-guest-agent is not active" should not appear when vm is ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: mom
Classification: oVirt
Component: General
Version: ---
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ovirt-4.0.1
: 0.5.5
Assignee: Martin Sivák
QA Contact: Shira Maximov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-23 14:57 UTC by Shira Maximov
Modified: 2016-07-19 06:24 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-07-19 06:24:32 UTC
oVirt Team: SLA
Embargoed:
rule-engine: ovirt-4.0.z+
rule-engine: planning_ack+
dfediuck: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 45596 0 master MERGED Improve the message when getVmMemoryStats() returns 0 2020-09-01 09:19:22 UTC

Description Shira Maximov 2015-06-23 14:57:28 UTC
Description of problem:
when vm in the state of powering up, 
i'm getting the error ovirt-guest-agent is not active, Although this fact is True this log should not appear when the vm in powering up state, 
this error should be present only when the vm is in up state.

  


2015-06-23 17:16:55,025 - mom.Monitor - INFO - GuestMonitor-mom-1 starting
2015-06-23 17:16:55,025 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active
2015-06-23 17:17:03,884 - mom.RPCServer - INFO - getStatistics()
2015-06-23 17:17:15,050 - mom.Monitor - INFO - GuestMonitor-mom-1 is ready
Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1.create vm with GE installed
2.enable ballooning on the cluster and make sure the overcommit is disabeld
3.start the vm and look in /var/log/vdsm/mom.log

Actual results:
the error appears 
2015-06-23 17:16:55,025 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active

Expected results:
this message shouldn't appear when the vm in powering up state

Additional info:

Comment 1 Amador Pahim 2015-08-27 21:01:47 UTC
The code creating this message is:

            if usage == 0:
                msg = "The ovirt-guest-agent is not active"
                raise HypervisorInterfaceError(msg)

But actually VM becomes 'Up' way before ovirt-guest-agent reports a non-0 value for the memory usage. See the extra warning message I injected into the code:

2015-08-27 16:56:50,410 - mom.Monitor - INFO - GuestMonitor-vm01 starting
2015-08-27 16:56:50,412 - mom.vdsmInterface - WARNING - Name: vm01, Status: Up, MemUsage: 0 <--- VM UP for vdsm, but no mem usage report yet
2015-08-27 16:56:50,412 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active
2015-08-27 16:56:55,419 - mom.vdsmInterface - WARNING - Name: vm01, Status: Up, MemUsage: 0
2015-08-27 16:57:00,426 - mom.vdsmInterface - WARNING - Name: vm01, Status: Up, MemUsage: 0
2015-08-27 16:57:05,431 - mom.vdsmInterface - WARNING - Name: vm01, Status: Up, MemUsage: 0
2015-08-27 16:57:05,432 - mom.Monitor - INFO - GuestMonitor-vm01 is ready
2015-08-27 16:57:10,437 - mom.vdsmInterface - WARNING - Name: vm01, Status: Up, MemUsage: 0
2015-08-27 16:57:15,444 - mom.vdsmInterface - WARNING - Name: vm01, Status: Up, MemUsage: 11 <--- Here the first non-0 report
2015-08-27 16:57:20,451 - mom.vdsmInterface - WARNING - Name: vm01, Status: Up, MemUsage: 11


So checking the status is not a good option. Admin. Portal can still be showing 'Powering Up', but for vdsm it's 'Up' very quickly and mom uses vdsm API directly. Maybe we should delay the first check or even keep it silent for any case.

Comment 2 Martin Sivák 2015-08-28 10:11:25 UTC
Well the word error should probably be removed, but MOM works just fine even though the memory info is not yet available. It just disables ballooning until the memory info becomes available.

Comment 3 Amador Pahim 2015-08-28 12:24:35 UTC
The exception in the test to check if the ovirt-guest-agent is active is happening in a moment that ovirt-guest-agent does not have even a chance to be running. There is no other result to be expected at that moment but the exception.
I think we should delay the test (giving vm some time to start the process) OR test differently OR not test it at all. As you said, further code are on hold until usage becomes non-0, so no need to raise this inevitable exception.
Let me propose a patch for discussion.

Comment 4 Martin Sivák 2015-08-28 12:30:50 UTC
Bear in mind that it might have been MOM who started late (vdsm or mom restart) or that the VM might have just arrived from another host (migration). The agent will be running right from the start in those cases.

Comment 5 Sandro Bonazzola 2015-10-26 12:43:47 UTC
this is an automated message. oVirt 3.6.0 RC3 has been released and GA is targeted to next week, Nov 4th 2015.
Please review this bug and if not a blocker, please postpone to a later release.
All bugs not postponed on GA release will be automatically re-targeted to

- 3.6.1 if severity >= high
- 4.0 if severity < high

Comment 6 Yaniv Kaul 2015-11-02 11:59:06 UTC
The error also doesn't mention the VM name or ID or anything, making it a bit useless:
015-10-25 18:00:32,539 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active
2015-10-25 18:00:34,213 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active
2015-10-25 18:00:34,758 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active
2015-10-25 18:00:34,975 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active
2015-10-25 18:00:36,844 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active
2015-10-25 18:00:42,525 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active
2015-10-25 18:00:49,434 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active
2015-10-25 18:01:04,007 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active
2015-10-25 18:01:16,355 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active
2015-10-25 18:01:24,539 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active
2015-10-25 18:01:26,825 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats() error: The ovirt-guest-agent is not active

Comment 7 Red Hat Bugzilla Rules Engine 2015-11-16 14:11:14 UTC
This bug is flagged for 3.6, yet the milestone is for 4.0 version, therefore the milestone has been reset.
Please set the correct milestone or add the flag.

Comment 8 Doron Fediuck 2016-04-06 11:41:48 UTC
Closing old issues based on capacity.
Please re-open only if relevant and needed.

Comment 9 Amador Pahim 2016-04-07 18:13:30 UTC
(In reply to Doron Fediuck from comment #8)
> Closing old issues based on capacity.
> Please re-open only if relevant and needed.

There is a patch proposed in upstream for it. But yes, the bz status was not POST. Sorry.

Comment 10 Sandro Bonazzola 2016-05-02 10:01:24 UTC
Moving from 4.0 alpha to 4.0 beta since 4.0 alpha has been already released and bug is not ON_QA.

Comment 11 Yaniv Lavi 2016-05-23 13:17:11 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 12 Yaniv Lavi 2016-05-23 13:21:13 UTC
oVirt 4.0 beta has been released, moving to RC milestone.

Comment 13 Shira Maximov 2016-07-15 11:33:26 UTC
verified on : 
Red Hat Enterprise Virtualization Manager Version: 4.0.2-0.2.rc1.el7ev
mom-0.5.5-1.el7ev.noarch

the verification steps: 
1.create vm with GE installed
2.enable ballooning on the cluster and make sure the overcommit is disabeld
3.start the vm and look in /var/log/vdsm/mom.log 
 ther error is more specific : 

2016-07-15 14:18:04,596 - mom.Collectors.GuestMemory - WARNING - getVmMemoryStats(): VM 4e93db55-4f9a-4fc2-9c7c-281c0599e052 - The ovirt-guest-agent is not active

Comment 14 Sandro Bonazzola 2016-07-19 06:24:32 UTC
Since the problem described in this bug report should be
resolved in oVirt 4.0.1 released on July 19th 2016, it has been closed with a
resolution of CURRENT RELEASE.

For information on the release, and how to update to this release, follow the link below.

If the solution does not work for you, open a new bug report.

http://www.ovirt.org/release/4.0.1/


Note You need to log in before you can comment on or make changes to this bug.