Bug 1569013

Summary: Backport some features to 2.8 in RHEL 7.5
Product: Red Hat Enterprise Linux 7 Reporter: Tomáš Golembiovský <tgolembi>
Component: qemu-guest-agentAssignee: Miroslav Rezanina <mrezanin>
Status: CLOSED ERRATA QA Contact: FuXiangChun <xfu>
Severity: high Docs Contact: Jiri Herrmann <jherrman>
Priority: high    
Version: 7.5CC: chayang, jen, jherrman, juzhang, knoel, micai, michal.skrivanek, michen, mrezanin, mtessun, qzhang, salmy, tgolembi, toneata
Target Milestone: rcKeywords: FutureFeature, Rebase, ZStream
Target Release: 7.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-guest-agent-2.12.0-1.el7 Doc Type: Release Note
Doc Text:
QEMU Guest Agent diagnostics enhanced To maintain qemu-guest-agents compatibility with the latest version of VDSM, a number of features have been backported from the most recent upstream version. These include the addition of "qemu-get-host-name", "qemu-get-users", "qemu-get-osinfo", and "qemu-get-timezone" commands, which improve the diagnostic capabilities of QEMU Guest Agent.
Story Points: ---
Clone Of:
: 1598210 (view as bug list) Environment:
Last Closed: 2018-10-30 08:08:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1551350, 1598210    

Description Tomáš Golembiovský 2018-04-18 13:54:39 UTC
In RHV 4.2 we rely on recent changes in QEMU-GA. To properly test and deliver the feature we need some of the features from 2.10. Would one of the following be possible?

1) perform rebase to 2.10 in RHEL 7.5; or

2) backport the necessary patches to 2.8. We need the following patches:

0a3d197a71 2017-04-04 | qga: Add 'guest-get-host-name' command
161a56a906 2017-04-19 | qga: Add 'guest-get-users' command
53c58e64d0 2017-04-19 | qga: Add `guest-get-timezone` command
e674605f98 2017-07-17 | qemu-ga: check if utmpx.h is available on the system
9848f79740 2017-07-14 | qemu-ga: add guest-get-osinfo command

optionaly also the following patches that fix the test-suite:

c28afa76c0 2017-07-14 | test-qga: pass environemnt to qemu-ga
339ca68bef 2017-07-14 | test-qga: add test for guest-get-osinfo

Comment 9 FuXiangChun 2018-07-26 05:15:22 UTC
Verified bug with qemu-guest-agent-2.12.0-2.el7.x86_64.

1)Test run:
https://polarion.engineering.redhat.com/polarion/#/project/RedHatEnterpriseLinux7/testrun?id=virtqe-qemu-guest-agent-RHEL7-6

no found blocker and regression bug

2) confirmed new agent command as below.
{"execute": "guest-get-osinfo"}
{"return": {"name": "Red Hat Enterprise Linux Server", "kernel-release": "3.10.0-926.el7.x86_64", "version": "7.6 (Maipo)", "variant": "Server", "pretty-name": "Red Hat Enterprise Linux Server 7.6 Beta (Maipo)", "version-id": "7.6", "variant-id": "server", "kernel-version": "#1 SMP Thu Jul 19 11:52:14 EDT 2018", "machine": "x86_64", "id": "rhel"}}

{"execute": "guest-get-host-name"}
{"return": {"host-name": "bootp-73-75-126.lab.eng.pek2.redhat.com"}}

{"execute": "guest-get-users"}
{"return": [{"login-time": 1532574235.102336, "user": "root"}]}

{"execute": "guest-get-timezone"}
{"return": {"zone": "CST", "offset": 28800}}

Comment 10 FuXiangChun 2018-07-26 05:20:25 UTC
Tomáš,

You mentioned "qemu-ga: check if utmpx.h is available on the system" in comment0.
Could you tell me how to check if utmpx.h is available on the system? I only find this 2 files on system. And they aren't from qemu-guest-agent package. Thanks.

# find / -name utmpx*
/usr/include/bits/utmpx.h
/usr/include/utmpx.h

Comment 11 Tomáš Golembiovský 2018-07-26 07:29:22 UTC
Hi, there is not much to verify there. The patch is there to make sure build does not fail. So if you already have an RPM then you can consider it as OK.

Comment 12 Tomáš Golembiovský 2018-07-26 07:35:17 UTC
I suggest you remove the mention of utmpx.h from the doc_text.

Comment 13 FuXiangChun 2018-07-27 07:31:22 UTC
Thanks Tomáš, Base on comment9 and comment11,  set this bug as verified.

Comment 16 errata-xmlrpc 2018-10-30 08:08:28 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-2018:3072