webentwicklung-frage-antwort-db.com.de

juju bootstrap auf einer privaten Openstack-Cloud schlägt fehl

Ich habe die Anweisungen zur Verwendung von Juju mit einer privaten Openstack-Cloud befolgt https://jujucharms.com/docs/2.0/howto-privatecloud Mein Juju-Client ist ein Ubuntu-VM in derselben Openstack-Cloud. Nachdem Sie alle Anweisungen auf Befehl befolgt haben

juju bootstrap igestack osicontroller --config network=024dbb2d-fb3e-43d2-8b0f-b93fe6162516 --config image-metadata-url=http://192.168.170.45:80/Swift/v1/simplestreams/images
--debug --show-log

Ich bekomme:

08:48:46 INFO  juju.cmd supercommand.go:63 running juju [2.0.1 gc go1.6.2]
08:48:46 DEBUG juju.cmd supercommand.go:64   args: []string{"juju", "bootstrap", "igestack", "--config", "network=024dbb2d-fb3e-43d2-8b0f-b93fe6162516", "--config", "image-metadata-url=http://192.168.170.45:80/Swift/v1/simplestreams/images", "--debug", "--show-log"}
08:48:46 DEBUG juju.cmd.juju.commands bootstrap.go:834 provider attrs: map[use-floating-ip:false use-default-secgroup:false network:024dbb2d-fb3e-43d2-8b0f-b93fe6162516]
08:48:49 INFO  cmd cmd.go:141 Adding contents of "/home/ubuntu/.local/share/juju/ssh/juju_id_rsa.pub" to authorized-keys
08:48:49 DEBUG juju.cmd.juju.commands bootstrap.go:890 preparing controller with config: map[apt-http-proxy: use-default-secgroup:false agent-stream:released name:controller http-proxy: disable-network-management:false default-series:xenial ftp-proxy: https-proxy: apt-https-proxy: image-metadata-url:http://192.168.170.45:80/Swift/v1/simplestreams/images test-mode:false uuid:cdf7e9d1-4daa-4c83-8262-4d7c915c743a agent-metadata-url: automatically-retry-hooks:true apt-ftp-proxy: transmit-vendor-metrics:true use-floating-ip:false apt-mirror: proxy-ssh:false enable-os-refresh-update:true ssl-hostname-verification:true network:024dbb2d-fb3e-43d2-8b0f-b93fe6162516 development:false no-proxy: resource-tags: logforward-enabled:false authorized-keys:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDdZduAUdZEh4Yv+JSXD9mMsVDdXCDJFFMNq3/7nfmFYctu0731ffXtqdae7jSycfJ5aD/n8JaE5WZ9PWraps3cQjg0T4nLBkhVBl8u2e/VKubCDQR2OYl/w6GCpVzSSctgwAmXeKkBinv1Mmur+sTTe9C8kSu/WxFd5MbgyU6Qs5j1oHoxjWB6v5z99g8m/CzNarHvYRGGVxAihhBwatb4IjW0/e3zpthL9CKjxvcN3tu5TEbk8pkQVVO+kQSrCovJ+vT4k3awfrNEt9hW6pYBM2rnCBgmARbhvoTvhEsUVokIrtZzGTepozZ/h3e2fdO0kS91VIyB9otHgwTJSHhl juju-client-key
 image-stream:released logging-config: type:openstack enable-os-upgrade:true ignore-machine-addresses:false provisioner-harvest-mode:destroyed firewall-mode:instance]
08:48:49 INFO  juju.provider.openstack provider.go:76 opening model "controller"
08:48:49 INFO  cmd cmd.go:129 Creating Juju controller "igestack-RegionOne" on igestack/RegionOne
08:48:50 INFO  juju.cmd.juju.commands bootstrap.go:507 combined bootstrap constraints: 
08:48:50 DEBUG juju.environs.bootstrap bootstrap.go:185 model "controller" supports service/machine networks: false
08:48:50 DEBUG juju.environs.bootstrap bootstrap.go:187 network management by juju enabled: true
08:48:50 INFO  cmd cmd.go:141 Loading image metadata
08:48:50 DEBUG juju.environs imagemetadata.go:112 obtained image datasource "image-metadata-url"
08:48:50 DEBUG juju.environs imagemetadata.go:112 obtained image datasource "keystone catalog"
08:48:50 DEBUG juju.environs imagemetadata.go:112 obtained image datasource "default cloud images"
08:48:50 DEBUG juju.environs imagemetadata.go:112 obtained image datasource "default ubuntu cloud images"
08:48:50 DEBUG juju.environs.bootstrap bootstrap.go:557 constraints for image metadata lookup &{{{RegionOne http://192.168.170.46:5000/v2.0/} [win2012hvr2 win2012r2 win81 win10 genericlinux raring utopic xenial yakkety win2016nano win8 saucy trusty win2012 vivid wily win7 win2012hv win2016 centos7 zesty precise quantal win2008r2] [AMD64 i386 armhf arm64 ppc64el s390x] released}}
08:48:50 DEBUG juju.environs.bootstrap bootstrap.go:569 found 1 image metadata in image-metadata-url
08:48:50 DEBUG juju.environs.bootstrap bootstrap.go:569 found 1 image metadata in keystone catalog
08:48:51 DEBUG juju.environs.bootstrap bootstrap.go:569 found 0 image metadata in default cloud images
08:48:51 DEBUG juju.environs.simplestreams simplestreams.go:454 skipping index "http://cloud-images.ubuntu.com/releases/streams/v1/index.sjson" because of missing information: index file has no data for cloud {RegionOne http://192.168.170.46:5000/v2.0/} not found
08:48:51 DEBUG juju.environs.bootstrap bootstrap.go:565 ignoring image metadata in default ubuntu cloud images: index file has no data for cloud {RegionOne http://192.168.170.46:5000/v2.0/} not found
08:48:51 DEBUG juju.environs.bootstrap bootstrap.go:573 found 2 image metadata from all image data sources
08:48:52 INFO  cmd cmd.go:129 Looking for packaged Juju agent version 2.0.1 for AMD64
08:48:52 INFO  juju.environs.bootstrap tools.go:72 looking for bootstrap agent binaries: version=2.0.1
08:48:52 INFO  juju.environs.tools tools.go:101 finding agent binaries in stream "released"
08:48:52 INFO  juju.environs.tools tools.go:103 reading agent binaries with major.minor version 2.0
08:48:52 INFO  juju.environs.tools tools.go:111 filtering agent binaries by version: 2.0.1
08:48:52 INFO  juju.environs.tools tools.go:117 filtering agent binaries by architecture: AMD64
08:48:52 DEBUG juju.environs.tools urls.go:109 trying datasource "keystone catalog"
08:48:52 DEBUG juju.environs.simplestreams simplestreams.go:680 using default candidate for content id "com.ubuntu.juju:released:tools" are {20161007 mirrors:1.0 content-download streams/v1/cpc-mirrors.sjson []}
08:48:53 INFO  juju.environs.bootstrap tools.go:74 found 16 packaged agent binaries
08:48:53 INFO  cmd cmd.go:141 Starting new instance for initial controller
Launching controller instance(s) on igestack/RegionOne...
08:48:54 INFO  juju.provider.common destroy.go:20 destroying model "controller"
08:48:54 INFO  juju.provider.common destroy.go:31 destroying instances
08:48:54 ERROR juju.cmd.juju.commands bootstrap.go:1021 error cleaning up: destroying controller model: destroying instances: failed to get list of server details
caused by: failed unmarshaling the response body: {"servers": [{"OS-EXT-STS:task_state": null, "addresses": {"internal": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:8c:b1", "version": 4, "addr": "10.5.5.9", "OS-EXT-IPS:type": "fixed"}, {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:8c:b1", "version": 4, "addr": "192.107.88.60", "OS-EXT-IPS:type": "floating"}]}, "links": [{"href": "http://192.168.170.40:8774/v2.1/769274dc9e79401c9f48a4efd982199a/servers/04b98237-c057-4072-bf9f-94155f1101f7", "rel": "self"}, {"href": "http://192.168.170.40:8774/769274dc9e79401c9f48a4efd982199a/servers/04b98237-c057-4072-bf9f-94155f1101f7", "rel": "bookmark"}], "image": "", "OS-EXT-STS:vm_state": "active", "OS-EXT-SRV-ATTR:instance_name": "instance-00000006", "OS-SRV-USG:launched_at": "2016-11-29T20:46:22.000000", "flavor": {"id": "9d4b661c-a2bb-442a-846d-06a1b6bc98e6", "links": [{"href": "http://192.168.170.40:8774/769274dc9e79401c9f48a4efd982199a/flavors/9d4b661c-a2bb-442a-846d-06a1b6bc98e6", "rel": "bookmark"}]}, "id": "04b98237-c057-4072-bf9f-94155f1101f7", "security_groups": [{"name": "default"}], "user_id": "ff5fd8ccec9841889e7f3f509dec9523", "OS-DCF:diskConfig": "AUTO", "accessIPv4": "", "accessIPv6": "", "progress": 0, "OS-EXT-STS:power_state": 1, "OS-EXT-AZ:availability_zone": "nova", "metadata": {}, "status": "ACTIVE", "updated": "2016-12-01T09:39:32Z", "hostId": "f18e0f79dd4f137d08eaa37b3afa107978419d1260b59f88ab17a7b9", "OS-EXT-SRV-ATTR:Host": "osigest1x12", "OS-SRV-USG:terminated_at": null, "key_name": "mykey", "OS-EXT-SRV-ATTR:hypervisor_hostname": "osigest1x12.maas", "name": "juju-master", "created": "2016-11-29T20:44:30Z", "tenant_id": "769274dc9e79401c9f48a4efd982199a", "os-extended-volumes:volumes_attached": [{"id": "2fc47f2d-3bad-4a2f-bb06-aa37773ca83c"}], "config_drive": ""}]}
caused by: json: cannot unmarshal string into Go value of type nova.jsonEntity
08:48:54 ERROR cmd supercommand.go:458 failed to bootstrap model: cannot start bootstrap instance: failed to get list of server details
caused by: failed unmarshaling the response body: {"servers": [{"OS-EXT-STS:task_state": null, "addresses": {"internal": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:8c:b1", "version": 4, "addr": "10.5.5.9", "OS-EXT-IPS:type": "fixed"}, {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:8c:b1", "version": 4, "addr": "192.107.88.60", "OS-EXT-IPS:type": "floating"}]}, "links": [{"href": "http://192.168.170.40:8774/v2.1/769274dc9e79401c9f48a4efd982199a/servers/04b98237-c057-4072-bf9f-94155f1101f7", "rel": "self"}, {"href": "http://192.168.170.40:8774/769274dc9e79401c9f48a4efd982199a/servers/04b98237-c057-4072-bf9f-94155f1101f7", "rel": "bookmark"}], "image": "", "OS-EXT-STS:vm_state": "active", "OS-EXT-SRV-ATTR:instance_name": "instance-00000006", "OS-SRV-USG:launched_at": "2016-11-29T20:46:22.000000", "flavor": {"id": "9d4b661c-a2bb-442a-846d-06a1b6bc98e6", "links": [{"href": "http://192.168.170.40:8774/769274dc9e79401c9f48a4efd982199a/flavors/9d4b661c-a2bb-442a-846d-06a1b6bc98e6", "rel": "bookmark"}]}, "id": "04b98237-c057-4072-bf9f-94155f1101f7", "security_groups": [{"name": "default"}], "user_id": "ff5fd8ccec9841889e7f3f509dec9523", "OS-DCF:diskConfig": "AUTO", "accessIPv4": "", "accessIPv6": "", "progress": 0, "OS-EXT-STS:power_state": 1, "OS-EXT-AZ:availability_zone": "nova", "metadata": {}, "status": "ACTIVE", "updated": "2016-12-01T09:39:32Z", "hostId": "f18e0f79dd4f137d08eaa37b3afa107978419d1260b59f88ab17a7b9", "OS-EXT-SRV-ATTR:Host": "osigest1x12", "OS-SRV-USG:terminated_at": null, "key_name": "mykey", "OS-EXT-SRV-ATTR:hypervisor_hostname": "osigest1x12.maas", "name": "juju-master", "created": "2016-11-29T20:44:30Z", "tenant_id": "769274dc9e79401c9f48a4efd982199a", "os-extended-volumes:volumes_attached": [{"id": "2fc47f2d-3bad-4a2f-bb06-aa37773ca83c"}], "config_drive": ""}]}
caused by: json: cannot unmarshal string into Go value of type nova.jsonEntity
08:48:54 DEBUG cmd supercommand.go:459 (error details: [{github.com/juju/juju/cmd/juju/commands/bootstrap.go:556: failed to bootstrap model} {github.com/juju/juju/provider/common/bootstrap.go:47: } {github.com/juju/juju/provider/common/bootstrap.go:178: cannot start bootstrap instance} {failed to get list of server details
caused by: failed unmarshaling the response body: {"servers": [{"OS-EXT-STS:task_state": null, "addresses": {"internal": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:8c:b1", "version": 4, "addr": "10.5.5.9", "OS-EXT-IPS:type": "fixed"}, {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:8c:b1", "version": 4, "addr": "192.107.88.60", "OS-EXT-IPS:type": "floating"}]}, "links": [{"href": "http://192.168.170.40:8774/v2.1/769274dc9e79401c9f48a4efd982199a/servers/04b98237-c057-4072-bf9f-94155f1101f7", "rel": "self"}, {"href": "http://192.168.170.40:8774/769274dc9e79401c9f48a4efd982199a/servers/04b98237-c057-4072-bf9f-94155f1101f7", "rel": "bookmark"}], "image": "", "OS-EXT-STS:vm_state": "active", "OS-EXT-SRV-ATTR:instance_name": "instance-00000006", "OS-SRV-USG:launched_at": "2016-11-29T20:46:22.000000", "flavor": {"id": "9d4b661c-a2bb-442a-846d-06a1b6bc98e6", "links": [{"href": "http://192.168.170.40:8774/769274dc9e79401c9f48a4efd982199a/flavors/9d4b661c-a2bb-442a-846d-06a1b6bc98e6", "rel": "bookmark"}]}, "id": "04b98237-c057-4072-bf9f-94155f1101f7", "security_groups": [{"name": "default"}], "user_id": "ff5fd8ccec9841889e7f3f509dec9523", "OS-DCF:diskConfig": "AUTO", "accessIPv4": "", "accessIPv6": "", "progress": 0, "OS-EXT-STS:power_state": 1, "OS-EXT-AZ:availability_zone": "nova", "metadata": {}, "status": "ACTIVE", "updated": "2016-12-01T09:39:32Z", "hostId": "f18e0f79dd4f137d08eaa37b3afa107978419d1260b59f88ab17a7b9", "OS-EXT-SRV-ATTR:Host": "osigest1x12", "OS-SRV-USG:terminated_at": null, "key_name": "mykey", "OS-EXT-SRV-ATTR:hypervisor_hostname": "osigest1x12.maas", "name": "juju-master", "created": "2016-11-29T20:44:30Z", "tenant_id": "769274dc9e79401c9f48a4efd982199a", "os-extended-volumes:volumes_attached": [{"id": "2fc47f2d-3bad-4a2f-bb06-aa37773ca83c"}], "config_drive": ""}]}
caused by: json: cannot unmarshal string into Go value of type nova.jsonEntity}])

Könnten Sie mir bitte mitteilen, was nicht stimmt? Vielen Dank!

Dies ist der Inhalt von http://192.168.170.45/Swift/v1/simplestreams/images/streams/v1/index.json :

{
    "index": {
        "com.ubuntu.cloud:custom": {
            "updated": "Mon, 12 Dec 2016 13:20:14 +0000",
            "format": "products:1.0",
            "datatype": "image-ids",
            "cloudname": "custom",
            "clouds": [
                {
                    "region": "RegionOne",
                    "endpoint": "http://192.168.170.46:5000/v2.0/"
                }
            ],
            "path": "streams/v1/com.ubuntu.cloud-released-imagemetadata.json",
            "products": [
                "com.ubuntu.cloud:server:16.04:AMD64"
            ]
        }
    },
    "updated": "Mon, 12 Dec 2016 13:20:14 +0000",
    "format": "index:1.0"
}
3
Angelinux

Das Problem wurde gelöst, indem ein neuer Juju-Client erstellt und dann die Anweisungen wörtlich befolgt wurden.

Es ist nicht nötig, eine benutzerdefinierte Wolke in juju zu erstellen, es ist so einfach wie das Starten

juju bootstrap openstack

wie in der juju charms Dokumentation hier geschrieben

3
Angelinux