← Back to team overview

openstack team mailing list archive

Re: Cannot get ssh-key in instance

 

George:

I can GET http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key in
instance.

Now I found some error about key injecting when launching instance:

2012-05-11 10:30:41 INFO nova.virt.libvirt.connection
[req-e9463bab-044f-4a79-a0a4-40499894fd51 faa39ad681294b8097070541cb62e91f
1b11ffe707ea44c49ba829a5b6859b00] [instance:
2977ba83-17b5-43d4-8a95-4a97fb6ab9dd] Injecting key into image
ea9903d1-098b-4f61-b87f-30d96778202f
2012-05-11 10:30:42 WARNING nova.virt.libvirt.connection
[req-e9463bab-044f-4a79-a0a4-40499894fd51 faa39ad681294b8097070541cb62e91f
1b11ffe707ea44c49ba829a5b6859b00] [instance:
2977ba83-17b5-43d4-8a95-4a97fb6ab9dd] Ignoring error injecting data into
image ea9903d1-098b-4f61-b87f-30d96778202f (
--
Failed to mount filesystem: Unexpected error while running command.
Command: sudo nova-rootwrap mount /dev/nbd15 /tmp/tmpYGGWcf
Exit code: 32
Stdout: ''
Stderr: 'mount: /dev/nbd15 already mounted or /tmp/tmpYGGWcf busy\n'
--
Failed to mount filesystem: Unexpected error while running command.
Command: sudo nova-rootwrap guestmount --rw -a
/data/openstack/nova/instances/instance-00000014/disk -m /dev/sda
/tmp/tmpYGGWcf
Exit code: 1
Stdout: ''
Stderr: 'Traceback (most recent call last):\n  File
"/usr/bin/nova-rootwrap", line 69, in <module>\n
 env=filtermatch.get_environment(userargs))\n  File
"/usr/lib/python2.7/subprocess.py", line 679, in __init__\n    errread,
errwrite)\n  File "/usr/lib/python2.7/subprocess.py", line 1249, in
_execute_child\n    raise child_exception\nOSError: [Errno 2] No such file
or directory\n')
^C


On Thu, May 10, 2012 at 10:42 PM, George Mihaiescu
<George.Mihaiescu@xxxxxx>wrote:

> **
> Hi,
>
> First, check if nova-api is running on the host where your nova-network
> runs (same as nova-compute if using a multi_host=true setup).
>
> Second, using the console of the instance check if your instance can
> access the API service by doing a:
> *GET http://169.254.169.254/latest/meta-data/public-keys/0/openssh-key*
>
> You can also read this doc for more info about the metadata service:
>
> http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html
>
>
> George
>
>  ------------------------------
>  *From:* openstack-bounces+george.mihaiescu=q9.com@xxxxxxxxxxxxxxxxxxx[mailto:
> openstack-bounces+george.mihaiescu=q9.com@xxxxxxxxxxxxxxxxxxx] *On Behalf
> Of *livemoon
> *Sent:* Thursday, May 10, 2012 9:26 AM
> *To:* Yong Sheng Gong
>
> *Cc:* openstack@xxxxxxxxxxxxxxxxxxx
> *Subject:* Re: [Openstack] Cannot get ssh-key in instance
>
> I am sure image is ok since of I use the same image in both older version
> installed via devstack on ubuntu11.10 and new version installed on
> ubuntu12.04.
>
> In older version, it can work well. but now it cannot. Am I missing
> something in nova.conf ?
>
> On Thu, May 10, 2012 at 8:29 PM, Yong Sheng Gong <gongysh@xxxxxxxxxx>wrote:
>
>> have you started the instance with keypair?
>>
>>
>> -----openstack-bounces+gongysh=cn.ibm.com@xxxxxxxxxxxxxxxxxxx wrote:
>> -----
>>
>> To: livemoon <mwjpiero@xxxxxxxxx> <mwjpiero@xxxxxxxxx>
>> From: Razique Mahroua <razique.mahroua@xxxxxxxxx><razique.mahroua@xxxxxxxxx>
>> Sent by: openstack-bounces+gongysh=cn.ibm.com@xxxxxxxxxxxxxxxxxxx
>> Date: 05/10/2012 06:29PM
>> Cc: openstack@xxxxxxxxxxxxxxxxxxx
>> Subject: Re: [Openstack] Cannot get ssh-key in instance
>>
>>  Hey livememon,
>> is it possible to see the content of the rc.local. Also, are other
>> instances able to reach the metadata server ?
>>
>>   livemoon <mwjpiero@xxxxxxxxx>
>> 10 mai 2012 12:24
>>  I running an instance(ubuntu or centos), and it cannot get keypair.
>>
>> In ubuntu12.04, I have install cloud-init and in centos I have add some
>> command into /etc/rc.local
>>
>> There is some of instance's logs about cloud-init:
>>
>> cloud-init start-local running: Thu, 10 May 2012 10:17:33 +0000. up 4.47
>> seconds
>>
>> no instance data found in start-local
>>
>> ci-info: lo    : 1 127.0.0.1       255.0.0.0       .
>>
>> ci-info: eth0  : 1 10.0.200.5      255.255.255.224 fa:16:3e:6a:30:7c
>>
>> ci-info: route-0: 0.0.0.0         10.0.200.1      0.0.0.0         eth0
>> UG
>>
>> ci-info: route-1: 10.0.200.0      0.0.0.0         255.255.255.224 eth0   U
>>
>> cloud-init start running: Thu, 10 May 2012 10:17:33 +0000. up 5.00 seconds
>>
>> no instance data found in start
>>
>> I think it maybe some missing in nova host, How to fix it?
>>
>>
>> --
>> 非淡薄无以明志,非宁静无以致远
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to : openstack@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~openstack
>> More help : https://help.launchpad.net/ListHelp
>>
>>
>>  --
>> Razique Mahroua
>> Nuage & Co - Razique Mahroua
>> razique.mahroua@xxxxxxxxx
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~openstack
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>>
>>
>
>
> --
> 非淡薄无以明志,非宁静无以致远
>



-- 
非淡薄无以明志,非宁静无以致远

JPEG image

JPEG image


References