Skip to content

Instantly share code, notes, and snippets.

@xarses
Last active September 1, 2017 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xarses/307a07d290fcc9f48008b3ae1d192f05 to your computer and use it in GitHub Desktop.
Save xarses/307a07d290fcc9f48008b3ae1d192f05 to your computer and use it in GitHub Desktop.
juju bootstrap
ERROR fetching hosted model spaces: adding subnet "10.10.0.0/26": subnet "10.10.0.0/26" already exists
2017-09-01 17:52:37 DEBUG cmd supercommand.go:459 error stack:
github.com/juju/juju/state/subnets.go:222: subnet "10.10.0.0/26" already exists
github.com/juju/juju/state/subnets.go:235:
github.com/juju/juju/state/subnets.go:235: adding subnet "10.10.0.0/26"
github.com/juju/juju/state/spacesdiscovery.go:78:
github.com/juju/juju/state/spacesdiscovery.go:51:
github.com/juju/juju/agent/agentbootstrap/bootstrap.go:223: fetching hosted model spaces
github.com/juju/juju/cmd/jujud/agent/agent.go:102:
2017-09-01 17:52:37 DEBUG juju.cmd.jujud main.go:186 jujud complete, code 0, err <nil>
17:52:37 ERROR juju.cmd.juju.commands bootstrap.go:492 failed to bootstrap model: subprocess encountered error code 1
17:52:37 DEBUG juju.cmd.juju.commands bootstrap.go:493 (error details: [{github.com/juju/juju/cmd/juju/commands/bootstrap.go:584: failed to bootstrap model}
{subprocess encountered error code 1}])
juju -v --debug bootstrap --config image-metadata-url=http://$HOSTNAME:8000/images --config network=private --to zone=nova openstack
20:14:02 INFO juju.cmd supercommand.go:63 running juju [2.2.2 gc go1.8]
20:14:02 DEBUG juju.cmd supercommand.go:64 args: []string{"juju", "-v", "--debug", "bootstrap", "--config", "image-metadata-url=http://somelocalhost:8000/images", "--config", "network=private", "--config", "zone=az_10", "openstack"}
20:14:02 DEBUG juju.cmd.juju.commands bootstrap.go:803 authenticating with region "RegionOne" and credential "awoodward" ()
20:14:02 DEBUG juju.cmd.juju.commands bootstrap.go:915 provider attrs: map[use-floating-ip:false use-default-secgroup:false network:private external-network:]
20:14:02 INFO cmd authkeys.go:114 Adding contents of "/home/awoodward/.local/share/juju/ssh/juju_id_rsa.pub" to authorized-keys
20:14:02 DEBUG juju.cmd.juju.commands bootstrap.go:971 preparing controller with config: map[authorized-keys:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCmBI9w/uU746weSPZgXesjmOlS3LDMjaB5WEma0htTvQegHbngC2VucOTzPmFJctLR6rBEH3YFKFTrQ4okql4TcsLpD/tzn9Q+htIoAexlVtC6x0xoCdX6pn0myV9/4iQXwwuytDuRA+Bu8lhMTyUh3KRcggRkImil/grDAQhLrfWQ4rrGhc8K6yupHFAMRrdLQl4KC4P35n5A+X7mY8U15o3XBLQEYRkz4FID/igNDS2VpBD3CAz7ULNeexqlyWPrcgSp+FSGBSSLqIOngdh702KHBq69dLZhkCeF3QeQpHQBNffyBnbP0U3uo2A6m8/JNmJpSTvMySROQ0ye/QAh juju-client-key
resource-tags: net-bond-reconfigure-delay:17 name:controller image-metadata-url:http://somelocalhost:8000/images logging-config: uuid:92e27438-2a41-485c-896a-35f719113011 agent-stream:released test-mode:false development:false enable-os-refresh-update:true max-status-history-size:5G default-series:xenial proxy-ssh:false apt-ftp-proxy: provisioner-harvest-mode:destroyed max-status-history-age:336h network:private update-status-hook-interval:5m disable-network-management:false apt-https-proxy: no-proxy:127.0.0.1,localhost,::1 https-proxy: use-floating-ip:false external-network: use-default-secgroup:false firewall-mode:instance zone:az_10 enable-os-upgrade:true image-stream:released type:openstack http-proxy: automatically-retry-hooks:true apt-no-proxy: agent-metadata-url: logforward-enabled:false ignore-machine-addresses:false ssl-hostname-verification:true transmit-vendor-metrics:true apt-mirror: ftp-proxy: apt-http-proxy:]20:14:02 INFO juju.provider.openstack provider.go:144 opening model "controller"
20:14:02 WARN juju.environs.config config.go:1160 unknown config field "zone"
20:14:02 DEBUG goose <autogenerated>:22 auth details: &{Token:6f731a0ad0a1480883f0da26384cb845 TenantId:3a81884bf92c478fbd11655b49636cec UserId:4fce151d4da95ef11e531297ee6d1df77e2b30b69134b37fed1f889dc55051b7 Domain: RegionServiceURLs:map[RegionOne:map[metering:http://openstack.domain.local:8777 network:http://openstack.domain.local:9696 cloudformation:http://openstack.domain.local:8000/v1 alarming:http://openstack.domain.local:8042 identity:http://openstack.domain.local:5000/v3 compute:http://openstack.domain.local:8774/v2/3a81884bf92c478fbd11655b49636cec image:http://openstack.domain.local:9292 orchestration:http://openstack.domain.local:8004/v1/3a81884bf92c478fbd11655b49636cec]]}
20:14:02 INFO cmd bootstrap.go:481 Creating Juju controller "openstack-RegionOne" on openstack/RegionOne
20:14:02 DEBUG goose <autogenerated>:22 performing API version discovery for "http://openstack.domain.local:8774/"
20:14:02 DEBUG goose <autogenerated>:22 discovered API versions: [{Version:{major:2 minor:0} Links:[{Href:http://openstack.domain.local:8774/v2/ Rel:self}] Status:SUPPORTED} {Version:{major:2 minor:1} Links:[{Href:http://openstack.domain.local:8774/v2.1/ Rel:self}] Status:CURRENT}]
20:14:03 INFO juju.cmd.juju.commands bootstrap.go:536 combined bootstrap constraints:
20:14:03 DEBUG juju.environs.bootstrap bootstrap.go:199 model "controller" supports service/machine networks: true
20:14:03 DEBUG juju.environs.bootstrap bootstrap.go:201 network management by juju enabled: true
20:14:03 INFO cmd bootstrap.go:233 Loading image metadata
20:14:03 DEBUG juju.environs imagemetadata.go:112 obtained image datasource "image-metadata-url"
20:14:03 DEBUG juju.environs imagemetadata.go:112 obtained image datasource "default cloud images"
20:14:03 DEBUG juju.environs imagemetadata.go:112 obtained image datasource "default ubuntu cloud images"
20:14:03 DEBUG juju.environs.bootstrap bootstrap.go:576 constraints for image metadata lookup &{{{RegionOne http://openstack.domain.local:5000/v3} [centos7 trusty win2008r2 win2012 win2016 win2012hvr2 win2012hv win2012r2 utopic win7 opensuseleap genericlinux win10 precise saucy win8 win81 raring vivid xenial zesty artful win2016nano quantal wily yakkety win2016hv] [amd64 i386 armhf arm64 ppc64el s390x] released}}
10.0.0.1 - - [31/Aug/2017 20:14:03] code 404, message File not found
10.0.0.1 - - [31/Aug/2017 20:14:03] "GET /images/streams/v1/index2.sjson HTTP/1.1" 404 -
10.0.0.1 - - [31/Aug/2017 20:14:03] code 404, message File not found
10.0.0.1 - - [31/Aug/2017 20:14:03] "GET /images/streams/v1/index.sjson HTTP/1.1" 404 -
10.0.0.1 - - [31/Aug/2017 20:14:03] code 404, message File not found
10.0.0.1 - - [31/Aug/2017 20:14:03] "GET /images/streams/v1/index2.json HTTP/1.1" 404 -
10.0.0.1 - - [31/Aug/2017 20:14:03] "GET /images/streams/v1/index.json HTTP/1.1" 200 -
10.0.0.1 - - [31/Aug/2017 20:14:03] code 404, message File not found
10.0.0.1 - - [31/Aug/2017 20:14:03] "GET /images/streams/v1/mirrors.json HTTP/1.1" 404 -
20:14:03 DEBUG juju.environs.simplestreams simplestreams.go:457 skipping index "http://somelocalhost:8000/images/streams/v1/index.json" because of missing information: index file has no data for cloud {RegionOne http://openstack.domain.local:5000/v3} not found
20:14:03 DEBUG juju.environs.bootstrap bootstrap.go:584 ignoring image metadata in image-metadata-url: index file has no data for cloud {RegionOne http://openstack.domain.local:5000/v3} not found
20:14:09 DEBUG juju.environs.bootstrap bootstrap.go:588 found 0 image metadata in default cloud images
20:14:17 DEBUG juju.environs.simplestreams simplestreams.go:457 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://openstack.domain.local:5000/v3} not found
20:14:17 DEBUG juju.environs.bootstrap bootstrap.go:584 ignoring image metadata in default ubuntu cloud images: index file has no data for cloud {RegionOne http://openstack.domain.local:5000/v3} not found
20:14:17 DEBUG juju.environs.bootstrap bootstrap.go:592 found 0 image metadata from all image data sources
20:14:17 ERROR juju.cmd.juju.commands bootstrap.go:492 failed to bootstrap model: no image metadata found
20:14:17 DEBUG juju.cmd.juju.commands bootstrap.go:493 (error details: [{github.com/juju/juju/cmd/juju/commands/bootstrap.go:584: failed to bootstrap model} {github.com/juju/juju/environs/bootstrap/bootstrap.go:241: } {github.com/juju/juju/environs/bootstrap/bootstrap.go:594: no image metadata found}])
20:14:17 DEBUG juju.cmd.juju.commands bootstrap.go:1078 cleaning up after failed bootstrap
20:14:17 INFO juju.provider.common destroy.go:20 destroying model "controller"
20:14:17 INFO juju.provider.common destroy.go:31 destroying instances
20:14:17 DEBUG juju.provider.openstack provider.go:1231 terminating instances []
20:14:17 DEBUG goose <autogenerated>:22 performing API version discovery for "http://openstack.domain.local:9696/"
20:14:17 DEBUG goose <autogenerated>:22 discovered API versions: [{Version:{major:2 minor:0} Links:[{Href:http://openstack.domain.local:9696/v2.0 Rel:self}] Status:CURRENT}]
20:14:17 INFO juju.provider.common destroy.go:51 destroying storage
20:14:17 DEBUG juju.provider.openstack cinder.go:503 endpoint "volumev2" not found for "RegionOne" region, trying "volume"
20:14:18 DEBUG juju.provider.openstack cinder.go:503 endpoint "volumev2" not found for "RegionOne" region, trying "volume"
20:14:18 INFO cmd supercommand.go:465 command finished
$ curl http://$HOSTNAME:8000/images/streams/v1/index.json
10.228.133.8 - - [31/Aug/2017 20:42:06] "GET /images/streams/v1/index.json HTTP/1.1" 200 -
{
"index": {
"com.ubuntu.cloud:custom": {
"updated": "Thu, 31 Aug 2017 20:34:59 +0000",
"format": "products:1.0",
"datatype": "image-ids",
"cloudname": "custom",
"clouds": [
{
"region": "RegionOne",
"endpoint": "http://openstack.domain.local:5000/v3"
}
],
"path": "streams/v1/com.ubuntu.cloud-released-imagemetadata.json",
"products": [
"com.ubuntu.cloud:server:16.04:amd64"
]
}
},
"updated": "Thu, 31 Aug 2017 20:34:59 +0000",
"format": "index:1.0"
}
$ juju metadata generate-image -d . -i cf5224bd-f192-4e7a-81ef-bc90fabdd7aa -s xenial -r $OS_REGION_NAME -u $OS_AUTH_URL
WARNING model could not be opened: No controllers registered.
Please either create a new controller using "juju bootstrap" or connect to
another controller that you have been given access to using "juju register".
Image metadata files have been written to:
/home/awoodward/sstream/images/streams/v1.
For Juju to use this metadata, the files need to be put into the
image metadata search path. There are 2 options:
1. Use the --metadata-source parameter when bootstrapping:
juju bootstrap --metadata-source /home/awoodward/sstream
2. Use image-metadata-url in $JUJU_DATA/environments.yaml
(if $JUJU_DATA is not set it will try $XDG_DATA_HOME/juju and
if not set either default to ~/.local/share/juju)
Configure a http server to serve the contents of
/home/awoodward/sstream
and set the value of image-metadata-url accordingly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment