Bug 1475804 - setting hostname through appliance console throws error on ipv6 only env
Summary: setting hostname through appliance console throws error on ipv6 only env
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.9.0
Assignee: Gregg Tanzillo
QA Contact: luke couzens
URL:
Whiteboard: black
Depends On:
Blocks: 1482669
TreeView+ depends on / blocked
 
Reported: 2017-07-27 12:18 UTC by luke couzens
Modified: 2020-09-10 11:03 UTC (History)
8 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1482669 (view as bug list)
Environment:
Last Closed: 2018-03-06 15:12:21 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description luke couzens 2017-07-27 12:18:25 UTC
Description of problem:setting hostname through appliance console throws error on ipv6 only env


Version-Release number of selected component (if applicable):5.8.1.4


How reproducible:100%


Steps to Reproduce:
1.provision appliance on ipv6 only environment
2.connect to appliance through console
3.run appliance_console
4.select option 1 followed by option 5
5.set hostname

Actual results:
Enter the new hostname: |localhost.localdomain| myappliance.example.com
Applying new hostname...

/opt/rh/cfme-gemset/gems/awesome_spawn-1.4.1/lib/awesome_spawn.rb:105:in `run!': /bin/systemctl exit code: 1 (AwesomeSpawn::CommandResultError)
	from /opt/rh/cfme-gemset/gems/linux_admin-0.20.2/lib/linux_admin/common.rb:24:in `run!'
	from /opt/rh/cfme-gemset/gems/linux_admin-0.20.2/lib/linux_admin/service/systemd_service.rb:18:in `start'
	from /opt/rh/cfme-gemset/gems/linux_admin-0.20.2/lib/linux_admin/service/systemd_service.rb:33:in `restart'
	from /opt/rh/cfme-gemset/bundler/gems/manageiq-gems-pending-8f7d63f441d5/lib/gems/pending/appliance_console.rb:311:in `block in <module:ApplianceConsole>'
	from /opt/rh/cfme-gemset/bundler/gems/manageiq-gems-pending-8f7d63f441d5/lib/gems/pending/appliance_console.rb:108:in `loop'
	from /opt/rh/cfme-gemset/bundler/gems/manageiq-gems-pending-8f7d63f441d5/lib/gems/pending/appliance_console.rb:108:in `<module:ApplianceConsole>'
	from /opt/rh/cfme-gemset/bundler/gems/manageiq-gems-pending-8f7d63f441d5/lib/gems/pending/appliance_console.rb:99:in `<top (required)>'
	from /usr/bin/appliance_console:10:in `require'
	from /usr/bin/appliance_console:10:in `<main>'



Expected results:
Hostname set and appliance_console does not crash

Additional info:
It does seem to set the hostname, we just crash out of appliance_console with this error.

Comment 2 Bo Yao 2017-07-31 20:52:29 UTC
I cannot reproduce the bug in current master branch of ManageIQ (Openstack, 20170721 build, pull to current master. Also I don't have /opt/rh/cfme-gemset/... directory. Do we have vm image contains 5.8.1.4 cfme to test this. Thanks

Comment 3 Bo Yao 2017-08-01 13:35:36 UTC
Can't reproduce it in cfme-rhevm-5.8.1.4-1.x86_64.qcow2

Comment 4 Bo Yao 2017-08-01 13:49:36 UTC
Luke, Can you provide appliance credentials that you reproduces on? Thanks!

(In reply to luke couzens from comment #0)
> Description of problem:setting hostname through appliance console throws
> error on ipv6 only env
> 
> 
> Version-Release number of selected component (if applicable):5.8.1.4
> 
> 
> How reproducible:100%
> 
> 
> Steps to Reproduce:
> 1.provision appliance on ipv6 only environment
> 2.connect to appliance through console
> 3.run appliance_console
> 4.select option 1 followed by option 5
> 5.set hostname
> 
> Actual results:
> Enter the new hostname: |localhost.localdomain| myappliance.example.com
> Applying new hostname...
> 
> /opt/rh/cfme-gemset/gems/awesome_spawn-1.4.1/lib/awesome_spawn.rb:105:in
> `run!': /bin/systemctl exit code: 1 (AwesomeSpawn::CommandResultError)
> 	from
> /opt/rh/cfme-gemset/gems/linux_admin-0.20.2/lib/linux_admin/common.rb:24:in
> `run!'
> 	from
> /opt/rh/cfme-gemset/gems/linux_admin-0.20.2/lib/linux_admin/service/
> systemd_service.rb:18:in `start'
> 	from
> /opt/rh/cfme-gemset/gems/linux_admin-0.20.2/lib/linux_admin/service/
> systemd_service.rb:33:in `restart'
> 	from
> /opt/rh/cfme-gemset/bundler/gems/manageiq-gems-pending-8f7d63f441d5/lib/gems/
> pending/appliance_console.rb:311:in `block in <module:ApplianceConsole>'
> 	from
> /opt/rh/cfme-gemset/bundler/gems/manageiq-gems-pending-8f7d63f441d5/lib/gems/
> pending/appliance_console.rb:108:in `loop'
> 	from
> /opt/rh/cfme-gemset/bundler/gems/manageiq-gems-pending-8f7d63f441d5/lib/gems/
> pending/appliance_console.rb:108:in `<module:ApplianceConsole>'
> 	from
> /opt/rh/cfme-gemset/bundler/gems/manageiq-gems-pending-8f7d63f441d5/lib/gems/
> pending/appliance_console.rb:99:in `<top (required)>'
> 	from /usr/bin/appliance_console:10:in `require'
> 	from /usr/bin/appliance_console:10:in `<main>'
> 
> 
> 
> Expected results:
> Hostname set and appliance_console does not crash
> 
> Additional info:
> It does seem to set the hostname, we just crash out of appliance_console
> with this error.

Comment 5 Sachin 2017-08-02 06:42:25 UTC
Similar issue was see in CloudForms on OpenShift is template updated to 5.8.1?

using appliance_console (ap):
- 4) Set Hostname 
- Enter the new hostname: |19443e6f1e3b| cfme42-v03

Applying new hostname...
/opt/rh/cfme-gemset/gems/awesome_spawn-1.4.1/lib/awesome_spawn.rb:105:in `run!': /bin/hostnamectl exit code: 1 (AwesomeSpawn::CommandResultError)
	from /opt/rh/cfme-gemset/gems/linux_admin-0.19.0/lib/linux_admin/common.rb:24:in `run!'
	from /opt/rh/cfme-gemset/gems/linux_admin-0.19.0/lib/linux_admin/hosts.rb:39:in `hostname='
	from /var/www/miq/vmdb/gems/pending/appliance_console.rb:246:in `block in <module:ApplianceConsole>'
	from /var/www/miq/vmdb/gems/pending/appliance_console.rb:111:in `loop'
	from /var/www/miq/vmdb/gems/pending/appliance_console.rb:111:in `<module:ApplianceConsole>'
	from /var/www/miq/vmdb/gems/pending/appliance_console.rb:97:in `<main>'

Comment 8 Bo Yao 2017-08-07 14:14:10 UTC
Hi Luke,
I can reproduce it in your appliance now. Thanks.
Regards,
Bo

Comment 10 CFME Bot 2017-08-17 13:38:36 UTC
New commit detected on ManageIQ/manageiq-gems-pending/master:
https://github.com/ManageIQ/manageiq-gems-pending/commit/b5d991fb8817d3e0aaa10cb082c620cc6609238b

commit b5d991fb8817d3e0aaa10cb082c620cc6609238b
Author:     Bo Yao <boyao>
AuthorDate: Tue Aug 8 11:15:49 2017 -0400
Commit:     Bo Yao <boyao>
CommitDate: Thu Aug 17 09:27:41 2017 -0400

    fix restart network error when set host name in pure ipv6 network
    https://bugzilla.redhat.com/show_bug.cgi?id=1475804

 lib/gems/pending/appliance_console.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 12 luke couzens 2017-10-12 09:11:50 UTC
Verified in 5.9.0.2


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