Bug 1297356 - Appliance console doesn't start without network configuration
Appliance console doesn't start without network configuration
Status: CLOSED DUPLICATE of bug 1286560
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance (Show other bugs)
x86_64 Linux
unspecified Severity unspecified
: GA
: 5.6.0
Assigned To: Gregg Tanzillo
Dave Johnson
Depends On:
  Show dependency treegraph
Reported: 2016-01-11 05:18 EST by Martin Welk
Modified: 2016-01-12 08:11 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-01-12 08:11:05 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Martin Welk 2016-01-11 05:18:56 EST
Description of problem:

appliance_console script doesn't start (ruby error) when there is no IP address configured

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

How reproducible:

Steps to Reproduce:
1. Start CFME virtual machine from VMware template (OVA), have no DHCP around
2. Login as root
3. Start appliance console

Actual results:
ruby error message (exception)

Expected results:
appliance_console starts to allow network configuratoin

Additional info:
Workaround: edit network configuration manually
Comment 2 Nick Carboni 2016-01-11 09:12:04 EST
Can you please post the error message and stack trace you are seeing?
Also the result of `ip addr show eth0` on that appliance would be helpful.

Comment 3 Nick Carboni 2016-01-11 09:29:07 EST
At first glance this may be a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1286560
Comment 4 Martin Welk 2016-01-12 05:32:47 EST
Ok, this is how I reproduced it to create the required information:

1. Download cfme-rhevm-
2. Extract the disk image
3. Boot it with qemu-kvm on my laptop (network connected, but no DHCP)

After logon, I get:

For a menu, please type: appliance_console
[root@localhost ~]# ip addr list
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 52:54:00:02:74:ec brd ff:ff:ff:ff:ff:ff
    inet6 fe80::5054:ff:fe02:74ec/64 scope link 
       valid_lft forever preferred_lft forever
[root@localhost ~]#

After some time (half a minute or so), I get this spilled on the console:
cloud-init[1726]: Cloud-init v. 0.7.6 running 'init' at Tue, 12 Jan 2016 10:28:53 +0000. Up 64.78 seconds.
cloud-init[1726]: ci-info: +++++++++++++++++++++++Net device info+++++++++++++++++++++++
cloud-init[1726]: ci-info: +--------+------+-----------+-----------+-------------------+
cloud-init[1726]: ci-info: | Device |  Up  |  Address  |    Mask   |     Hw-Address    |
cloud-init[1726]: ci-info: +--------+------+-----------+-----------+-------------------+
cloud-init[1726]: ci-info: |  lo:   | True | | |         .         |                                                                                                                                                     
cloud-init[1726]: ci-info: | eth0:  | True |     .     |     .     | 52:54:00:02:74:ec |                                                                                                                                                     
cloud-init[1726]: ci-info: +--------+------+-----------+-----------+-------------------+                                                                                                                                                     
cloud-init[1726]: ci-info: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Route info failed!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!                                                                                                                                  
cloud-init[2271]: Cloud-init v. 0.7.6 running 'modules:config' at Tue, 12 Jan 2016 10:28:54 +0000. Up 65.17 seconds.                                                                                                                         
cloud-init[2538]: Cloud-init v. 0.7.6 running 'modules:final' at Tue, 12 Jan 2016 10:28:54 +0000. Up 65.39 seconds.                                                                                                                          
cloud-init[2538]: Cloud-init v. 0.7.6 finished at Tue, 12 Jan 2016 10:28:54 +0000. Datasource DataSourceNone.  Up 65.44 seconds

Now I am trying to start the appliance_console:

[root@localhost ~]# appliance_console
/opt/rh/rh-ruby22/root/usr/share/ruby/ipaddr.rb:430:in `mask!': invalid length (IPAddr::InvalidPrefixError)                                                                                                                                  
        from /opt/rh/rh-ruby22/root/usr/share/ruby/ipaddr.rb:157:in `mask'                                                                                                                                                                   
        from /opt/rh/cfme-gemset/gems/linux_admin-0.12.1/lib/linux_admin/network_interface.rb:163:in `parse_ip4'                                                                                                                             
        from /opt/rh/cfme-gemset/gems/linux_admin-0.12.1/lib/linux_admin/network_interface.rb:48:in `reload'                                                                                                                                 
        from /opt/rh/cfme-gemset/gems/linux_admin-0.12.1/lib/linux_admin/network_interface.rb:37:in `initialize'                                                                                                                             
        from /opt/rh/cfme-gemset/gems/linux_admin-0.12.1/lib/linux_admin/network_interface/network_interface_rh.rb:13:in `initialize'                                                                                                        
        from /opt/rh/cfme-gemset/gems/linux_admin-0.12.1/lib/linux_admin/network_interface.rb:27:in `new'                                                                                                                                    
        from /opt/rh/cfme-gemset/gems/linux_admin-0.12.1/lib/linux_admin/network_interface.rb:27:in `new'                                                                                                                                    
        from /opt/rh/cfme-gemset/gems/linux_admin-0.12.1/lib/linux_admin/network_interface.rb:27:in `new'                                                                                                                                    
        from /var/www/miq/vmdb/gems/pending/appliance_console.rb:99:in `<module:ApplianceConsole>'                                                                                                                                           
        from /var/www/miq/vmdb/gems/pending/appliance_console.rb:98:in `<main>'                                                                                                                                                              
[root@localhost ~]#                              

When I repeat the steps with the VM connected to a network *with* DHCP, it has an IP address and everything works as expected.
Comment 5 Nick Carboni 2016-01-12 08:11:05 EST
Thanks, marking as duplicate.

*** This bug has been marked as a duplicate of bug 1286560 ***

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