
設定
テスト目的で、VirtualBox VM に MAAS をインストールし、2 番目の VM を PXE ブートしたいと考えています。
両方の VM は VirtualBox 内部ネットワークに接続されています。
MAAS VM は Ubuntu Server 14.04.2 であり、次のパッケージのバージョン 1.7.5+bzr3369-0ubuntu1~trusty1 をインストールしました。
maas
maas-region-controller
maas-cluster-controller
maas-dhcp
maas-dns
MAAS GUIの「イメージ」セクションで、デフォルトのアーカイブから14.04 LTSイメージを追加しました(出典: ubuntu.com)。その後、デフォルトのクラスター (「クラスター マスター」) は正常に同期できるようになりました。
MAAS VM でも ssh キーを生成しssh-keygen
、デフォルトの場所 (~/.ssh/) に保存しました。次に、GUI のユーザー設定セクションで、SSH 公開キーを追加しました。
GUI の「クラスター」セクションで、「クラスター マスター」にインターフェイス (eth2) を追加し、dhcp と dns を管理するように構成しました。インターフェイス eth2 は、他の VM に接続されています (VirtualBox 内部ネットワーク経由)。
GUI では、「デフォルト クラスター」にノードを追加し、「電源タイプ」を空白のままにしました。これは、VirtualBox では Wake On Lan が機能しないためです。
質問
クライアント VM を手動で起動すると、IP アドレスが取得され、起動プロセスが正常に開始されます。ただし、ある時点で、次のメッセージが数回繰り返され、120 秒間ハングします。
url_helper.py[警告]: ' を呼び出していますhttp://169.254.169.254/2009-04-04/メタデータ/インスタンスID' 失敗 [70/120 秒]: リクエスト エラー [HTTPConnectionPool(host='169.254.269.254', port=80): URL で最大再試行回数を超えました: /2009-04-04/meta-data/instance-id (原因: [Errno 101] ネットワークに到達できません)]
これについてオンラインで読んだ後、これは Ubuntu のクラウド イメージであるため、インスタンス メタデータを取得しようとしていることがわかりました。
1) この動作を無効にするにはどうすればいいでしょうか?
2) インスタンス メタデータを提供するために、メタデータ (cloud-init?) サービス (MAAS VM 上のどこで?) を実行するにはどうすればよいですか?
これが最初の問題に関係しているかどうかはわかりません。120 秒後、起動プロセスが再開され、ログイン プロンプトが表示されます。オンラインで調べたところ、ローカルではログインできないことがわかりました。代わりに、公開鍵認証を使用して ssh 経由で接続する必要があります。前述のように、ssh キーを生成して MAAS に追加しましたが、ssh 接続が拒否されます。
test@ubuntuServer1404:~$ ssh [email protected] -v
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 192.168.7.101 [192.168.7.101] port 22.
debug1: Connection established.
debug1: identity file /home/test/.ssh/id_rsa type 1
debug1: identity file /home/test/.ssh/id_rsa-cert type -1
debug1: identity file /home/test/.ssh/id_dsa type -1
debug1: identity file /home/test/.ssh/id_dsa-cert type -1
debug1: identity file /home/test/.ssh/id_ecdsa type -1
debug1: identity file /home/test/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/test/.ssh/id_ed25519 type -1
debug1: identity file /home/test/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH_6.6.1* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr [email protected] none
debug1: kex: client->server aes128-ctr [email protected] none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 06:16:8e:d2:22:3a:0b:67:64:3d:7b:17:69:fb:ee:29
debug1: Host '192.168.7.101' is known and matches the ECDSA host key.
debug1: Found key in /home/test/.ssh/known_hosts:2
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/test/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Trying private key: /home/test/.ssh/id_dsa
debug1: Trying private key: /home/test/.ssh/id_ecdsa
debug1: Trying private key: /home/test/.ssh/id_ed25519
debug1: No more authentication methods to try.
Permission denied (publickey).
どのような助けでも大歓迎です。ありがとうございます。
答え1
私も同じ問題を抱えていましたが、それはmaasが間違ったIPで設定されていたためです(最初にマシンを構築したときはDHCPでした)。問題は、
dpkg-reconfigure maas-region-controller
正しい IP を指定します。