[Openstack] Can Ping VMs but not SSH to them ! (and this is not a sec rule problem )

Skible OpenStack skible.openstack at gmail.com
Mon Nov 26 08:31:13 UTC 2012


Hi Choe,

I am guessing you are right, my VMs can't access the metadata service. I
have read your blog and it full of informations but unfortunatly it is
in Korean !!!

Do you mind translating the metadata part please ?

어쨌든 가상 머신으로 ping까지 잘 가지만 ssh로 로그인할 수 없는 경우가 있
다. 이런 경우는 대부분 가상머신이 metadata를 가져오지 못해서 생기는 문제
로 가상머신의 로그나 vnc로 접근해서 확인하면 확인할 수 있다.

ubuntu 가상 머신의 경우는 아래와 같은 메시지가 남는다.

? <http://blog.woosum.net/#>
01
02
03
04
05
06
07
08
09
10
11
	
|root at c-01-01:~# tail /var/lib/nova/instances/instance-00000003/console.log|
|cloud-init start-local running: Thu, 22 Nov 2012 15:07:50 +0000. up
3.37 seconds|
|no instance data found in start-local|
|ci-info: lo : 1 127.0.0.1 255.0.0.0 .|
|ci-info: eth0 : 1 172.16.2.4 255.255.255.0 fa:16:3e:78:fa:03^M|
|ci-info: route-0: 0.0.0.0 172.16.2.1 0.0.0.0 eth0 UG|
|ci-info: route-1: 172.16.2.0 0.0.0.0 255.255.255.0 eth0 U|
|cloud-init start running: Thu, 22 Nov 2012 15:07:54 +0000. up 7.01 seconds|
|2012-11-22 15:08:48,306 - util.py[WARNING]: '<a
href="http://169.254.169.254/2009-04-04/meta-data/instance-id">http://169.254.169.254/2009-04-04/meta-data/instance-id</a>'
failed [51/120s]: url error [timed out]|
|2012-11-22 15:09:39,360 - util.py[WARNING]: '<a
href="http://169.254.169.254/2009-04-04/meta-data/instance-id">http://169.254.169.254/2009-04-04/meta-data/instance-id</a>'
failed [102/120s]: url error [timed out]|
|2012-11-22 15:09:56,379 - util.py[WARNING]: '<a
href="http://169.254.169.254/2009-04-04/meta-data/instance-id">http://169.254.169.254/2009-04-04/meta-data/instance-id</a>'
failed [119/120s]: url error [timed out]|

로그를 보면 dhcp를 통해서 ip를 받아왔지만 cloud-init에서 metadata server
롤 접속하지 못해서 ssh key를 받아오지 못해 ssh 인증키를 가상머신에 설치
하지 못해서 이다.이 문제에 관해서는 이전에 적었으니 참고하시면 되고
<http://blog.woosum.net/archives/1077>, 간단하게 말한다면 l3 agent
namespace에서도 metadata server에 접속할 수 있어야되고, 반대로 metadata
server에서도 가상 머신에 접속할 수 있어야 합니다. management / data /
external / tenant network을 모두 같은 네트워크에서 구성했다면 문제가 안
생기겠지만, 별도의 분리된 네트워크나 private network을 사용했다면 직접
연결되는 경로가 없기 때문에 만들어 줘야 합니다.

간단하게 한다면 metadata api server에서 아래처럼 하면 됩니다.

? <http://blog.woosum.net/#>
1
2
	
|root at api $ route add -net <tenant subnet> gw <tenant default public ip>;|
|root at api $ route add -net 172.16.1.0||/24| |gw 10.100.1.130|

참고로 metadata_ip는 external network에서 접근 가능한 ip여야 합니다.
metadata server를 접근하는 곳이 l3 namespace인데 여기는 이미 external
network 영역이기 때문입니다. 여기서 management나 기타 다른 영역으로 들어
가는 것은 구성상 바람직 하지 않습니다.


Le 26/11/2012 02:02, Choe, Cheng-Dae a e'crit :
> It may... the vm can't get metadata!
>
> please review the vm's console output
> /var/lib/nova/instances/instances-XXXX/console.log
>
> please check ping from metadata api to your vm.
> --
> Choe, Cheng-Dae
> http://blog.woosum.net
> twitter: kiddtm
>
> 2012. 11. 26., 오전 2:30, Skible OpenStack <skible.openstack at gmail.com> 작성:
>
>> Hello,
>>
>> I have installed OpenStack Folsom and i am experiencing some weird behaviour.
>>
>> I can ping VMs ( both fixed and floating ips ) but can't SSH to them ( no internally nor externally) !!
>> I always get this message: connect to host x.x.x.x port 22: Connection refused
>>
>> I have set the security rules right but still nothing !
>>
>> I have a network node, controller node and a compute node. I am using GRE.
>>
>> Note also that my VNC console is not responding to keyboard input even after sending CtrlAltDel !!
>>
>> Please help me out.
>>
>> Kind regards
>> A desperate stacker
>>
>> _______________________________________________
>> 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/20121126/91256789/attachment.html>


More information about the Openstack mailing list