Bug 1723582 - [downstream clone - 4.3.5] RHV could not detect Guest Agent when create snapshot for the running guest which installed qemu-guest-agent
Summary: [downstream clone - 4.3.5] RHV could not detect Guest Agent when create snaps...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: rhvm-setup-plugins
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.3.5
: 4.3.5
Assignee: Tomasz Barański
QA Contact: Liran Rotenberg
URL:
Whiteboard:
Depends On: 1696111
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-24 20:48 UTC by RHV bug bot
Modified: 2019-08-12 11:54 UTC (History)
18 users (show)

Fixed In Version: rhvm-setup-plugins-4.3.4-1.el7ev
Doc Type: No Doc Update
Doc Text:
Clone Of: 1696111
Environment:
Last Closed: 2019-08-12 11:54:51 UTC
oVirt Team: Virt
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2438 0 None None None 2019-08-12 11:54:57 UTC
oVirt gerrit 100253 0 master ABANDONED db: qemu guest agent missing from viable guest agent names 2019-06-24 20:48:35 UTC
oVirt gerrit 100267 0 master MERGED db: qemu guest agent missing from viable guest agent names 2019-06-24 20:48:35 UTC
oVirt gerrit 100759 0 ovirt-engine-4.3 MERGED db: qemu guest agent missing from viable guest agent names 2019-06-25 08:53:41 UTC

Description RHV bug bot 2019-06-24 20:48:13 UTC
+++ This bug is an upstream to downstream clone. The original bug is: +++
+++   bug 1696111 +++
======================================================================

Created attachment 1551701 [details]
create snapshot

Description:
RHV could not detect Guest Agent when create snapshot for the running guest which installed qemu-guest-agent

Background:
Virt-v2v will install qemu-guest-agent in linux guests during converting guests to RHV,pls refer to https://bugzilla.redhat.com/show_bug.cgi?id=1619665#c4

How reproducible:
100%

Version:
qemu-kvm-rhev-2.12.0-25.el7.x86_64
libvirt-4.5.0-11.el7.x86_64
libguestfs-1.40.2-2.el7.x86_64
python-ovirt-engine-sdk4-4.3.1-1.el7ev.x86_64

Steps:
1.Prepare a guest has correctly installed qume-guest-agent and make sure the service is running normally.
I have prepared a rhel7.6 guest on rhv4.3
# rpm -q qemu-guest-agent
qemu-guest-agent-2.12.0-2.el7.x86_64

# systemctl status qemu-guest-agent
● qemu-guest-agent.service - QEMU Guest Agent
   Loaded: loaded (/usr/lib/systemd/system/qemu-guest-agent.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2019-04-02 06:15:25 EDT; 1min 17s ago
 Main PID: 3095 (qemu-ga)
    Tasks: 1
   CGroup: /system.slice/qemu-guest-agent.service
           └─3095 /usr/bin/qemu-ga --method=virtio-serial --path=/dev/virtio-...

Apr 02 06:15:25 localhost.localdomain systemd[1]: Started QEMU Guest Agent.

2.Boot the guest and create snapshot for the guest on RHV GUI
Result: RHV will show warning info :Could not detect Guest Agent on the VM. Note that without a Guest Agent the data on the created snapshot may be inconsistent. Pls refer to screenshot named create-snapshot.
But the snapshot can be created normally and the snapshot can detect qemu-guest-agent,pls refer to screenshot named snapshot-applications

Actual results:
As above

Expected results:
RHV can detect Guest Agent when create snapshot for the running guest which installed qemu-guest-agent

Additional info:
1.Can be reproduced on rhv4.2
2.Cannot be reproduced when the guest installed ovirt-guest-agent.

(Originally by Zi Liu)

Comment 1 RHV bug bot 2019-06-24 20:48:16 UTC
Created attachment 1551702 [details]
snapshot-applications

(Originally by Zi Liu)

Comment 2 RHV bug bot 2019-06-24 20:48:18 UTC
I assumed this was fixed as part of bug 1615830. Anyway, it should be possible to do that now.

The snapshot feature only depends on QEMU-GA so the check should be changed in engine. The warning message could be more specific about which agent it needs too.

(Originally by Tomas Golembiovsky)

Comment 3 RHV bug bot 2019-06-24 20:48:20 UTC
Ah, the bug 1615830 shouldn’t have been closed, it wasn’t finished!

(Originally by michal.skrivanek)

Comment 4 RHV bug bot 2019-06-24 20:48:22 UTC
I experience the same issue on oVirt 4.3.4 RC1 - the warning is showed when using qemu-guest-agent , but is not shown with ovirt-guest-agent.
Tested on RHEL 8 VM and openSUSE Leap 15.0 .

(Originally by hunter86_bg)

Comment 5 RHV bug bot 2019-06-24 20:48:24 UTC
I am raising the priority because this is not just about a warning in UI. What is more important is that the fs-freeze is not performed. This is likely to result in corrupted snapshots.

(Originally by Tomas Golembiovsky)

Comment 6 RHV bug bot 2019-06-24 20:48:26 UTC
(In reply to liuzi from comment #0)
please don't open downstream RHV bugs when the issue is not RHV-specific

(Originally by michal.skrivanek)

Comment 8 RHV bug bot 2019-06-27 11:39:47 UTC
INFO: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

[Tag 'ovirt-engine-4.3.5.2' doesn't contain patch 'https://gerrit.ovirt.org/100267']
gitweb: https://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=shortlog;h=refs/tags/ovirt-engine-4.3.5.2

For more info please contact: rhv-devops

Comment 9 RHV bug bot 2019-06-27 11:48:36 UTC
INFO: Bug status (ON_QA) wasn't changed but the folowing should be fixed:

[Tag 'ovirt-engine-4.3.5.2' doesn't contain patch 'https://gerrit.ovirt.org/100267']
gitweb: https://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=shortlog;h=refs/tags/ovirt-engine-4.3.5.2

For more info please contact: rhv-devops

Comment 10 Liran Rotenberg 2019-07-02 12:54:25 UTC
Failed to verify on:
ovirt-engine-4.3.5.2-0.1.el7.noarch

Steps:
1. Create a VM.
2. Run the VM.
3. Check qemu-guest-agent is exists and running.
4. Create a snapshot(without memory).

Result:
qemu-guest-agent is running on the VM.
qemu-guest-agent-2.12.0-63.module+el8+2833+c7d6d092.x86_64
The warning is still shown:
"Could not detect Guest Agent on the VM. Note that without a Guest Agent the data on the created snapshot may be inconsistent."

Comment 11 Tomasz Barański 2019-07-05 09:13:53 UTC
1. Does the list of application in the VM detail view contain any entries?

2. Could you send me the output of the following query?

select * from vdc_options where option_name='AgentAppName';

3. Could you send me the output of `systemctl status qemu-guest-agent`?

4. Could you send me the output of `virsh -r dumpxml <vm-name> | grep -B1 -A3 "org.qemu.guest_agent"`?

Comment 12 Liran Rotenberg 2019-07-07 07:26:51 UTC
(In reply to Tomasz Barański from comment #11)
> 1. Does the list of application in the VM detail view contain any entries?
> 
In the engine on the VM -> Applications
I have two entries:
kernel and qemu-guest-agent-2.12.0
> 2. Could you send me the output of the following query?
> 
> select * from vdc_options where option_name='AgentAppName';
> 

engine=# select * from vdc_options where option_name='AgentAppName';
 option_id | option_name  |                                                option_value                                                 | version |                                                default_value   
                                             
-----------+--------------+-------------------------------------------------------------------------------------------------------------+---------+----------------------------------------------------------------
---------------------------------------------
         4 | AgentAppName | rhev-agent,rhevm-guest-agent,rhevm-guest-agent-common,RHEV-Agent,ovirt-guest-agent,ovirt-guest-agent-common | general | rhev-agent,rhevm-guest-agent,rhevm-guest-agent-common,RHEV-Agen
t,ovirt-guest-agent,ovirt-guest-agent-common
(1 row)

> 3. Could you send me the output of `systemctl status qemu-guest-agent`?
> 
# systemctl status qemu-guest-agent
● qemu-guest-agent.service - QEMU Guest Agent
   Loaded: loaded (/usr/lib/systemd/system/qemu-guest-agent.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-07-07 07:14:45 EDT; 3h 51min left
 Main PID: 684 (qemu-ga)
    Tasks: 1 (limit: 4648)
   Memory: 1.6M
   CGroup: /system.slice/qemu-guest-agent.service
           └─684 /usr/bin/qemu-ga --method=virtio-serial --path=/dev/virtio-ports/org.qemu.guest_agent.0 --blacklist=guest-file-open,guest-file-close,guest-file-read,guest-file-write,guest-file-seek,guest-file->

Jul 07 07:14:45 localhost.localdomain systemd[1]: Started QEMU Guest Agent.

> 4. Could you send me the output of `virsh -r dumpxml <vm-name> | grep -B1
> -A3 "org.qemu.guest_agent"`?

# virsh -r dumpxml 3 | grep -B1 -A3 "org.qemu.guest_agent"
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channels/7c8dde01-b938-4361-94a7-e5db07e15c0e.org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/>
      <alias name='channel1'/>
      <address type='virtio-serial' controller='0' bus='0' port='2'/>
    </channel>


I see that we miss qemu-guest-agent on the DB side.
The information I gave now is from ovirt-engine-4.3.5.3-0.1.el7.noarch.

Comment 13 Tomasz Barański 2019-07-08 09:48:26 UTC
This paer of the entry in the vdc_option table: "rhev-agent,rhevm-guest-agent,rhevm-guest-agent-common,RHEV-Agent".

Can you track what process put it there? I have a theory that it overwritten the value put by the installer.

Comment 16 Liran Rotenberg 2019-07-14 06:53:20 UTC
Verified on:
ovirt-engine-4.3.5.4-0.1.el7.noarch
rhvm-setup-plugins-4.3.4-1.el7ev.noarch

Steps:
1. Create a VM with qemu-guest-agent.
2. Run the VM.
3. Wait for the guest-agent to report to engine(IP, etc..)
4. Create a Snapshot - check for warning message.

Results:
No warning was shown, the engine detected the VM guest-agent when creating a snapshot.

Additional information:
From the DB we now have qemu-guest-agent

engine=# select * from vdc_options where option_name='AgentAppName';
 option_id | option_name  |                                                         option_value                                                         | version |                                               
         default_value                                                         
-----------+--------------+------------------------------------------------------------------------------------------------------------------------------+---------+-----------------------------------------------
-------------------------------------------------------------------------------
         4 | AgentAppName | rhev-agent,rhevm-guest-agent,rhevm-guest-agent-common,RHEV-Agent,ovirt-guest-agent,ovirt-guest-agent-common,qemu-guest-agent | general | rhev-agent,rhevm-guest-agent,rhevm-guest-agent
-common,RHEV-Agent,ovirt-guest-agent,ovirt-guest-agent-common,qemu-guest-agent
(1 row)

Comment 18 errata-xmlrpc 2019-08-12 11:54:51 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-2019:2438


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