Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1379231

Summary: RHEV-H 7.3-3.6.10: An error occurred while change the hostname
Product: Red Hat Enterprise Virtualization Manager Reporter: cshao <cshao>
Component: ovirt-nodeAssignee: Douglas Schilling Landgraf <dougsland>
Status: CLOSED CURRENTRELEASE QA Contact: cshao <cshao>
Severity: high Docs Contact:
Priority: high    
Version: 3.6.9CC: amarchuk, cshao, dguo, fdeutsch, gklein, huzhao, jiawu, leiwang, lsurette, mgoldboi, rbarry, weiwang, yaniwang, ycui, ykaul, yzhao
Target Milestone: ovirt-3.6.10Keywords: Regression, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhev-hypervisor7-7.3-20161007.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-23 14:10:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Node RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
hostname
none
/var/log/*.*; /tmp/log; sosreport;
none
screenshot during auto_install none

Description cshao 2016-09-26 06:41:00 UTC
Created attachment 1204665 [details]
hostname

Description of problem:
An error occurred while change the hostname.

====================================================
2016-09-26 02:54:08,094       INFO An exception during the transaction: Command '['hostnamectl', 'set-hostname', 'cshaotest.redhat.com']' returned non-zero exit status 1
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ovirt/node/ui/__init__.py", line 956, in __run_transaction
    self.plugin.dry_or(lambda: tx_element.commit())
  File "/usr/lib/python2.7/site-packages/ovirt/node/plugins.py", line 188, in dry_or
    return func()
  File "/usr/lib/python2.7/site-packages/ovirt/node/ui/__init__.py", line 956, in <lambda>
    self.plugin.dry_or(lambda: tx_element.commit())
  File "/usr/lib/python2.7/site-packages/ovirt/node/config/defaults.py", line 742, in commit
    config.network.hostname(self.hostname)
  File "/usr/lib/python2.7/site-packages/ovirt/node/config/network.py", line 231, in hostname
    new_hostname])
  File "/usr/lib/python2.7/site-packages/ovirt/node/utils/process.py", line 139, in check_call
    return int(subprocess.check_call(*args, **kwargs))
  File "/usr/lib64/python2.7/subprocess.py", line 542, in check_call
    raise CalledProcessError(retcode, cmd)
====================================================



Version-Release number of selected component (if applicable):
rhev-hypervisor7-7.3-20160923.2
ovirt-node-3.6.1-20.0.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Install rhev-hypervisor7-7.3-20160923.2 via PXE.
2. Login RHEV-H.
3. Configure network.
4. Set hostname to cshaotest.redhat.com
5. Focus on the output.
6. Drop to shell to check the hostname.

Actual results:
1. After step5, an error occurred while change the hostname.
2. After step6, failed to save hostname.
# hostname
dhcp-11-27.nay.redhat.com

Expected results:
Change hostname can successful without error.

Additional info:
No such issue on RHEV-H 7.2 for RHEV 3.6.9 (rhev-hypervisor7-7.2-20160920.1) build. So this is a regression bug from 7.2 to 7.3.

Comment 1 cshao 2016-09-26 06:43:03 UTC
Created attachment 1204666 [details]
/var/log/*.*; /tmp/log; sosreport;

Comment 2 cshao 2016-09-26 06:52:33 UTC
Add keyword "regression" due to no such issue on RHEV-H 7.2 for RHEV 3.6.9 (rhev-hypervisor7-7.2-20160920.1) build. So this is a regression bug from 7.2 to 7.3.

Comment 3 Fabian Deutsch 2016-09-26 09:08:50 UTC
Please try running

hostnamectl set-hostname cshaotest.redhat.com

manually.

Comment 4 cshao 2016-09-26 09:17:35 UTC
(In reply to Fabian Deutsch from comment #3)
> Please try running
> 
> hostnamectl set-hostname cshaotest.redhat.com
> 
> manually.

# hostnamectl set-hostname cshaotest.redhat.com
Could not set property: Connection timed out

Comment 5 Huijuan Zhao 2016-09-26 09:24:21 UTC
Also encounter this issue during auto_install with parameter:
hostname=huzhao.redhat.com

Please refer to attachment for detailed error report.

Comment 6 Huijuan Zhao 2016-09-26 09:25:09 UTC
Created attachment 1204749 [details]
screenshot during auto_install

Comment 7 Fabian Deutsch 2016-09-26 09:47:14 UTC
Does it work in permissive mode?

It could be that this is also related to the Private* stanzas in the unit files.

Comment 8 cshao 2016-09-26 10:05:57 UTC
(In reply to Fabian Deutsch from comment #7)
> Does it work in permissive mode?
> 
> It could be that this is also related to the Private* stanzas in the unit
> files.

Seem it still can't work in permissive mode.

# setenforce 0
# getenforce 
Permissive
# hostnamectl set-hostname cshaotest.redhat.com
Could not set property: Connection timed out

I just send a mail to you with the reproduce's env.

Thanks.

Comment 10 Douglas Schilling Landgraf 2016-10-08 04:29:19 UTC
Just a reminder:
  changing hostname in console is not supported, only with TUI or autoinstall.

Comment 11 cshao 2016-10-10 03:03:04 UTC
Test version:
rhev-hypervisor7-7.3-20161007.0
ovirt-node-3.6.1-31.0.el7ev.noarch

Test steps:
1. Install rhev-hypervisor7-7.3-20161007.0
2. Login RHEV-H.
3. Configure network.
4. Set hostname to cshaotest.redhat.com
5. Focus on the output.
6. Drop to shell to check the hostname.
7. Reboot

Test results:
1. After step 5, change hostname can successful without error.
2. After step7, the new hostname still here.

So the bug is fixed, change bug status to VERIFIED.