[cloudstack-users:0063] Re: 【質問】CloudStack 4.0でインストール完了後のテンプレート取得が異常に遅い

Naruhiko Ogasawara naruoga @ gmail.com
2012年 11月 27日 (火) 12:14:07 JST


u1さん、荒井さん、
小笠原です。お世話になっております。

いただいた回答を伝えたところ、ビンゴだったようです。
皆様のご親切に感謝感激です。

OCDET については名前は伺っていたのですが、ちゃんとチェックしておけば
よかったです。すみません。
これからじっくりいろいろ中を漁ってみたいと思います。

[以上]


2012年11月27日 11:56 荒井康宏 <y-arai @ cloud.or.jp>:
> 小笠原さん、u1さん
>
> こんにちは。CUPA荒井です。
>
>> SSVM(Secondary Storage VM)がインターネットにアクセス出来ない状態の可能性が高い気がするので、
>> SSVMにHypervisorのリンクローカル経由でSSHログインしてみて、通信状態を確認してみると良いと思います。
>
> 恐らく u1さんの指摘どおりかと思います。
> オープンクラウド実証実験(http://ocdet.org/)の構築TIPSで
> 関連するものがありましたので、送付しますね。
> 以下の2件を確認してみるのが良いかと。
>
> ・現象
> SecondaryStorageVMがrunningになるが、
> デフォルトテンプレート(CentOS 5.5(64-bit) no GUI (KVM))が表示されない
>
> ・現象
> デフォルトテンプレート(CentOS 5.5(64-bit) no GUI (KVM))が表示されるが、
> ダウンロードが完了しない。
> 準備完了    No
> 状態      Unable to resolve download.cloud.com
>
>
> --------------------------------------------------------------------------------------------------------------
> ■ CloudStack TIPS
>
> ・現象
> SecondaryStorageVMがrunningになるが、
> デフォルトテンプレート(CentOS 5.5(64-bit) no GUI (KVM))が表示されない
>
> ・原因
> SecondaryStorageVMのエージェントとManagementServerが通信できていない
> GlobalSettingのhost設定が正しく設定されていない
>
> 例:
> host    The ip address of management server    172.16.10.13 ★誤り
> host    The ip address of management server    172.16.51.13 ★正
>
> hostは、default GWのインターフェイスが自動的に登録されてしまうため、
> 管理ネットワーク(Privateネットワーク)を分けた場合やロードバランサーを経由する場合には、明示的に正しいインターフェイスを設定する必要あり。
>
> ・対処方法
> 1. GlobalSettingのhost設定を修正
> 2. Management-Serverをrestartし、設定変更を適用
> 3. SecondaryStorageVMを破棄
> 4. SecondaryStorageVMが新たに生成されること、デフォルトテンプレートが表示されることを確認
>
>
> ・調査方法詳細
>
> [root @ node004 agent]# ssh -i /root/.ssh/id_rsa.cloud -p 3922
> 169.254.0.232 ★SecondaryStorageVMのリンクローカルIPアドレス
>
> root @ s-4-VM:/var/log/cloud# ping 172.16.10.13
> PING 172.16.10.13 (172.16.10.13): 56 data bytes
> ^C--- 172.16.10.13 ping statistics ---
> 2 packets transmitted, 0 packets received, 100% packet loss
>
> root @ s-4-VM:~# netstat -rn
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
> 8.8.8.4         172.16.51.1     255.255.255.255 UGH       0 0          0 eth1
> 172.16.10.13    172.16.51.1     255.255.255.255 UGH       0 0          0 eth1 ★
> 198.18.100.0    0.0.0.0         255.255.255.0   U         0 0          0 eth2
> 172.16.51.0     0.0.0.0         255.255.255.0   U         0 0          0 eth1
> 172.16.51.0     0.0.0.0         255.255.255.0   U         0 0          0 eth3
> 172.16.10.0     172.16.51.1     255.255.255.0   UG        0 0          0 eth1
> 169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
> 0.0.0.0         198.18.100.1    0.0.0.0         UG        0 0          0 eth2
>
> root @ s-4-VM:~# cd /var/log/cloud
> root @ s-4-VM:/var/log/cloud# ls -al
> total 1624
> drwxr-xr-x 2 root root   4096 Nov 17 08:21 .
> drwxr-xr-x 8 root root   4096 Nov 17 08:41 ..
> -rw-r--r-- 1 root root 673225 Nov 17 12:16 cloud.out
> -rw-r--r-- 1 root root 970440 Nov 17 12:16 systemvm.log
>
>
> root @ s-4-VM:/var/log/cloud# cat systemvm.log
> 2012-11-17 12:05:52,826 INFO  [utils.nio.NioClient] (Agent-Selector:)
> Connecting to 172.16.10.13:8250
> 2012-11-17 12:05:55,830 ERROR [utils.nio.NioConnection]
> (Agent-Selector:) Unable to initialize the threads.
> java.net.NoRouteToHostException: No route to host ★
>         at sun.nio.ch.Net.connect(Native Method)
>         at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:500)
>         at com.cloud.utils.nio.NioClient.init(NioClient.java:64)
>         at com.cloud.utils.nio.NioConnection.run(NioConnection.java:108)
>         at java.lang.Thread.run(Thread.java:662)
>
> ・ログ
> management-server.logに以下のようなログが表示されればダウンロードが開始されます。
> 2012-11-17 21:31:15,190 DEBUG [agent.transport.Request]
> (AgentManager-Handler-14:null) Seq 3-770506758: Sending  { Cmd ,
> MgmtId: 90520734315668, via: 3, Ver: v1, Flags: 100011,
> [{"storage.DownloadCommand":{"hvm":false,"description":"CentOS
> 5.5(64-bit) no GUI
> (KVM)","checksum":"ed0e788280ff2912ea40f7f91ca7a249","maxDownloadSizeInBytes":53687091200,"id":4,"resourceType":"TEMPLATE","url":"http://download.cloud.com/releases/2.2.0/eec2209b-9875-3c8d-92be-c001bd8a0faf.qcow2.bz2","format":"QCOW2","accountId":1,"name":"centos55-x86_64","secUrl":"nfs://172.16.51.19/export/secondary","wait":0}}]
> }
>
>
> --------------------------------------------------------------------------------------------------------------
>
> ■ CloudStack TIPS
>
> ・現象
> デフォルトテンプレート(CentOS 5.5(64-bit) no GUI (KVM))が表示されるが、
> ダウンロードが完了しない。
> 準備完了    No
> 状態      Unable to resolve download.cloud.com
>
> ・原因
> SecondaryStorageVMから、download.cloud.com通信できていない
> ネットワークおよびDNS設定が正しく設定されていない
>
> 例:
> root @ s-5-VM:~# cat /etc/resolv.conf
> nameserver 8.8.8.8 ★内部DNSが設定されている
> nameserver 8.8.8.8
>
> root @ s-5-VM:~# netstat -rn
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
> 8.8.8.4         172.16.51.1     255.255.255.255 UGH       0 0          0 eth1
>
> SecondaryStorageVMはインターネットと通信できる必要あり
> 検証環境でPublicにプライベートIPアドレスを用いている場合は、GWにてNATの設定を行い通信可能としておく
> 管理ネットワーク側でDNSを提供していない環境では、内部DNSの設定を無効にする
> ※Apache CloudStack 4.0から内部DNSは必須となりましたが、127.0.0.1 などループバックIPを指定しておけば
> 回避できます。
>
> ・対処方法
> 1. ゾーンの内部DNS設定を変更
> 2. Management-Serverをrestartし、設定変更を適用
> 3. SecondaryStorageVMを破棄
> 4. SecondaryStorageVMが新たに生成されること、デフォルトテンプレート(CentOS 5.5(64-bit)がダウンロードできたことを確認
> 、準備完了   Yes
> 状態      Download Complete
>
>
> ・調査方法詳細
>
> [root @ node004 agent]# ssh -i /root/.ssh/id_rsa.cloud -p 3922
> 169.254.0.240 ★SecondaryStorageVMのリンクローカルIPアドレス
>
> root @ s-5-VM:~# netstat -rn
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
> 8.8.8.8         172.16.51.1     255.255.255.255 UGH       0 0          0 eth1
> 198.18.100.0    0.0.0.0         255.255.255.0   U         0 0          0 eth2
> 172.16.51.0     0.0.0.0         255.255.255.0   U         0 0          0 eth1
> 172.16.51.0     0.0.0.0         255.255.255.0   U         0 0          0 eth3
> 172.16.10.0     172.16.51.1     255.255.255.0   UG        0 0          0 eth1
> 169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
> 0.0.0.0         198.18.100.1    0.0.0.0         UG        0 0          0 eth2 ★
>
> root @ s-5-VM:~# ping 198.18.100.1
> PING 198.18.100.1 (198.18.100.1): 56 data bytes
> 64 bytes from 198.18.100.1: icmp_seq=0 ttl=64 time=0.873 ms
> ^C--- 198.18.100.1 ping statistics ---
> 1 packets transmitted, 1 packets received, 0% packet loss
> round-trip min/avg/max/stddev = 0.873/0.873/0.873/0.000 ms
>
> root @ s-5-VM:~# ping 8.8.4.4
> PING 8.8.4.4 (8.8.4.4): 56 data bytes
> ^C--- 8.8.4.4 ping statistics ---
> 2 packets transmitted, 0 packets received, 100% packet loss
> ↑グローバルIPと通信できていない。GWにてNATの設定を行い通信可能としておく。
>
> root @ s-5-VM:~# cat /etc/resolv.conf
> nameserver 8.8.8.8
> nameserver 8.8.8.8 ★
>
> root @ s-5-VM:~# netstat -rn
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
> 8.8.8.8         172.16.51.1     255.255.255.255 UGH       0 0          0 eth1 ★
> 198.18.100.0    0.0.0.0         255.255.255.0   U         0 0          0 eth2
> 172.16.51.0     0.0.0.0         255.255.255.0   U         0 0          0 eth1
> 172.16.51.0     0.0.0.0         255.255.255.0   U         0 0          0 eth3
> 172.16.10.0     172.16.51.1     255.255.255.0   UG        0 0          0 eth1
> 169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
> 0.0.0.0         198.18.100.1    0.0.0.0         UG        0 0          0 eth2
>
> root @ s-5-VM:~# ping www.google.com
> ^C
> ↑DNSサーバと通信できていない。
>
> [root @ node004 agent]# ssh -i /root/.ssh/id_rsa.cloud -p 3922 169.254.3.196
> root @ s-6-VM:~# cat /etc/resolv.conf
> nameserver 127.0.0.1
> nameserver 8.8.8.8
>
> root @ s-6-VM:~# netstat -rn
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
> 127.0.0.1       172.16.51.1     255.255.255.255 UGH       0 0          0 eth1
> 198.18.100.0    0.0.0.0         255.255.255.0   U         0 0          0 eth2
> 172.16.51.0     0.0.0.0         255.255.255.0   U         0 0          0 eth1
> 172.16.51.0     0.0.0.0         255.255.255.0   U         0 0          0 eth3
> 172.16.10.0     172.16.51.1     255.255.255.0   UG        0 0          0 eth1
> 169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
> 0.0.0.0         198.18.100.1    0.0.0.0         UG        0 0          0 eth2
>
> root @ s-6-VM:~# ping www.google.com
> PING www.google.com (173.194.38.116): 56 data bytes
> 64 bytes from 173.194.38.116: icmp_seq=0 ttl=54 time=2.919 ms
> 64 bytes from 173.194.38.116: icmp_seq=1 ttl=54 time=3.184 ms
> 64 bytes from 173.194.38.116: icmp_seq=2 ttl=54 time=3.011 ms
> 64 bytes from 173.194.38.116: icmp_seq=3 ttl=54 time=3.192 ms
> ^C--- www.google.com ping statistics ---
> 4 packets transmitted, 4 packets received, 0% packet loss
> round-trip min/avg/max/stddev = 2.919/3.076/3.192/0.116 ms
>  --------------------------------------------------------------------------------------------------------------
>
> オープンクラウド実証実験に興味がありましたら、下記をご確認ください。
> OpenIaaS研究会でOpenStack, CloudStackのリファレンスアーキテクチャーや
> 運用ノウハウの研究を継続的に行っているので、参考になるかと思います。
> http://ocdet.org/
>
> 2012年11月27日 11:39 Yuichi Uemura <yuichi.u @ gmail.com>:
>> u1といいます。
>>
>> 自分も先日、AdvancedModeを組んだときには似たような状態になってました。
>>
>> SSVM(Secondary Storage VM)がインターネットにアクセス出来ない状態の可能性が高い気がするので、
>> SSVMにHypervisorのリンクローカル経由でSSHログインしてみて、通信状態を確認してみると良いと思い
>> ます。
>>
>> それで解決しなかった場合はmanagement serverと上記のSSVMの/var/log/cloud/配下のログを見るのが吉ですね。
>>
>> 2012年11月27日 10:54 Naruhiko Ogasawara <naruoga @ gmail.com>:
>>> MLのみなさま、
>>> 小笠原と申します。こんにちは。
>>>
>>> CSについては個人的にちょろちょろ弄りはじめたレベルでまだぴよぴよ
>>> なのですが、たまたま職場で環境構築を始めた方がいて、どうにもうまく
>>> いかないのでなんか知らないかと聞かれたので、代理で質問する次第
>>> です。
>>>
>>> 環境は:
>>>
>>> - CloudStack 4.0
>>> - CentOS 6.3
>>> - KVM
>>>
>>> 後のインフラ周り (MySQLなど) は標準リポジトリのままです。
>>>
>>> インストールはソースからではなく:
>>>
>>> http://incubator.apache.org/cloudstack/docs/en-US/Apache_CloudStack/4.0.0-incubating/html/Installation_Guide/installation.html
>>>
>>> にしたがって RPM を利用してインストールを行い、以下 5 章、6 章の
>>> とおりに作業を進めてダッシュボードは起動した状態までは来ました。
>>> しかし:
>>>
>>> http://incubator.apache.org/cloudstack/docs/en-US/Apache_CloudStack/4.0.0-incubating/html/Installation_Guide/initialize-and-test.html
>>>
>>> には:
>>> -------
>>> 6.8. Initialize and Test
>>>
>>> After everything is configured, CloudStack will perform its initialization.
>>> This can take 30 minutes or more, depending on the speed of your network.
>>> -------
>>> とあるのですが、30分はおろか数時間放置しても終了しません。
>>>
>>> 同様な問題に遭遇した方はおられますでしょうか?
>>> あるいは「ここを確認してみては」などといったアドバイスなど、
>>> いただければ幸いです。
>>>
>>>
>>> 宜しくおねがいします。
>>>
>>> [以上]
>>> --
>>> Naruhiko Ogasawara (naruoga @ gmail.com)
>>> _______________________________________________
>>> users mailing list
>>> users @ cloudstack.jp
>>> http://ml.cloudstack.jp/mailman/listinfo/users
>
>
> --
> --------------------------------------------
> ☆事務所(電話番号)を移転しました☆
> 一般社団法人クラウド利用促進機構 (CUPA)
> Cloud Utilization Promotion Agency
> 代表理事  荒井 康宏
> 〒110-0005
> 東京都台東区上野3-10-2中西ビル2F
> TEL: 03-6803-0134  FAX: 03-6803-2813
> URL: http://cloud.or.jp
> EMail: contact @ cloud.or.jp
> --------------------------------------------
>
> _______________________________________________
> users mailing list
> users @ cloudstack.jp
> http://ml.cloudstack.jp/mailman/listinfo/users



-- 
Naruhiko Ogasawara (naruoga @ gmail.com)



users メーリングリストの案内