Bug 1464339

Summary: [downstream clone - 4.1.4] AgentAppName doesn't match latest guest agent.
Product: Red Hat Enterprise Virtualization Manager Reporter: rhev-integ
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: lsurette, michal.skrivanek, mtessun, pstehlik, rbalakri, Rhev-m-bugs, srevivo, tjelinek, trichard, ykaul
Target Milestone: ovirt-4.1.4Keywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: rhevm-setup-plugins-4.1.3-1.el7ev Doc Type: Bug Fix
Doc Text:
Previously, the guest agent was renamed from rhev-guest-agent to ovirt-guest-agent, but the guest agent check did not account for this change. Users could not install the guest agent properly, because the Manager returned an error for an unknown guest agent. The ovirt-guest-agent package also conflicts with the rhev-guest-agent package. This resulted in confusion among users. Now, this has been fixed so that the Manager accounts for the renamed guest agent, and no longer returns an error for an unknown guest agent.
Story Points: ---
Clone Of: 1460863 Environment:
Last Closed: 2017-07-27 18:04:48 UTC Type: ---
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: 1460863    
Bug Blocks: 1471854    

Description rhev-integ 2017-06-23 07:10:34 UTC
+++ This bug is a downstream clone. The original bug is: +++
+++   bug 1460863 +++
======================================================================

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

(Originally by Germano Veit Michel)

Comment 1 rhev-integ 2017-06-23 07:10:43 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.

(Originally by Tomas Jelinek)

Comment 3 rhev-integ 2017-06-23 07:10:48 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?

(Originally by Germano Veit Michel)

Comment 4 rhev-integ 2017-06-23 07:10:53 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.

(Originally by Yaniv Kaul)

Comment 6 Petr Matyáš 2017-07-20 12:30:42 UTC
Verified on ovirt-engine-4.1.4.2-0.1.el7.noarch

There is no warning when creating a snapshot and new values are in the DB.

Comment 8 errata-xmlrpc 2017-07-27 18:04:48 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/RHBA-2017:1822