← Back to team overview

openstack team mailing list archive

Help setting up network in Openstack on Vagrant

 

Hi,

I apologize in advance for the log spam.  I have installed Openstack onto Ubuntu 12.04 as per devstack.org.  The Ubuntu is a vagrant box residing on my MacBook, so I have given it in the Vagrantfile a host only network and a bridged network, in addition to the default NAT.  Once the vagrant box is up, I run devstack/stack.sh and everything gets set up correctly.  I can start a cirros instance no problem, though it is a little tricky to log into the vnc.  Instead of http://10.0.2.15:6080/vnc_auto.html……;. I replace 10.0.2.15 with either the host only ip address, 192.168.33.11, or the bridged ip address, 10.21.80.255 and it will work from the MacBook's browser (if I turn my proxy off or work from home without a proxy.  If I have the proxy on, the browser spams me to log in and I can't access through the browser).

My problem is once I have logged onto the cirros instance I can't access the internet, or even seem to access the horizon page.  I am a programmer by trade, and don't know much about networks, so please be gentle when telling me how easy it is to fix this :)  I was thinking maybe I'd need to bridge the networks, but brctl doesn't work on cirros: not a command.  All I want to do is be able to access the outside internet from cirros — assume proxy is a non issue because I can always do it from home.  Also, is the suggested solution any different for, say, an Ubuntu 10.04 vagrant disk.vmdk image uploaded via glance?

This is my info on the Openstack installation on Ubuntu in Vagrant.  This is with proxy on so that devstack/stack.sh runs ok
vagrant@precise64:~$ ifconfig
br100     Link encap:Ethernet  HWaddr 08:00:27:88:0c:a6
          inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::60cd:afff:fefd:ecb7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:64 errors:0 dropped:0 overruns:0 frame:0
          TX packets:98 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4404 (4.4 KB)  TX bytes:9482 (9.4 KB)

eth0      Link encap:Ethernet  HWaddr 08:00:27:88:0c:a6
          inet6 addr: fe80::a00:27ff:fe88:ca6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9505 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9551 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:603824 (603.8 KB)  TX bytes:1474451 (1.4 MB)

eth1      Link encap:Ethernet  HWaddr 08:00:27:7d:7a:1a
          inet addr:192.168.33.11  Bcast:192.168.33.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe7d:7a1a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:407 errors:0 dropped:0 overruns:0 frame:0
          TX packets:471 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:55749 (55.7 KB)  TX bytes:480481 (480.4 KB)

eth2      Link encap:Ethernet  HWaddr 08:00:27:e9:8e:0f
          inet addr:10.21.80.255  Bcast:10.21.83.255  Mask:255.255.252.0
          inet6 addr: fe80::a00:27ff:fee9:8e0f/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8742 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:837310 (837.3 KB)  TX bytes:1836 (1.8 KB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:10411 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10411 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:66209073 (66.2 MB)  TX bytes:66209073 (66.2 MB)

virbr0    Link encap:Ethernet  HWaddr 9e:9e:73:56:6a:a8
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

vnet0     Link encap:Ethernet  HWaddr fe:16:3e:f6:3e:21
          inet6 addr: fe80::fc16:3eff:fef6:3e21/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:130 errors:0 dropped:0 overruns:0 frame:0
          TX packets:37 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:6516 (6.5 KB)  TX bytes:4648 (4.6 KB)

vagrant@precise64:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.2.2        0.0.0.0         UG    0      0        0 br100
0.0.0.0         10.0.2.2        0.0.0.0         UG    100    0        0 br100
10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 br100
10.0.2.0        0.0.0.0         255.255.255.0   U     0      0        0 br100
10.21.80.0      0.0.0.0         255.255.252.0   U     0      0        0 eth2
192.168.33.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0

vagrant@precise64:~$ brctl show
bridge name bridge id STP enabled interfaces
br100 8000.080027880ca6 no eth0
vnet0
virbr0 8000.000000000000 yes


This is my info on cirros, with proxy off
Startup log:

Starting logging: OK
Initializing random number generator... done.
Starting network...
udhcpc (v1.18.5) started
Sending discover...
Sending select for 10.0.0.3...
Lease of 10.0.2.18 obtained, lease time 86400
deleting routers
route: SIOCDELRT: No such process
adding dns 10.0.2.3
cloud-setup: checking http://169.254.169.254/2009-04-04/meta-data/instance-id
wget: can't connect to remote host (169.254.169.254): No route to host
cloud-setup: failed 1/30: up 7.54. request failed

…

cloud-setup: running debug (30 tries reached)
############ debug start ##############
### /etc/rc.d/init.d/sshd start
/etc/rc3.d/S45-cloud-setup: line 66: /etc/rc.d/init.d/sshd: not found
### ifconfig -a
eth0      Link encap:Ethernet  HWaddr FA:16:3E:A5:34:C6
          inet addr:10.0.2.18  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::f816:3eff:fea5:34c6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:96 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2774 (2.7 KiB)  TX bytes:4780 (4.6 KiB)
          Interrupt:11

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:60 errors:0 dropped:0 overruns:0 frame:0
          TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5280 (5.1 KiB)  TX bytes:5280 (5.1 KiB)

### route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.2.2        0.0.0.0         UG    0      0        0 eth0
10.0.2.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
### cat /etc/resolv.conf
search etrade.com
nameserver 10.0.2.3
### ping -c 5 10.0.2.2
PING 10.0.2.2 (10.0.2.2): 56 data bytes

--- 10.0.2.2 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss
### pinging nameservers
#### ping -c 5 10.0.2.3
PING 10.0.2.3 (10.0.2.3): 56 data bytes

--- 10.0.2.3 ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss
### uname -a
Linux cirros 3.0.0-12-virtual #20-Ubuntu SMP Fri Oct 7 18:19:02 UTC 2011 x86_64 GNU/Linux
### lsmod
Module                  Size  Used by    Not tainted
vfat                   17585  0
fat                    61475  1 vfat
isofs                  40253  0
ip_tables              27473  0
x_tables               29846  1 ip_tables
pcnet32                42078  0
8139cp                 27412  0
ne2k_pci               13691  0
8390                   18856  1 ne2k_pci
e1000                 108573  0
acpiphp                24080  0
### dmesg | tail
[    7.143638] 8139cp 0000:00:03.0: eth0: link up, 100Mbps, full-duplex, lpa 0x05E1
[    7.767006] eth0: IPv6 duplicate address fe80::f816:3eff:fea5:34c6 detected!
### tail -n 25 /var/log/messages
Nov 20 10:55:15 cirros kern.info kernel: [    2.285423] acpiphp: Slot [29] registered
Nov 20 10:55:15 cirros kern.info kernel: [    2.285811] acpiphp: Slot [30] registered
Nov 20 10:55:15 cirros kern.info kernel: [    2.286022] acpiphp: Slot [31] registered
Nov 20 10:55:15 cirros kern.info kernel: [    2.343965] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI
Nov 20 10:55:15 cirros kern.info kernel: [    2.344001] e1000: Copyright (c) 1999-2006 Intel Corporation.
Nov 20 10:55:15 cirros kern.info kernel: [    2.378540] ne2k-pci.c:v1.03 9/22/2003 D. Becker/P. Gortmaker
Nov 20 10:55:15 cirros kern.info kernel: [    2.409140] 8139cp: 8139cp: 10/100 PCI Ethernet driver v1.3 (Mar 22, 2004)
Nov 20 10:55:15 cirros kern.warn kernel: [    2.411372] ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11
Nov 20 10:55:15 cirros kern.info kernel: [    2.412790] 8139cp 0000:00:03.0: PCI INT A -> Link[LNKC] -> GSI 11 (level, high) -> IRQ 11
Nov 20 10:55:15 cirros kern.info kernel: [    2.420434] 8139cp 0000:00:03.0: eth0: RTL-8139C+ at 0xffffc90000000000, fa:16:3e:a5:34:c6, IRQ 11
Nov 20 10:55:15 cirros kern.debug kernel: [    2.421516] 8139cp 0000:00:03.0: setting latency timer to 64
Nov 20 10:55:15 cirros kern.info kernel: [    2.453759] pcnet32: pcnet32.c:v1.35 21.Apr.2008 tsbogend@xxxxxxxxxxxxxxxx<mailto:tsbogend@xxxxxxxxxxxxxxxx>
Nov 20 10:55:15 cirros kern.info kernel: [    2.491882] ip_tables: (C) 2000-2006 Netfilter Core Team
Nov 20 10:55:15 cirros kern.info kernel: [    7.143638] 8139cp 0000:00:03.0: eth0: link up, 100Mbps, full-duplex, lpa 0x05E1
Nov 20 10:55:16 cirros kern.info kernel: [    7.767006] eth0: IPv6 duplicate address fe80::f816:3eff:fea5:34c6 detected!
############ debug end   ##############
cloud-setup: failed to read iid from metadata. tried 30
WARN: /etc/rc3.d/S45-cloud-setup failed
Starting dropbear sshd: generating rsa key... generating dsa key... OK
===== cloud-final: system completely up in 147.27 seconds ====
wget: can't connect to remote host (169.254.169.254): No route to host
  instance-id:
  public-ipv4:
  local-ipv4 :
wget: can't connect to remote host (169.254.169.254): No route to host
cloud-userdata: failed to read instance id
WARN: /etc/rc3.d/S99-cloud-userdata failed

Thank you,
Daniel Winsor
Associate, IT Architecture


Follow ups