Bug 1379231 - RHEV-H 7.3-3.6.10: An error occurred while change the hostname
Summary: RHEV-H 7.3-3.6.10: An error occurred while change the hostname
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-node
Version: 3.6.9
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-3.6.10
: ---
Assignee: Douglas Schilling Landgraf
QA Contact: cshao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-26 06:41 UTC by cshao
Modified: 2017-01-23 14:10 UTC (History)
16 users (show)

Fixed In Version: rhev-hypervisor7-7.3-20161007.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-23 14:10:33 UTC
oVirt Team: Node
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
hostname (19.27 KB, image/png)
2016-09-26 06:41 UTC, cshao
no flags Details
/var/log/*.*; /tmp/log; sosreport; (8.20 MB, application/x-gzip)
2016-09-26 06:43 UTC, cshao
no flags Details
screenshot during auto_install (1.37 MB, image/png)
2016-09-26 09:25 UTC, Huijuan Zhao
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0185 0 normal SHIPPED_LIVE ovirt-node bug fix and enhancement update for RHEV 3.6.10 2017-01-24 17:55:58 UTC
oVirt gerrit 64983 0 master MERGED post el7: comment PrivateDevices for systemd-hostnamed 2020-07-19 14:37:10 UTC
oVirt gerrit 64984 0 master MERGED semodule: update systemd_hostnamed_t for tmpfs_t:file 2020-07-19 14:37:10 UTC
oVirt gerrit 65236 0 ovirt-3.6 MERGED post el7: comment PrivateDevices for systemd-hostnamed 2020-07-19 14:37:10 UTC
oVirt gerrit 65239 0 ovirt-3.6 MERGED semodule: update systemd_hostnamed_t for tmpfs_t:file 2020-07-19 14:37:10 UTC

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.


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