Bug 1297356 - Appliance console doesn't start without network configuration
Summary: Appliance console doesn't start without network configuration
Keywords:
Status: CLOSED DUPLICATE of bug 1286560
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.5.0
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: GA
: 5.6.0
Assignee: Gregg Tanzillo
QA Contact: Dave Johnson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-11 10:18 UTC by Martin Welk
Modified: 2016-01-12 13:11 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-12 13:11:05 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Martin Welk 2016-01-11 10:18:56 UTC
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):
5.5.0.13-2

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 14:12:04 UTC
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.

Thanks.

Comment 3 Nick Carboni 2016-01-11 14:29:07 UTC
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 10:32:47 UTC
Ok, this is how I reproduced it to create the required information:

1. Download cfme-rhevm-5.5.0.13-2.x86_64.rhevm.ova
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 127.0.0.1/8 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 | 127.0.0.1 | 255.0.0.0 |         .         |                                                                                                                                                     
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 13:11:05 UTC
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.