我正在尝试按照食谱https://www.ubuntu.com/download/cloud#instructions在第 6 步运行 openstack-install 时出现以下错误:
Problem during bootstrap: { 'err': 'Bootstrapping environment "maas" Starting new instance for initial state server Launching instance\n - /MAAS/api/1.0/nodes/[node_id]/ ERROR failed to bootstrap environment: bootstrap instance started but did not change to Deployed state: instance "/MAAS/api/1.0/nodes/[node_id]/" failed to deploy', 'output': '', 'status': 1 }
我在 MAAS 中已投入使用并处于就绪状态的 8 台机器。我已使用 NAT 设置了默认网关,以便内部网络上的机器可以访问公共互联网。
以下是完整的 .cloud-install/commands.log:
[INFO: 11-17 09:57:39, openstack-install:227] Starting OpenStack Installer v0.99.28
[INFO: 11-17 09:57:39, openstack-install:228] Start command: ['/usr/bin/openstack-install']
[INFO: 11-17 09:57:39, openstack-install:239] Creating juju directories: /home/bakksjo/.cloud-install/juju
[INFO: 11-17 09:57:41, openstack-install:295] Running Liberty release
[INFO: 11-17 09:57:51, installbase.py:132] Performing an Autopilot install
[INFO: 11-17 09:57:51, utils.py:780] pollinate: sudo su - -c 'pollinate -q -r --curl-opts "-k --user-agent uoi/310c8ee0-d558-45fd-b706-ecb708c082dd/IL"'
[DEBUG: 11-17 09:58:11, landscape.py:75] Existing MAAS defined, doing a LDS installation with existing MAAS.
[DEBUG: 11-17 09:58:17, utils.py:627] ssh keys exist for this user, they will be used instead.
[DEBUG: 11-17 09:58:17, multi.py:139] Bootstrapping Juju: JUJU_HOME=/home/bakksjo/.cloud-install/juju juju bootstrap --to honorable-advertisement
[DEBUG: 11-17 10:38:21, multi.py:145] Problem during bootstrap: '{'err': 'Bootstrapping environment "maas"\nStarting new instance for initial state server\nLaunching instance\n - /MAAS/api/1.0/nodes/node-4ae361e2-a032-11e6-bf8c-f80f4182edbc/\nERROR failed to bootstrap environment: bootstrap instance started but did not change to Deployed state: instance "/MAAS/api/1.0/nodes/node-4ae361e2-a032-11e6-bf8c-f80f4182edbc/" failed to deploy\n', 'output': '', 'status': 1}'
[ERROR: 11-17 10:38:21, gui.py:269] A fatal error has occurred: Problem with juju bootstrap.
[ERROR: 11-17 10:38:21, gui.py:270] Problem with juju bootstrap.
Traceback (most recent call last):
File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/share/openstack/cloudinstall/controllers/install/multi.py", line 146, in do_install
raise Exception("Problem with juju bootstrap.")
Exception: Problem with juju bootstrap.
[DEBUG: 11-17 10:38:21, error.py:35] showing error view for: Problem with juju bootstrap.
[ERROR: 11-17 11:24:12, ev.py:130] Exception in ev.run():
Traceback (most recent call last):
File "/usr/share/openstack/cloudinstall/ev.py", line 128, in run
self.loop.run()
File "/usr/lib/python3/dist-packages/urwid/main_loop.py", line 278, in run
self._run()
File "/usr/lib/python3/dist-packages/urwid/main_loop.py", line 376, in _run
self.event_loop.run()
File "/usr/lib/python3/dist-packages/urwid/main_loop.py", line 1326, in run
self._loop.run_forever()
File "/usr/lib/python3.4/asyncio/base_events.py", line 276, in run_forever
self._run_once()
File "/usr/lib/python3.4/asyncio/base_events.py", line 1172, in _run_once
handle._run()
File "/usr/lib/python3.4/asyncio/events.py", line 120, in _run
self._callback(*self._args)
File "/usr/lib/python3/dist-packages/urwid/raw_display.py", line 393, in <lambda>
event_loop, callback, self.get_available_raw_input())
File "/usr/lib/python3/dist-packages/urwid/raw_display.py", line 493, in parse_input
callback(processed, processed_codes)
File "/usr/lib/python3/dist-packages/urwid/main_loop.py", line 403, in _update
self.process_input(keys)
File "/usr/lib/python3/dist-packages/urwid/main_loop.py", line 503, in process_input
k = self._topmost_widget.keypress(self.screen_size, k)
File "/usr/share/openstack/cloudinstall/gui.py", line 136, in keypress
return super().keypress(size, key)
File "/usr/lib/python3/dist-packages/urwid/container.py", line 1128, in keypress
return self.body.keypress( (maxcol, remaining), key )
File "/usr/lib/python3/dist-packages/urwid/decoration.py", line 836, in keypress
return self._original_widget.keypress((maxcol,), key)
File "/usr/lib/python3/dist-packages/urwid/container.py", line 1587, in keypress
key = self.focus.keypress(tsize, key)
File "/usr/lib/python3/dist-packages/urwid/decoration.py", line 621, in keypress
return self._original_widget.keypress(maxvals, key)
File "/usr/lib/python3/dist-packages/urwid/container.py", line 1587, in keypress
key = self.focus.keypress(tsize, key)
File "/usr/lib/python3/dist-packages/urwid/wimp.py", line 535, in keypress
self._emit('click')
File "/usr/lib/python3/dist-packages/urwid/widget.py", line 463, in _emit
signals.emit_signal(self, name, self, *args)
File "/usr/lib/python3/dist-packages/urwid/signals.py", line 264, in emit
result |= self._call_callback(callback, user_arg, user_args, args)
File "/usr/lib/python3/dist-packages/urwid/signals.py", line 294, in _call_callback
return bool(callback(*args_to_pass))
File "/usr/share/openstack/cloudinstall/ui/views/error.py", line 66, in cancel
raise SystemExit("Install exited because of error.")
SystemExit: Install exited because of error.
[DEBUG: 11-17 11:24:12, utils.py:59] Juju Version: 1.25.6-trusty-amd64
[INFO: 11-17 11:24:12, utils.py:61] Cleanup, saving latest config object.
以下是 /var/log/maas/maas.log 的摘录:
Nov 17 09:58:20 rt1 maas.node: [INFO] honorable-advertisement: Status transition from READY to ALLOCATED
Nov 17 09:58:20 rt1 maas.node: [INFO] honorable-advertisement: allocated to user bakksjo
Nov 17 09:58:21 rt1 maas.interface: [INFO] Allocated automatic static IP address 10.1.2.1 for eth0 on honorable-advertisement.
Nov 17 09:58:21 rt1 maas.node: [INFO] honorable-advertisement: Status transition from ALLOCATED to DEPLOYING
Nov 17 09:58:21 rt1 maas.dns: [INFO] Generating new DNS zone file for maas
Nov 17 09:58:21 rt1 maas.dns: [INFO] Generating new DNS zone file for 1.10.in-addr.arpa
Nov 17 09:58:21 rt1 maas.power: [INFO] Changing power state (on) of node: honorable-advertisement (node-4ae361e2-a032-11e6-bf8c-f80f4182edbc)
Nov 17 09:58:24 rt1 maas.power: [INFO] Changed power state (on) of node: honorable-advertisement (node-4ae361e2-a032-11e6-bf8c-f80f4182edbc)
Nov 17 09:58:57 rt1 maas.lease_upload_service: [INFO] Uploading 20 DHCP leases to region controller.
Nov 17 10:38:21 rt1 maas.node: [INFO] honorable-advertisement: Status transition from DEPLOYING to FAILED_DEPLOYMENT
Nov 17 10:38:21 rt1 maas.node: [ERROR] honorable-advertisement: Marking node failed: Node operation 'Deploying' timed out after 0:40:00.
Nov 17 10:38:41 rt1 maas.node_query: [INFO] honorable-advertisement: Power is on.
引导实例确实已启动,我可以通过 SSH 进入。但是,我不确定应该在哪里查找问题。/var/log/cloud-init.log 的内容可以在以下位置找到http://pastebin.com/xrsCR0WG,对于 /var/log/cloud-init-output.log,请参阅 pastebin kj1UCJid(不允许在此处发布两个链接)。后者包含一些看似错误的行,例如
Attempt 5 to download tools from https://streams.canonical.com/juju/tools/agent/1.25.6/juju-1.25.6-trusty-amd64.tgz...
curl: (7) Failed to connect to streams.canonical.com port 443: Connection timed out
但是,以下操作可以在终端上运行:
ubuntu@honorable-advertisement:~$ wget https://streams.canonical.com/juju/tools/agent/1.25.6/juju-1.25.6-trusty-amd64.tgz
--2016-11-17 11:19:52-- https://streams.canonical.com/juju/tools/agent/1.25.6/juju-1.25.6-trusty-amd64.tgz
Resolving streams.canonical.com (streams.canonical.com)... 91.189.88.141, 2001:67c:1360:8001:1::5
Connecting to streams.canonical.com (streams.canonical.com)|91.189.88.141|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 18647709 (18M) [application/x-gzip]
Saving to: ‘juju-1.25.6-trusty-amd64.tgz’
100%[==================================================================================================================================================================>] 18,647,709 6.99MB/s in 2.5s
2016-11-17 11:19:55 (6.99 MB/s) - ‘juju-1.25.6-trusty-amd64.tgz’ saved [18647709/18647709]
因此,这看起来不像是 NAT 设置问题。但为了完整起见,以下是 MAAS 节点上的 iptables 设置:
rt1:~$ sudo iptables -t nat -S
-P PREROUTING ACCEPT
-P INPUT ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT
-A POSTROUTING -s 192.168.122.0/24 -d 224.0.0.0/24 -j RETURN
-A POSTROUTING -s 192.168.122.0/24 -d 255.255.255.255/32 -j RETURN
-A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -p tcp -j MASQUERADE --to-ports 1024-65535
-A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -p udp -j MASQUERADE --to-ports 1024-65535
-A POSTROUTING -s 192.168.122.0/24 ! -d 192.168.122.0/24 -j MASQUERADE
-A POSTROUTING -s 10.0.3.0/24 ! -d 10.0.3.0/24 -j MASQUERADE
-A POSTROUTING -s 10.8.0.0/24 -j SNAT --to-source [my_public_ip] # 10.8.0 is VPN
-A POSTROUTING -s 10.1.0.0/16 -j SNAT --to-source [my_public_ip]
任何帮助是极大的赞赏。
答案1
如果没有配置电源类型(即设置为手动),请检查节点安装选项卡。它可能会卡在“启动”状态,在这种情况下,请在启动时重新启动您正在引导的节点。
我们遇到了类似的问题,重新启动节点似乎可以解决问题。希望这有帮助。祝你好运