Cannot boostrap from custom image-metadata-url or by specifying metadata-source
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | juju-core |
High
|
Ian Booth | ||
| | 1.24 |
High
|
Ian Booth | ||
Bug Description
[Environment]
Trusty 14.04.2
Juju core 1.23
[Reproduction]
This are the steps that I followed:
1) juju metadata generate-image -d simplestreams -i b6a1f124-
2) Upload the generated index to switft
swift post simplestreams
cd ~/simplestreams
swift upload simplestreams *
swift post simplestreams --read-acl .r:*
3) Just to make sure , I edited ~/.juju/
image-
ssl-
4) juju bootstrap -e openstack -v --metadata-source ~/simplestreams --series utopic --upload-tools
Then the bootstrap process fails with:
2015-05-06 19:01:13 INFO juju.mongo open.go:125 dialled mongo successfully on address "127.0.0.1:37017"
2015-05-06 19:01:13 INFO juju.replicaset replicaset.go:73 Initiating replicaset with config replicaset.
2015-05-06 19:01:13 WARNING juju.replicaset replicaset.go:93 Initiate: fetching replication status failed: cannot get replica set status: Received replSetInitiate - should come online shortly.
2015-05-06 19:01:13 WARNING juju.replicaset replicaset.go:93 Initiate: fetching replication status failed: cannot get replica set status: Received replSetInitiate - should come online shortly.
2015-05-06 19:01:14 WARNING juju.replicaset replicaset.go:93 Initiate: fetching replication status failed: cannot get replica set status: Received replSetInitiate - should come online shortly.
2015-05-06 19:01:14 WARNING juju.replicaset replicaset.go:93 Initiate: fetching replication status failed: cannot get replica set status: Received replSetInitiate - should come online shortly.
2015-05-06 19:01:15 WARNING juju.replicaset replicaset.go:93 Initiate: fetching replication status failed: cannot get replica set status: Received replSetInitiate - should come online shortly.
2015-05-06 19:01:15 WARNING juju.replicaset replicaset.go:93 Initiate: fetching replication status failed: cannot get replica set status: Received replSetInitiate - should come online shortly.
2015-05-06 19:01:16 WARNING juju.replicaset replicaset.go:93 Initiate: fetching replication status failed: cannot get replica set status: Received replSetInitiate - should come online shortly.
2015-05-06 19:01:16 WARNING juju.replicaset replicaset.go:93 Initiate: fetching replication status failed: cannot get replica set status: Received replSetInitiate - should come online shortly.
2015-05-06 19:01:17 WARNING juju.replicaset replicaset.go:93 Initiate: fetching replication status failed: cannot get replica set status: Received replSetInitiate - should come online shortly.
2015-05-06 19:01:17 INFO juju.mongo open.go:125 dialled mongo successfully on address "127.0.0.1:37017"
2015-05-06 19:01:17 WARNING juju.replicaset replicaset.go:93 Initiate: fetching replication status failed: cannot get replica set status: Received replSetInitiate - should come online shortly.
2015-05-06 19:01:18 WARNING juju.replicaset replicaset.go:93 Initiate: fetching replication status failed: cannot get replica set status: Received replSetInitiate - should come online shortly.
2015-05-06 19:01:18 WARNING juju.replicaset replicaset.go:93 Initiate: fetching replication status failed: cannot get replica set status: Received replSetInitiate - should come online shortly.
2015-05-06 19:01:19 WARNING juju.replicaset replicaset.go:93 Initiate: fetching replication status failed: cannot get replica set status: Received replSetInitiate - should come online shortly.
2015-05-06 19:01:19 WARNING juju.replicaset replicaset.go:93 Initiate: fetching replication status failed: cannot get replica set status: Received replSetInitiate - should come online shortly.
2015-05-06 19:01:20 WARNING juju.replicaset replicaset.go:93 Initiate: fetching replication status failed: cannot get replica set status: Received replSetInitiate - should come online shortly.
2015-05-06 19:01:20 WARNING juju.replicaset replicaset.go:93 Initiate: fetching replication status failed: cannot get replica set status: Received replSetInitiate - should come online shortly.
2015-05-06 19:01:21 WARNING juju.replicaset replicaset.go:93 Initiate: fetching replication status failed: cannot get replica set status: Received replSetInitiate - should come online shortly.
2015-05-06 19:01:21 WARNING juju.replicaset replicaset.go:93 Initiate: fetching replication status failed: cannot get replica set status: Received replSetInitiate - should come online shortly.
2015-05-06 19:01:22 WARNING juju.replicaset replicaset.go:93 Initiate: fetching replication status failed: cannot get replica set status: Received replSetInitiate - should come online shortly.
2015-05-06 19:01:22 WARNING juju.replicaset replicaset.go:93 Initiate: fetching replication status failed: cannot get replica set status: Received replSetInitiate - should come online shortly.
2015-05-06 19:01:23 INFO juju.worker.
2015-05-06 19:01:23 INFO juju.worker.
2015-05-06 19:01:23 INFO juju.cmd.jujud bootstrap.go:179 started mongo
2015-05-06 19:01:23 INFO juju.mongo open.go:125 dialled mongo successfully on address "127.0.0.1:37017"
2015-05-06 19:01:25 INFO juju.state open.go:46 opening state, mongo addresses: ["127.0.
2015-05-06 19:01:25 INFO juju.mongo open.go:125 dialled mongo successfully on address "127.0.0.1:37017"
2015-05-06 19:01:25 INFO juju.mongo open.go:125 dialled mongo successfully on address "127.0.0.1:37017"
2015-05-06 19:01:25 INFO juju.state open.go:83 initializing environment, owner: "admin@local"
2015-05-06 19:01:25 INFO juju.state open.go:84 info: &mongo.
2015-05-06 19:01:25 INFO juju.provider.
2015-05-06 19:01:25 INFO juju.utils http.go:67 hostname SSL verification disabled
2015-05-06 19:01:25 INFO juju.utils http.go:67 hostname SSL verification disabled
2015-05-06 19:01:25 INFO juju.utils http.go:67 hostname SSL verification disabled
2015-05-06 19:01:25 INFO juju.utils http.go:67 hostname SSL verification disabled
2015-05-06 19:01:25 INFO juju.utils http.go:67 hostname SSL verification disabled
2015-05-06 19:01:25 INFO juju.utils http.go:67 hostname SSL verification disabled
2015-05-06 19:01:25 INFO juju.utils http.go:67 hostname SSL verification disabled
2015-05-06 19:01:25 INFO juju.utils http.go:67 hostname SSL verification disabled
2015-05-06 19:01:25 INFO juju.utils http.go:60 hostname SSL verification enabled
2015-05-06 19:01:25 INFO juju.utils http.go:60 hostname SSL verification enabled
2015-05-06 19:01:26 INFO juju.utils http.go:60 hostname SSL verification enabled
2015-05-06 19:01:26 INFO juju.utils http.go:60 hostname SSL verification enabled
2015-05-06 19:01:26 INFO juju.utils http.go:60 hostname SSL verification enabled
2015-05-06 19:01:26 INFO juju.utils http.go:60 hostname SSL verification enabled
2015-05-06 19:01:26 ERROR juju.cmd supercommand.go:430 cannot set initial environ constraints: index file has no data for cloud {ctsstack http://
ERROR failed to bootstrap environment: subprocess encountered error code 1
The index file:
{
"index": {
{
}
],
"path": "streams/
]
}
},
"updated": "Wed, 06 May 2015 18:48:34 +0000",
"format": "index:1.0"
}
The generated imagemetadata
images/
{
"products": {
"arch": "amd64",
}
}
}
},
"updated": "Wed, 06 May 2015 18:48:34 +0000",
"format": "products:1.0",
"content_id": "com.ubuntu.
}
| tags: | added: sts |
| description: | updated |
| Curtis Hovey (sinzui) wrote : | #1 |
| Changed in juju-core: | |
| status: | New → Triaged |
| importance: | Undecided → Critical |
| milestone: | none → 1.25.0 |
| Curtis Hovey (sinzui) wrote : | #2 |
Give the need for this to be solved by tomorrow. We need to explain where documentation is wrong or incomplete, or provide a work around.
| Martin Packman (gz) wrote : | #4 |
It looks like --metadata-source is unhappy, from the longer log it's (unsurprisingly) correctly used from your machine, but when the state server tries to open the environment, it checks for images using only "keystone catalog" and "default cloud images" obviously neither of which works.
What you can probably do is just *not* pass --metadata-source but instead use the image-metadata-url config, which in you example should be "http://
Last resort is add the swift location as a new endpoint named 'product-streams' in keystone, that always gets queried. Requires some poking of your keystone configuration though, and I can't find simple instructions for doing that.
| Jorge Niedbalski (niedbalski) wrote : | #5 |
This is a clean bootstrap, setting up image-metadata-url http://
| Jorge Niedbalski (niedbalski) wrote : | #6 |
OK, i was able to successfully bootstrap without using the --metadata-source option , which is broken.
The trick is to set image-metadata-url to include "/images" , as @gz mentioned
http://
ubuntu@
environment: teuto
machines:
"0":
agent-state: started
agent-version: 1.23.2.1
dns-name: 10.5.1.53
instance-id: 8a523624-
instance-state: ACTIVE
series: utopic
hardware: arch=amd64 cpu-cores=1 mem=1024M root-disk=20480M availability-
state-
services: {}
The log for this: http://
| Changed in juju-core: | |
| importance: | Critical → High |
| Ian Booth (wallyworld) wrote : | #7 |
In looking at the code, there's a couple of observations:
1. metadata source precedence
- environment sources like keystone are registered in init() functions and then later when bootstrap is used with --metadata-source, that is registered. This means that the keystone source is used in preference to --metadata-source which is wrong
2. As Martin says, unlike tools metadata, image metadata is not written into the state database, so is not available to machine agents. In the case referred to in this bug, the machine agent attempts to set up a constraints validator which in turns requires a list of image metadata records to determine the allowed architectures.
| John A Meinel (jameinel) wrote : | #8 |
Does it matter that the metadata has a trailing slash: "endpoint": "http://
We've had problems with having/missing a trailing slash before, we might at least look into adding/removing one and seeing if it changes the lookup.
| Mark Ramm (mark-ramm) wrote : | #9 |
This is a blocker for an important demo/customer and so I am triaging it up in priority.
| Changed in juju-core: | |
| importance: | High → Critical |
| Ian Booth (wallyworld) wrote : | #10 |
@John, the trailing slash doesn't matter - the matching code knows how to deal with it either way
| Changed in juju-core: | |
| importance: | Critical → High |
| Andrew Love (andrew-love) wrote : | #11 |
This bug is affecting my deployment of juju charms on a private Openstack cloud. I was following:
https:/
The metadata-source parameter doesn't work as noted.
| Changed in juju-core: | |
| assignee: | nobody → Anastasia (anastasia-macmood) |
| status: | Triaged → In Progress |
| Ian Booth (wallyworld) wrote : | #12 |
Looks like a gh issue has been raised also https:/
| Changed in juju-core: | |
| status: | In Progress → Fix Committed |
| Changed in juju-core: | |
| status: | Fix Committed → In Progress |
| Changed in juju-core: | |
| assignee: | Anastasia (anastasia-macmood) → Ian Booth (wallyworld) |
| Changed in juju-core: | |
| status: | In Progress → Fix Committed |
| Firl (celpa-firl) wrote : | #14 |
I accidentally changed a status, however I just repeated all these steps with the latest compiled version.
http://
| Changed in juju-core: | |
| status: | Fix Committed → Fix Released |
| no longer affects: | juju-core (Ubuntu) |


This may be a duplicate of bug 1435644. Maybe we can get more information about both the cloud and what juju is doing this time.