I'm trying this with 1.19.2:
andreas@nsn7:~/.juju$ juju-metadata generate-image -a amd64 -r RegionOne -s precise -u http://10.96.3.104:5000/v2.0 -i 7f56f195-175c-4f8d-9236-6ad97a0075f5
image metadata files have been written to:
/home/andreas/.juju/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/andreas/.juju
2. Use image-metadata-url in $JUJU_HOME/environments.yaml
Configure a http server to serve the contents of
/home/andreas/.juju
and set the value of image-metadata-url accordingly.
"
andreas@nsn7:~/.juju$ juju bootstrap --metadata-source /home/andreas/.juju -v --upload-tools --debug
2014-05-19 21:16:45 INFO juju.cmd supercommand.go:301 running juju-1.19.2-trusty-amd64 [gc]
2014-05-19 21:16:45 WARNING juju.cmd.juju common.go:40 ignoring environments.yaml: using bootstrap config in file "/home/andreas/.juju/environments/scape1.jenv"
2014-05-19 21:16:45 DEBUG juju.environs open.go:86 ConfigForName found bootstrap config map[string]interface {}{"bootstrap-addresses-delay":10, "region":"RegionOne", "test-mode":false, "use-floating-ip":true, "auth-url":"http://10.96.3.104:5000/v2.0", "bootstrap-timeout":600, "control-bucket":"scape1-bucket-secret", "username":"andreas", "bootstrap-retry-delay":5, "image-metadata-url":"", "logging-config":"<root>=WARNING;unit=DEBUG", "network":"", "password":"secret", "access-key":"", "authorized-keys":"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDwpp05OOw8S703DwAsTLYddAhn+B9tu6M4m+43Ot4Vxg98Tm+JBva4WGxNq+bWjgbwrclcmW1lGFwe8ejgQc7a1teOCTbrHb0cdenyfoBhtElArMpFBiyn0cC0gJtpqmeC1ZUuDPjLsK/q3BGL8MYmHLVsJRTBt5P40Ed6PivUCMPFQ0+A5J9eXrieQuXjwJzICAmiGI9OzVFj7nlBCkHanf0ZguqZCAJ3t9yD6Dj2svrZd69D4TgEjmk7qxr6oa64Z1IG0En9amYGvhqvOSjyzkJtn7htdu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Aw\nHwYDVR0jBBgwFoAUV7+K1hm+pNQc8JfjYKR2ugOVRIAwCwYJKoZIhvcNAQEFA4GB\nACMsO4Ix5jmQJ4vp+BaeWI2xJ+GE1/zK3W0cpiYiNt0PrOtTOzXAmzBwpojm5h8W\nC6K4nMvMSzVvq+xKxqclP8KC1PfLITv5xcB6hcgZk/gn0kCaOQpgYqdtJz1OiT3k\n6aNOgIojZLvR5OWg9aDyJS2lWRiANvHtOZ7RFEnyOQ/z\n-----END CERTIFICATE-----\n", "default-series":"precise", "proxy-ssh":true, "tenant-name":"landscape", "ca-private-key":"-----BEGIN RSA PRIVATE KEY-----\nMIICXgIBAAKBgQDaqVUUEG86rZh9ekDR3fhnzNvknTYIZ4n0bG1PMogCJlFjVViV\nvwkPbfZAE8O/a7YNaU3g/zjAe1pP1aFG+meEpZPIK+sCuxRGXpd4ZFtCNCG7gizm\ny4J7Rt7iTgfjSisUWPPnBxXP7Zp1v9fc19phoq5WhN3E4vYbU9yqRWe0aQIDAQAB\nAoGBAMP1zz5dACHZI3kIUAEE6bK0wDhgv+TGTbcUWN4KDiPHDVd1TB9fhhIi3PZO\nADaTpCLexaGneMffhG9Zp+CBVrS8zL0adV3mpkVh1as16YkYWywpioWR9Ndo4KGA\nPZy0qEWZmc2rgv7P1a2PfilbtilYBilL9XIRPrr6iGWuvAzFAkEA7qkNkAdD+BtO\nCCG/IoKNR12EaFIa/gJzVVI2FoXJYJBJj7HEmXeki/iYuC5iS4wxOJIY6vmhCKC/\nZie6HPkjZwJBAOqMT5+j8xVeahzVScNmyHy6pClWkv96yTFE73oDTER6vc51/Aft\nIWIcDty/VXtvWZTpHswxGOe3Ljwsyv2b168CQGSjvShjJ/JT8U/UizkOPG0/rjof\nhWpftirghBZzTDwAHEUP/YuJvEWaCyx/wsuAzrDASumrYpC02IFHd2AIXzkCQQC0\nXh5FJ7Ehd6+maKcG6x22PVlMqNT2PphFmTuH2s1lw/X+tWCRP9vyNJ2BSGoWODTt\nfLBAWmlKl+WoRNH9YUDlAkEAl38jJRrWSGQMs5SNaD7v7242xavUdFH9u1csdJhP\n/50ScISY1FuRQb+E4DRiTeNDcNKpQSXsrxIg5Qmh2bHGjg==\n-----END RSA PRIVATE KEY-----\n", "charm-store-auth":"", "firewall-mode":"instance", "lxc-use-clone":false, "state-port":37017, "type":"openstack", "auth-mode":"userpass", "syslog-port":6514, "admin-secret":"scape1password", "development":false, "image-stream":"", "name":"scape1", "secret-key":"", "ssl-hostname-verification":true, "use-default-secgroup":false, "api-port":17070, "tools-metadata-url":"", "tools-url":""}
2014-05-19 21:16:45 DEBUG juju.environs.configstore disk.go:69 Making /home/andreas/.juju/environments
2014-05-19 21:16:45 INFO juju.environs open.go:177 environment info already exists; using New not Prepare
2014-05-19 21:16:45 INFO juju.provider.openstack provider.go:205 opening environment "scape1"
2014-05-19 21:16:46 DEBUG juju.environs.simplestreams simplestreams.go:388 fetchData failed for "http://10.96.3.107:8080/v1/AUTH_685bc0f7167d4602ad29385dd923440b/scape1-bucket-secret/images/streams/v1/index.sjson": failed to GET object images/streams/v1/index.sjson from container scape1-bucket-secret
caused by: Resource at http://10.96.3.107:8080/v1/AUTH_685bc0f7167d4602ad29385dd923440b/scape1-bucket-secret/images/streams/v1/index.sjson not found
caused by: request (http://10.96.3.107:8080/v1/AUTH_685bc0f7167d4602ad29385dd923440b/scape1-bucket-secret/images/streams/v1/index.sjson) returned unexpected status: 404; error info: <html><h1>Not Found</h1><p>The resource could not be found.</p></html>
2014-05-19 21:16:46 DEBUG juju.environs.simplestreams simplestreams.go:362 cannot load index "http://10.96.3.107:8080/v1/AUTH_685bc0f7167d4602ad29385dd923440b/scape1-bucket-secret/images/streams/v1/index.sjson": invalid URL "http://10.96.3.107:8080/v1/AUTH_685bc0f7167d4602ad29385dd923440b/scape1-bucket-secret/images/streams/v1/index.sjson" not found
2014-05-19 21:16:47 DEBUG juju.environs.simplestreams simplestreams.go:388 fetchData failed for "http://10.96.3.107:8080/v1/AUTH_685bc0f7167d4602ad29385dd923440b/scape1-bucket-secret/images/streams/v1/index.json": failed to GET object images/streams/v1/index.json from container scape1-bucket-secret
caused by: Resource at http://10.96.3.107:8080/v1/AUTH_685bc0f7167d4602ad29385dd923440b/scape1-bucket-secret/images/streams/v1/index.json not found
caused by: request (http://10.96.3.107:8080/v1/AUTH_685bc0f7167d4602ad29385dd923440b/scape1-bucket-secret/images/streams/v1/index.json) returned unexpected status: 404; error info: <html><h1>Not Found</h1><p>The resource could not be found.</p></html>
2014-05-19 21:16:47 DEBUG juju.environs.simplestreams simplestreams.go:362 cannot load index "http://10.96.3.107:8080/v1/AUTH_685bc0f7167d4602ad29385dd923440b/scape1-bucket-secret/images/streams/v1/index.json": invalid URL "http://10.96.3.107:8080/v1/AUTH_685bc0f7167d4602ad29385dd923440b/scape1-bucket-secret/images/streams/v1/index.json" not found
2014-05-19 21:16:47 INFO juju.utils http.go:56 hostname SSL verification enabled
2014-05-19 21:16:47 INFO juju.utils http.go:56 hostname SSL verification enabled
2014-05-19 21:16:48 DEBUG juju.environs.simplestreams simplestreams.go:388 fetchData failed for "http://cloud-images.ubuntu.com/releases/streams/v1/mirrors.sjson": cannot find URL "http://cloud-images.ubuntu.com/releases/streams/v1/mirrors.sjson" not found
2014-05-19 21:16:48 DEBUG juju.environs.simplestreams simplestreams.go:465 no mirror index file found
2014-05-19 21:16:48 DEBUG juju.environs.simplestreams simplestreams.go:366 read metadata index at "http://cloud-images.ubuntu.com/releases/streams/v1/index.sjson"
2014-05-19 21:16:48 DEBUG juju.environs.simplestreams simplestreams.go:370 skipping index because of error getting latest metadata "http://cloud-images.ubuntu.com/releases/streams/v1/index.sjson": index file has no data for cloud {RegionOne http://10.96.3.104:5000/v2.0} not found
2014-05-19 21:16:48 INFO juju.utils http.go:56 hostname SSL verification enabled
2014-05-19 21:16:48 INFO juju.utils http.go:56 hostname SSL verification enabled
2014-05-19 21:16:49 DEBUG juju.environs.simplestreams simplestreams.go:388 fetchData failed for "http://cloud-images.ubuntu.com/releases/streams/v1/mirrors.json": cannot find URL "http://cloud-images.ubuntu.com/releases/streams/v1/mirrors.json" not found
2014-05-19 21:16:49 DEBUG juju.environs.simplestreams simplestreams.go:465 no mirror index file found
2014-05-19 21:16:49 DEBUG juju.environs.simplestreams simplestreams.go:366 read metadata index at "http://cloud-images.ubuntu.com/releases/streams/v1/index.json"
2014-05-19 21:16:49 DEBUG juju.environs.simplestreams simplestreams.go:370 skipping index because of error getting latest metadata "http://cloud-images.ubuntu.com/releases/streams/v1/index.json": index file has no data for cloud {RegionOne http://10.96.3.104:5000/v2.0} not found
2014-05-19 21:16:49 ERROR juju.cmd supercommand.go:304 index file has no data for cloud {RegionOne http://10.96.3.104:5000/v2.0} not found
andreas@nsn7:~/.juju$
streams contents:
andreas@nsn7:~/.juju$ cat images/streams/v1/
com.ubuntu.cloud:released:imagemetadata.json index.json
andreas@nsn7:~/.juju$ cat images/streams/v1/index.json
{
"index": {
"com.ubuntu.cloud:custom": {
"updated": "Mon, 19 May 2014 18:16:42 -0300",
"format": "products:1.0",
"datatype": "image-ids",
"cloudname": "custom",
"clouds": [
{
"region": "RegionOne",
"endpoint": "http://10.96.3.104:5000/v2.0"
}
],
"path": "streams/v1/com.ubuntu.cloud:released:imagemetadata.json",
"products": [
"com.ubuntu.cloud:server:12.04:amd64"
]
}
},
"updated": "Mon, 19 May 2014 18:16:42 -0300",
"format": "index:1.0"
andreas@nsn7:~/.juju$ cat images/streams/v1/com.ubuntu.cloud\:released\:imagemetadata.json
{
"products": {
"com.ubuntu.cloud:server:12.04:amd64": {
"version": "12.04",
"arch": "amd64",
"versions": {
"20141905": {
"items": {
"7f56f195-175c-4f8d-9236-6ad97a0075f5": {
"id": "7f56f195-175c-4f8d-9236-6ad97a0075f5",
"region": "RegionOne",
"endpoint": "http://10.96.3.104:5000/v2.0"
}
}
}
}
}
},
"updated": "Mon, 19 May 2014 18:16:42 -0300",
"format": "products:1.0",
"content_id": "com.ubuntu.cloud:custom"
}andreas@nsn7:~/.juju$
The same exact set of commands worked with 1.18.3, and I can bootstrap 1.18.3 when using these metadata files produced by 1.19.2.
This looks like it's caused by the environment already existing and/or running. A destroy-environment would be required to delete the environment and remove any config. If the environment is not running, just remove the jenv file from ~/.juju/ environments. If juju sees this jenv file exists when bootstrapping, it will attempt to open the environment and will only look at existing metadata for tools/images.