Bug 1460863

Summary: AgentAppName doesn't match latest guest agent.
Product: Red Hat Enterprise Virtualization Manager Reporter: Germano Veit Michel <gveitmic>
Component: rhevm-setup-pluginsAssignee: Petr Kotas <pkotas>
Status: CLOSED ERRATA QA Contact: Petr Matyáš <pmatyas>
Severity: high Docs Contact:
Priority: high    
Version: 4.1.2CC: bburmest, lsurette, michal.skrivanek, mtessun, pstehlik, rbalakri, Rhev-m-bugs, srevivo, tjelinek, troels, ykaul
Target Milestone: ovirt-4.2.0Keywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: rhvm-setup-plugins-4.2.0-0.9.beta.20171023144916.el7ev Doc Type: Bug Fix
Doc Text:
Resolved an issue where the guest agent check function was checking for the wrong agent name. The engine will no longer report an error for unknown guest agent.
Story Points: ---
Clone Of:
: 1464339 (view as bug list) Environment:
Last Closed: 2018-05-15 17:33:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1464339    

Description Germano Veit Michel 2017-06-13 01:46:17 UTC
Description of problem:

Apparently in latest guest agent versions, we deprecated rhevm-guest-agent-common in favor of ovirt-guest-agent-common. But RHV vdc_option AgentAppName doesn't contain ovirt-guest-agent-common.

Freshly installed RHV 4.1 has these:

engine=# select option_name,option_value from vdc_options where option_name = 'AgentAppName';
 option_name  |                           option_value                           
--------------+------------------------------------------------------------------
 AgentAppName | rhev-agent,rhevm-guest-agent,rhevm-guest-agent-common,RHEV-Agent
(1 row)

Now install a fresh RHEL 7.3 and follow our documentation:
https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.1/html/virtual_machine_management_guide/sect-installing_guest_agents_and_drivers1

Note that at step 3 it asks to install:

3. Install the ovirt-guest-agent-common package and dependencies:

# yum install ovirt-guest-agent-common

That's not even on the list above. And even if I try to install "downstream" it won't without forcing a lower version, because ovirt-guest-agent-common obsoletes the rhevm-guest-agent, see:

# yum install rhevm-guest-agent-common
[...]
Package rhevm-guest-agent-common is obsoleted by ovirt-guest-agent-common, trying to install ovirt-guest-agent-common-1.0.13-5.el7ev.noarch instead
Resolving Dependencies
--> Running transaction check
---> Package ovirt-guest-agent-common.noarch 0:1.0.13-5.el7ev will be installed
--> Processing Dependency: qemu-guest-agent for package: ovirt-guest-agent-common-1.0.13-5.el7ev.noarch
--> Running transaction check
---> Package qemu-guest-agent.x86_64 10:2.5.0-3.el7 will be installed
--> Finished Dependency Resolution

Installing:
 ovirt-guest-agent-common    noarch   1.0.13-5.el7ev   rhel-7-server-rh-common-rpms
Installing for dependencies:
 qemu-guest-agent            x86_64   10:2.5.0-3.el7   rhel-7-server-rpms

Then 'ovirt-guest-agent-common' not in [rhev-agent,rhevm-guest-agent,rhevm-guest-agent-common,RHEV-Agent] and we get this warning when trying to create a snapshot:

"Could not detect Guest Agent on the VM. Note that without a Guest Agent the data on the created snapshot may be inconsistent."

Version-Release number of selected component (if applicable):
rhevm-4.1.2.2-0.1.el7.noarch
ovirt-guest-agent-common-1.0.13-5.el7ev.noarch
qemu-guest-agent-2.5.0-3.el7.x86_64

How reproducible:
As above

Actual results:
Incorrect warning saying guest agent is missing

Expected results:
No warning

Comment 1 Tomas Jelinek 2017-06-13 10:33:48 UTC
in RHV 4.1 the GA is renamed to ovirt-guest-agent:
https://bugzilla.redhat.com/show_bug.cgi?id=1382055

the rename from ovirt-guest-agent-* to rhev(m)-guest-agent-* is done as a part of the rhevm-setup-plugins (in setup/plugins/ovirt-engine-setup/rhevm-setup-plugins/distro-rhel/config.py)

Since RHV 4.1 needs to support also older guests we need to enrich the config to recognize/support both ovirt and rhv naming of the guest agent.

Comment 2 Germano Veit Michel 2017-06-16 03:52:14 UTC
Wouldn't it be a better idea to test communication with the agent and then forward this information to the engine than relying on forever chasing a set of package names?

Comment 3 Yaniv Kaul 2017-06-16 05:14:56 UTC
(In reply to Germano Veit Michel from comment #2)
> Wouldn't it be a better idea to test communication with the agent and then
> forward this information to the engine than relying on forever chasing a set
> of package names?

It would have been better to send the package version as part of the protocol (which would have been also more efficient than sending the applist and parsing it), but we are not planning to change the mechanism right now.

Comment 6 Petr Matyáš 2017-11-06 15:35:32 UTC
Verified on ovirt-engine-4.2.0-0.0.master.20171106114404.git605a12f.el7.centos.noarch

Comment 9 errata-xmlrpc 2018-05-15 17:33:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHEA-2018:1473

Comment 10 Franta Kust 2019-05-16 13:04:23 UTC
BZ<2>Jira Resync