引导至 OpenStack 云需要密码登录

引导至 OpenStack 云需要密码登录

我正在测试 CloudVPS.com 的新测试版 OpenStack 云并遇到了一些问题。

第一个问题(我猜想很可能与 CloudVPS 测试版有关)是,大约有一半的时间,引导服务器被分配了 IP(三个,这是正常的吗?) - 但无法访问,因此引导在 10 分钟后失败。经检查,IP 确实无法访问,因此网络层面出现了问题。这个问题在这里可能可以忽略(在他们的支持下提出)。

另一个问题是,当可以访问服务器时,引导程序会要求输入密码 - 如果不提​​供密码(不知道要提供什么),则引导失败。

$ juju bootstrap --show-log --debug
2013-12-31 17:48:18 DEBUG juju.environs.configstore disk.go:77 Making /home/jaywink/.juju/environments
2013-12-31 17:48:18 INFO juju.provider.openstack provider.go:156 opening environment "cloudvps"
2013-12-31 17:48:20 INFO juju.environs.bootstrap bootstrap.go:46 bootstrapping environment "cloudvps"
2013-12-31 17:48:21 DEBUG juju.environs.bootstrap synctools.go:91 looking for bootstrap tools: series="precise", arch=<nil>, version=<nil>
2013-12-31 17:48:21 INFO juju.environs.tools tools.go:85 reading tools with major.minor version 1.17
2013-12-31 17:48:21 INFO juju.environs.tools tools.go:96 filtering tools by series: precise
2013-12-31 17:48:21 DEBUG juju.environs.tools tools.go:44 no architecture specified when finding tools, looking for any
2013-12-31 17:48:21 DEBUG juju.environs.simplestreams simplestreams.go:667 using default candidate for content id "com.ubuntu.juju:released:tools" are {20131025 mirrors:1.0 content-download streams/v1/cpc-mirrors.sjson []}
2013-12-31 17:48:22 DEBUG juju.environs.simplestreams simplestreams.go:538 no mirror information available for {NL https://identity.stack.cloudvps.com/v2.0}: mirror info with cloud {NL https://identity.stack.cloudvps.com/v2.0} not found
2013-12-31 17:48:22 DEBUG juju.environs.simplestreams simplestreams.go:462 read metadata index at "https://streams.canonical.com/tools/streams/v1/index.sjson"
2013-12-31 17:48:22 DEBUG juju.environs.simplestreams simplestreams.go:625 candidate matches for products ["com.ubuntu.juju:12.04:amd64" "com.ubuntu.juju:12.04:i386" "com.ubuntu.juju:12.04:arm"] are [{Sat, 26 Oct 2013 00:56:32 +1000 products:1.0 content-download  [] streams/v1/com.ubuntu.juju:released:tools.sjson [com.ubuntu.juju:12.04:amd64 com.ubuntu.juju:13.10:amd64]}]
2013-12-31 17:48:22 DEBUG juju.environs.simplestreams simplestreams.go:937 finding products at path "streams/v1/com.ubuntu.juju:released:tools.sjson"
2013-12-31 17:48:22 DEBUG juju.environs.simplestreams simplestreams.go:974 metadata: &{map[com.ubuntu.juju:12.04:amd64:{ 1.17.0 amd64   map[20131026:0xc200533360]} com.ubuntu.juju:13.10:amd64:{ 1.17.0 amd64   map[20131026:0xc200533480]}] map[] Sat, 26 Oct 2013 00:56:32 +1000 products:1.0 }
2013-12-31 17:48:22 INFO juju.environs.bootstrap bootstrap.go:58 picked newest version: 1.17.0
Launching instance
2013-12-31 17:48:23 DEBUG juju.environs.simplestreams simplestreams.go:481 fetchData failed for "http://127.0.0.1:8000/images/streams/v1/index.sjson": cannot find URL "http://127.0.0.1:8000/images/streams/v1/index.sjson" not found
2013-12-31 17:48:23 DEBUG juju.environs.simplestreams simplestreams.go:458 cannot load index "http://127.0.0.1:8000/images/streams/v1/index.sjson": invalid URL "http://127.0.0.1:8000/images/streams/v1/index.sjson" not found
2013-12-31 17:48:23 DEBUG juju.environs.simplestreams simplestreams.go:481 fetchData failed for "http://127.0.0.1:8000/images/streams/v1/mirrors.json": cannot find URL "http://127.0.0.1:8000/images/streams/v1/mirrors.json" not found
2013-12-31 17:48:23 DEBUG juju.environs.simplestreams simplestreams.go:557 no mirror index file found
2013-12-31 17:48:23 DEBUG juju.environs.simplestreams simplestreams.go:462 read metadata index at "http://127.0.0.1:8000/images/streams/v1/index.json"
2013-12-31 17:48:23 DEBUG juju.environs.simplestreams simplestreams.go:625 candidate matches for products ["com.ubuntu.cloud:server:12.04:amd64"] are [{Sun, 29 Dec 2013 22:52:21 +0200 products:1.0 image-ids custom [{NL https://identity.stack.cloudvps.com/v2.0}] streams/v1/com.ubuntu.cloud:released:imagemetadata.json [com.ubuntu.cloud:server:12.04:amd64]}]
2013-12-31 17:48:23 DEBUG juju.environs.simplestreams simplestreams.go:937 finding products at path "streams/v1/com.ubuntu.cloud:released:imagemetadata.json"
2013-12-31 17:48:23 DEBUG juju.environs.simplestreams simplestreams.go:974 metadata: &{map[com.ubuntu.cloud:server:12.04:amd64:{ 12.04 amd64   map[20132912:0xc200492a20]}] map[] Sun, 29 Dec 2013 22:52:21 +0200 products:1.0 com.ubuntu.cloud:custom}
2013-12-31 17:48:24 DEBUG juju.provider.openstack provider.go:705 openstack user data; 525 bytes
2013-12-31 17:48:27 INFO juju.provider.openstack provider.go:752 started instance "f259497c-5c4f-49c1-980b-d74d73159f83"
 - f259497c-5c4f-49c1-980b-d74d73159f83
Waiting for address
Attempting to connect to 213.187.240.25:22
Attempting to connect to 185.21.189.219:22
Attempting to connect to 185.21.188.115:22
[email protected]'s password: 2013-12-31 17:58:28 ERROR juju.provider.common bootstrap.go:85 bootstrap failed: waited for 10m0s without being able to connect
Stopping instance...
2013-12-31 17:58:28 DEBUG juju.provider.openstack provider.go:775 terminating instances [f259497c-5c4f-49c1-980b-d74d73159f83]
2013-12-31 17:58:29 ERROR juju.cmd supercommand.go:294 waited for 10m0s without being able to connect

在这 10 分钟内,我可以从他们的用户界面验证机器是否运行正常。出于某种原因,它无法使用我假设在机器创建期间上传的 SSH 密钥登录。

有什么想法可以调试这个吗?运行 Juju 1.17.0。

答案1

Juju 1.17.0 有一个新的引导机制,这可能是原因所在。我能想到几个可能的答案:

  1. 您的 SSH 密钥有问题。这似乎不太可能,但现在 bootstrap 的工作方式是将您的公钥添加到新启动的机器的 ~ubuntu/.ssh/authorized_keys 中。因此,登录应该不需要密码。
  2. cloud-init 脚本没有正确初始化 authorized_keys。这似乎也不太可能。
  3. 该 IP 地址可路由,但不适用于正确的机器。

在您提供的日志中,有三个 IP:根据 CloudVPS,哪个是公共 IP?在尝试引导时,您可以尝试同时以用户身份 ssh 到每个 IP ubuntu(ssh ubuntu@ip)。如果它们都不起作用,那么我建议记录 Juju 的错误;如果其中一个起作用,那么我认为这将建议上面的第 3 点。

答案2

这些问题与 CloudVPS Compute 测试版有关,平台公开时应该会修复。

相关内容