Ask Your Question
3

cirros instance cannot get ip address

asked 2015-04-29 10:46:04 -0500

brahimo gravatar image

Hi i am working in an all-in-one VM openstack Juno, i launched the cirros instance (private ip 10.1.0.6) and associate to it a floating ip address (10.0.2.18)
My external network is 10.0.2.0/24
the private network is 10.1.0.0/24
a router between the two networks
from the log of the instance it seems like a dhcp problem as it tried to discover the ip address but in vain.
here is the log :

Starting network...
udhcpc (v1.20.1) started
Sending discover...
Sending discover...
Sending discover...
Usage: /sbin/cirros-dhcpc <up|down>
No lease, failing
WARN: /etc/rc3.d/S40-network failed
cirros-ds 'net' up at 194.40
checking http://169.254.169.254/2009-04-04/instance-id
failed 1/20: up 194.85. request failed
failed 2/20: up 197.59. request failed
failed 3/20: up 200.13. request failed
failed 4/20: up 202.43. request failed
failed 5/20: up 204.68. request failed
failed 6/20: up 206.99. request failed
failed 7/20: up 209.60. request failed
failed 8/20: up 213.30. request failed
failed 9/20: up 215.56. request failed
failed 10/20: up 217.84. request failed
failed 11/20: up 220.14. request failed
failed 12/20: up 222.43. request failed
failed 13/20: up 224.70. request failed
failed 14/20: up 227.09. request failed
failed 15/20: up 229.56. request failed
failed 16/20: up 231.89. request failed
failed 17/20: up 234.22. request failed
failed 18/20: up 236.58. request failed
failed 19/20: up 238.88. request failed
failed 20/20: up 241.52. request failed
failed to read iid from metadata. tried 20
no results found for mode=net. up 244.38. searched: nocloud configdrive ec2
failed to get instance-id of datasource
Starting dropbear sshd: generating rsa key... generating dsa key... OK
=== system information ===
Platform: Fedora Project OpenStack Nova
Container: none
Arch: x86_64
CPU(s): 2 @ 2124.159 MHz
Cores/Sockets/Threads: 1/2/1
Virt-type: AMD-V
RAM Size: 995MB
Disks:
NAME MAJ:MIN        SIZE LABEL         MOUNTPOINT
vda  253:0   10737418240
vda1 253:1   10725765120 cirros-rootfs /
vdb  253:16    134217728
=== sshd host keys ===
-----BEGIN SSH HOST KEY KEYS-----

-----END SSH HOST KEY KEYS-----
=== network info ===
if-info: lo,up,127.0.0.1,8,::1
if-info: eth0,up,,8,fe80::f816:3eff:febe:2828
=== datasource: None None ===
=== cirros: current=0.3.3 uptime=249.88 ===
route: fscanf
=== pinging gateway failed, debugging connection ===
############ debug start ##############
### /etc/init.d/sshd start
Starting dropbear sshd: OK
route: fscanf
### ifconfig -a
eth0      Link encap:Ethernet  HWaddr FA:16:3E:BE:28:28
          inet6 addr: fe80::f816:3eff:febe:2828/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:17 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1358 (1.3 KiB)  TX bytes:1132 ...
(more)
edit retag flag offensive close merge delete

Comments

try assigning ip address statically and try pinging.

SGPJ gravatar imageSGPJ ( 2015-04-29 11:05:54 -0500 )edit
2

also check this site for similar issues there are solution available.

SGPJ gravatar imageSGPJ ( 2015-04-29 11:11:04 -0500 )edit

Please, post

neutron router-port-list yourRouter
neutron port-show  port-id-of-private-subnet| grep status
dbaxps gravatar imagedbaxps ( 2015-04-29 12:10:02 -0500 )edit

If status is ACTIVE, then run:-

ip netns exec qrouter-your-router-id netstat -antp
It should report  pid of daemon listening at port 9697
ps -ef | grep your_pid
neutron-ns-metadata-proxy should listen port 9697
dbaxps gravatar imagedbaxps ( 2015-04-29 12:14:09 -0500 )edit

When requested steps will be done , we will continue troubleshooting access to nova-metadata server.

dbaxps gravatar imagedbaxps ( 2015-04-29 12:16:17 -0500 )edit

4 answers

Sort by ยป oldest newest most voted
0

answered 2015-04-29 14:55:19 -0500

dbaxps gravatar image

updated 2015-04-29 14:56:49 -0500

Due to recent comment :- to dbaxps : the state of private network port is DOWN

Recreate interface to private sub-net , ACTIVE status for this port is a MUST to provide routing to qrouter-namespace and make neutron-ns-metadata-proxy available for request sending by CirrOS (or any other VM) on private sub-net.
edit flag offensive delete link more
0

answered 2015-04-29 13:11:45 -0500

brahimo gravatar image

updated 2015-04-29 13:14:49 -0500

Further information.

[root@localhost ~(keystone_admin)]# nova list

+--------------------------------------+----------+--------+------------+-------------+---------------------------------------+
| ID                                   | Name     | Status | Task State | Power State | Networks                              |
+--------------------------------------+----------+--------+------------+-------------+---------------------------------------+
| 1937ae6a-faee-4972-979e-74be17a26e93 | ciros_in | ACTIVE | -          | Running     | private_net_admin=10.1.0.6, 10.0.2.18 |
+--------------------------------------+----------+--------+------------+-------------+---------------------------------------+


[root@localhost ~(keystone_admin)]# neutron router-port-list router
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------------+
| id                                   | name | mac_address       | fixed_ips                                                                        |
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------------+
| 0240c70a-acdf-4949-add1-9be5fbb9bd0f |      | fa:16:3e:de:a7:05 | {"subnet_id": "90a77aac-9fc3-4b4c-8e9f-79e4fd926253", "ip_address": "10.0.2.17"} |
| 682707d3-f3ef-4969-b4fc-c0efe59998e2 |      | fa:16:3e:e9:88:f4 | {"subnet_id": "081c47e9-5aca-4d27-987d-b9cdba15ea85", "ip_address": "10.1.0.1"}  |
+--------------------------------------+------+-------------------+----------------------------------------------------------------------------------+

[root@localhost ~(keystone_admin)]# neutron port-show  0240c70a-acdf-4949-add1-9be5fbb9bd0 | grep status
Unable to find port with name '0240c70a-acdf-4949-add1-9be5fbb9bd0'
<br>
[root@localhost ~(keystone_admin)]# neutron port-show  0240c70a-acdf-4949-add1-9be5fbb9bd0f | grep status
| status                | DOWN                                                                             |


the following commands show


[root@localhost log]# ip netns exec qrouter-6bb9233a-b047-4659-9b92-378da2d5a5b2 netstat -antp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:9697            0.0.0.0:*               LISTEN      3221/python

[root@localhost log]# ps -ef | grep 3221
root      3221     1  0 15:26 ?        00:00:00 /usr/bin/python /bin/neutron-ns-metadata-proxy --pid_file=/var/lib/neutron/external/pids/6bb9233a-b047-4659-9b92-378da2d5a5b2.pid --metadata_proxy_socket=/var/lib/neutron/metadata_proxy --router_id=6bb9233a-b047-4659-9b92-378da2d5a5b2 --state_path=/var/lib/neutron --metadata_port=9697 --verbose --log-file=neutron-ns-metadata-proxy-6bb9233a-b047-4659-9b92-378da2d5a5b2.log --log-dir=/var/log/neutron
root     11540  2388  0 20:09 pts/2    00:00:00 grep --color=auto 3221
edit flag offensive delete link more

Comments

f is missed at the end
neutron port-show 0240c70a-acdf-4949-add1-9be5fbb9bd0f

dbaxps gravatar imagedbaxps ( 2015-04-29 14:40:39 -0500 )edit

You wrote : to dbaxps : the state of private network port is DOWN
It must have ACTIVE status, otherwise no routing to qrouter-namespace.

dbaxps gravatar imagedbaxps ( 2015-04-29 14:48:11 -0500 )edit

Recreate interface to subnet at router first && check status again

dbaxps gravatar imagedbaxps ( 2015-04-29 14:49:15 -0500 )edit
0

answered 2015-06-01 19:36:45 -0500

jlausuch gravatar image

Hi,

I have exactly the same issue. Have checked the attached router port and its ACTIVE.

I use a Cirros VM on that private net, creating a port before. Something like this:

[creation of private network,subnet and router]
neutron port-create --fixed-ip subnet_id=$SUBNET_ID,ip_address=192.168.120.150 $NET_ID
neutron port-list | grep 120.150
| d7d4d8fd-3aaa-486a-b9cf-75719bbe503d |      | fa:16:3e:10:62:51 | {"subnet_id": "d00279d1-9d8d-41d0-9776-680233496c85", "ip_address": "192.168.120.150"} |

nova boot vm-test --image $IMAGE_ID --flavor 1 --nic port-id=d7d4d8fd-3aaa-486a-b9cf-75719bbe503d

[jenkins-ci@lf_pod2 ~]$ nova list | grep vm-test
| 0b381c32-ee29-443e-a8e2-b1ea01e648e9 | vm-test     | ACTIVE | -          | Running     | test-net=192.168.120.150     |

The VM boots fine, but looking at the console, still:

...
Starting network...
udhcpc (v1.20.1) started
Sending discover...
Sending discover...
Sending discover...
Usage: /sbin/cirros-dhcpc <up|down>
No lease, failing
...
### ifconfig -a
eth0      Link encap:Ethernet  HWaddr FA:16:3E:BA:9C:84  
          inet6 addr: fe80::f816:3eff:feba:9c84/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:53 errors:0 dropped:45 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:5823 (5.6 KiB)  TX bytes:1132 (1.1 KiB)

Any more ideas how to troubleshoot this?

edit flag offensive delete link more
-1

answered 2015-06-04 09:01:14 -0500

hello there,

technically no ip assigned to vm here problem is with your tunnel interface. if you type nova list your vm will be be ACTIVE & RUNNING also an IP will be displayed but internally it is not, This is technically a bug according to me.

if you type nova console-log <instance-id> here there will be no IP.

for every network creation a namespace will be created from that also you can check

ip netns exec qdhcp-****** ifconfig

openstack installation guide clearly states that you need to use two different physical interfaces for management and tunnel network. if this step is correct then IP will be assigned to your VM

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2015-04-29 10:46:04 -0500

Seen: 10,553 times

Last updated: Jun 04 '15