[Openstack] ifconfig in VM not showing IP address of eth0 port

Ahmed Al-Mehdi ahmedalmehdi at gmail.com
Fri Nov 30 21:18:32 UTC 2012


I resolved this issue.  The problem was the switch was dropping the DHCP
request packet sent by the VM.  I verified using "tcpdump" that the packet
was going out the physical ethernet port of the compute node.  However, the
packet did not show up at the ethernet port of the controller node.  I
verified the two ports are on the same (physical switch) VLAN. I then setup
direct connect, bypassing the switch, and the VM was able to get a response
to the DHCP request, etc.  Time permitting I will investigate why the
switch was dropping the packet.

Thanks to all who responded.

Regards,
Ahmed.



On Wed, Nov 28, 2012 at 4:13 PM, Ahmed Al-Mehdi <ahmedalmehdi at gmail.com>wrote:

> Hi Razique,
>
> Thank you helping out.  Yes, I see an IP addr assigned to the instance.
>  And yes, I am using libvirt.
>
> root at novato:~/ahmed# nova list
>
> +--------------------------------------+-------+--------+-------------------------+
> | ID                                   | Name  | Status | Networks
>        |
>
> +--------------------------------------+-------+--------+-------------------------+
> | 26188c69-e67d-41b8-a066-6103b191fbea | myvm1 | ACTIVE |
> net_proj_one=10.10.10.3 |
>
> +--------------------------------------+-------+--------+-------------------------+
> root at novato:~/ahmed#
>
> I do not have the external network setup.  Is that necessary to get an IP
> address from the private network to which eth0 of the VM network is
> attached.
>
>
> From cirros log, it seem dhcp is enabled and started, but fails to get an
> IP addr:
>
> Starting network...
> udhcpc (v1.18.5) started
> Sending discover...
> Sending discover...
> Sending discover...
> No lease, failing
> WARN: /etc/rc3.d/S40-network failed
> 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): Network is
> unreachable
> cloud-setup: failed 1/30: up 10.00. request failed
> wget: can't connect to remote host (169.254.169.254): Network is
> unreachable
> cloud-setup: failed 2/30: up 11.02. request failed
> ...........
> wget: can't connect to remote host (169.254.169.254): Network is
> unreachable
> cloud-setup: failed 30/30: up 39.15. request failed
> cloud-setup: after 30 fails, debugging
> 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
> route: fscanf
> ### ifconfig -a
> eth0      Link encap:Ethernet  HWaddr FA:16:3E:D9:8E:97
>           inet6 addr: fe80::f816:3eff:fed9:8e97/64 Scope:Link
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:17 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1000
>           RX bytes:2062 (2.0 KiB)  TX bytes:1134 (1.1 KiB)
>
> 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: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)
>
> ### route -n
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use
> Iface
> route: fscanf
> ### cat /etc/resolv.conf
> cat: can't open '/etc/resolv.conf': No such file or directory
> ### gateway not found
> /etc/rc3.d/S45-cloud-setup: line 66: can't open /etc/resolv.conf: no such
> file
> ### pinging nameservers
> ### 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
> .....
>
>
>
> On Wed, Nov 28, 2012 at 3:44 PM, Razique Mahroua <
> razique.mahroua at gmail.com> wrote:
>
>> Hi Ahmed,
>> on your controller, run $nova list
>> does the instance has an IP affected there ?
>> Also check cirros log, try to restart the DHCP service to see if it
>> retrieves the IP.
>> are you using libvirt ?
>> regards,
>> *Razique Mahroua** - **Nuage & Co*
>> razique.mahroua at gmail.com
>>
>>
>> Le 28 nov. 2012 à 21:54, Ahmed Al-Mehdi <ahmedalmehdi at gmail.com> a écrit
>> :
>>
>> Hello,
>>
>> I setup an two node OpenStack setup, running Quantum and Cinder
>> components.
>>
>> After I launched the VM (based on cirros image), I logged into it through
>> the Console.  When I do an "ifconfig", I see that eth0 is up, it's status
>> is "UP BROADCAST RUNNING ...".  However, I don't see an IP address assigned
>> to it.  Is that normal, did I make a mistake while creating/launching the
>> VM.
>>
>> Thank you,
>> Ahmed.
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to     : openstack at lists.launchpad.net
>> Unsubscribe : https://launchpad.net/~openstack
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20121130/8898dabf/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NUAGECO-LOGO-Fblan_petit.jpg
Type: image/jpeg
Size: 10122 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20121130/8898dabf/attachment.jpg>


More information about the Openstack mailing list