[Openstack] can't ssh instance when launched on a second compute node

Pierre amadio pierre.amadio at canonical.com
Sun Oct 7 18:42:28 UTC 2012


Hi there !

On 10/07/2012 08:31 PM, Afef MDHAFFAR wrote:
> I use a multi-host mode.
> The working image has double identification (by key and login/password)
> It seems that it does not load the key because of this error " Failed to
> get metadata for ip:". I added the flag "host_metadata" but this does
> not solve the problem. Any idea how solve that ?
>

In multi host mode, do not set host_metadata : each compute nodes will 
act as the metadata server itself.

Be sure you have nova-api (or nova-api-metadata) and nova-network on 
each compute nodes.

You should have some iptables nat rules (automatically set) by 
nova-network on the computes nodes.

iptables -t nat -L
...
...
Chain nova-network-PREROUTING (1 references)
target     prot opt source               destination
DNAT       tcp  --  anywhere             169.254.169.254      tcp 
dpt:http to:192.168.122.5:8775
...
...
...

Here all connexion to the metadata server (169.254.169.254) are 
redirected to the current compute nodes on port 8775.

nova-api should be listening on port 8775

A vm should be able to fetch its ssh key with

wget http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key

You may need to use an image with a preset login to be able to log in 
and investigate why this does not work.

http://docs.openstack.org/trunk/openstack-compute/admin/content/metadata-service.html
http://www.sebastien-han.fr/blog/2012/07/11/play-with-openstack-instance-metadata/







More information about the Openstack mailing list