Bug 1101947

Summary: [guest-agent] guestFQDN should be updated to reflect reality
Product: Red Hat Enterprise Virtualization Manager Reporter: Jiri Belka <jbelka>
Component: ovirt-guest-agentAssignee: Vinzenz Feenstra [evilissimo] <vfeenstr>
Status: CLOSED CURRENTRELEASE QA Contact: Ilanit Stein <istein>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.4.0CC: gklein, iheim, mavital, michal.skrivanek, mkenneth, rbalakri, sherold, vfeenstr, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: vt2.1 Doc Type: Bug Fix
Doc Text:
Previously the guest agent did not regularly refresh the current configured fully qualified domain name and it only reported changes after a restart or restarting of the guest agent service. This issues has now bee resolved.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-17 08:28:52 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: 1142923, 1156165    

Description Jiri Belka 2014-05-28 08:50:32 UTC
Description of problem:
right now guestFQDN would hold same values since GA has been started. shouldn't this be updated?

Version-Release number of selected component (if applicable):
rhevm-guest-agent-common-1.0.9-3.el6ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. change hostname
2. check vdsClient -s 0 getVmStats $uuid for guestFQDN
3.

Actual results:
static since GA start

Expected results:
should be udpated

Additional info:

Comment 1 Ilanit Stein 2014-09-08 15:12:17 UTC
On which guest-agent version this should be fixed?

I tested it on rhevm-guest-agent-common-1.0.9-5.el6ev.noarch,
and found that once hostname is changed by [1], guestName is updated, but guestFQDN not updated, and still contain value after last VM reboot.

[1]sudo hostname command & edit networks, no vm reboot

Comment 2 Vinzenz Feenstra [evilissimo] 2014-09-09 08:03:25 UTC
1.0.10-1 and higher should have this fixed

Comment 3 Ilanit Stein 2014-10-02 09:53:05 UTC
Test on VM installed with:
[root@RHEL6 yum.repos.d]# rpm -qa | grep guest
qemu-guest-agent-0.12.1.2-2.415.el6_5.14.x86_64
rhevm-guest-agent-common-1.0.10-1.el6_5.noarch

Found that once hostname is changed by [1], guestFQDN not updated, in 
'vdsClient -s 0 getVmStats $uuid' (host has vdsm-4.16.5-2.el6ev.x86_64) and still contain same value, as after VM last reboot.

[1]sudo hostname command & edit /etc/sysconfig/networks, with no VM reboot

In this guest-agent version, compared to rhevm-guest-agent-common-1.0.9-5.el6ev, the guestName no longer exist. Is this OK?

Comment 4 Vinzenz Feenstra [evilissimo] 2014-10-07 07:05:22 UTC
Well this is what is reported by: 
# python -c "import socket; print socket.getfqdn();"

When this shows the old name, then it will keep showing the old name in the guest agent...


To change it for me on EL6 was the following:

- Change the hostname in /etc/sysconfig/networks
- Make the new hostname resolvable in /etc/hosts
- service NetworkManager stop
- service network restart
- service NetworkManager start
- Run python -c "import socket; print socket.getfqdn();" to verify it works

After that it got reported by the guest agent

Comment 5 Ilanit Stein 2014-10-20 08:30:46 UTC
Verified on  rhevm-guest-agent-common-1.0.10-2

- Change the hostname in /etc/sysconfig/networks
- Make the new hostname resolvable in /etc/hosts
- Change hostname by 'hostname' command
- (service NetworkManager do not exist)
- service network restart
- (service NetworkManager do not exist)
- Run python -c "import socket; print socket.getfqdn();" show new hostname
- 'vdsClient -s 0 getVmStats $uuid'

show:
	guestName = new hostname
	guestFQDN = new hostname

Comment 6 Omer Frenkel 2015-02-17 08:28:52 UTC
RHEV-M 3.5.0 has been released