Ask Your Question

No route to Metadata server after instance creation

asked 2013-10-07 07:28:53 -0500

B.Callanan gravatar image

updated 2013-10-07 09:54:03 -0500

darragh-oreilly gravatar image

I'm creating new instances via nova cli

% nova boot --flavor 2 --image 7e5a5f17-1da8-48bc-b02f-9ae5a1ebb154 --key-name admin_keypair --nic net-id=0d2f3ccb-6eeb-4a37-97b2-9e84613e8cbb testbed_ubuntu_instance

When I ssh into the system the route to the metadata server host is not in the routing tables. I have to add it manually to make it work properly...

% route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

default         UG    100    0        0 eth0       *        U     0      0        0 eth0

% route add -host dev eth0

The question is why is the route not present? Is there a nova property that is not set properly to persist the route on the VM Instance?

edit retag flag offensive close merge delete


If metadata was not working before adding that route, I can't see why it would start working after. Because it's the same as the default route. Do 'ip route get' before and after. I'm guessing this is Quantum, because of the net-id? If so, is there a Quantum router on the subnet?

darragh-oreilly gravatar imagedarragh-oreilly ( 2013-10-07 10:01:49 -0500 )edit

I can add user-data to Nova boot and that user data gets put on the host. So, the cloud-init process of access the user data is present. My assumption is that the VM startup "adds" the route during boot, then removes it after the VM is fully booted. All of the user-data and or meta data I set on the VM are available but only after adding the route. For instance, the ssh keys and other vital stuff are put on the system successfully and consistently. My research that I've been doing says that the route should exist. But in this case its not there. I'm just wondering if this is by design or is it a missing setting in the config properties in the nova/quantum property files. The VM instance is in its own namespace with its own private subnet.

B.Callanan gravatar imageB.Callanan ( 2013-10-07 10:10:44 -0500 )edit

No host route for is needed if the metadata is being got from the metadata proxy in the IP namespace of the Quantum router. Try 'wget' with and without the that route.

darragh-oreilly gravatar imagedarragh-oreilly ( 2013-10-07 10:19:05 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-10-25 09:40:49 -0500

DanielXu gravatar image

I met same problem before. But I'm not sure it was the same situation as yours.In my environment i install neutron with linux-bridge. Check if dhcp is enable in subnet. If enable_dhcp is false, the route will not be added when instance lauched.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2013-10-07 07:28:53 -0500

Seen: 2,650 times

Last updated: Oct 07 '13