The maas lab cannot bootstrap juju. To debug the issue and try extending the timeout, Diogo pulled tip, to run juju locally. Using a created by CI, Diogo generated simple streams metadata to use with his cloud. Bootstrap fails after monodb-server is installed. Diogo attached gdp to the process to prevent the machine from being torndown so that he could read what was happening. It looks like the tools cannot be found.
http://pastebin.ubuntu.com/6799799/
Though when tries:
juju bootstrap --debug --metadata-source=/root/juju-simplestreams
or
juju bootstrap --debug --upload-tools --metadata-source=/root/juju-simplestreams
This is the content of juju-simplestreams/tools/streams/v1/com.ubuntu.juju:released:tools.json
http://pastebin.ubuntu.com/6799401/
I got more info about this bug:
Today I actually read the documentation in juju-core/ doc/simplestrea ms-metadata. txt and there it explains that the --metadata-source option needs a local directory that's accessible by the nodes. The current help for --metadata-source says:
--metadata-source (= "")
local path to use as tools and/or metadata source
Private clouds may need to specify their own custom image metadata, and possibly upload
Juju tools to cloud storage if no outgoing Internet access is available. In this case,
use the --metadata-source paramater to tell bootstrap a local directory from which to
upload tools and/or image metadata.
So I just assume that juju would make some kind of magic to make the local directory file accessible to the bootstrapped node. So at a minimum this bug is about improve that documentation, but this is not the extra info I want to add. metadata. txt, I set up a local webserver to serve the metadata files to juju.
Following the instruction in simplestreams-
Created the metadata directory under /var/www/ juju-metadata precise- amd64.tgz tarball from http:// juju-dist. s3.amazonaws. com
Copied the 1.17.1-
Generated the metadata using metadata generate-tools option
$ wget -c http:// juju-dist. s3.amazonaws. com/testing/ tools/releases/ juju-1. 17.1-precise- amd64.tgz juju-1. 17.1-precise- amd64.tgz d1e5f9fa356825c 91ce9bbfce92b41 42e44827f32d828 9753 tools/releases/ juju-1. 17.1-precise- amd64.tgz juju-metadata tools/streams/ v1/com. ubuntu. juju\:released\ :tools. json
"com.ubuntu. juju:12. 04:amd64" : {
"version" : "1.17.1",
"versions" : {
"20142301" : {
" items": {
"1.17. 1-precise- amd64": {
"release" : "precise",
"version" : "1.17.1",
"arch": "amd64",
"size": 19,
"path": "releases/ juju-1. 17.1-precise- amd64.tgz" ,
"ftype" : "tar.gz",
"sha256" : "b16e15764b8bc0 6c5c3f9f19bc8b9 9fa48e7894aa5a6 ccdad65da49bbf5 64793"
}
}
$ sha256sum tools/releases/
3c3c04ec40c2f52
I used sudo so juju would have permission to write to /var/www/
$ sudo juju --debug metadata generate-tools -d juju-metadata
$ juju --version
1.16.5-trusty-amd64
$ sudo cat juju-metadata/
{
"products": {
"arch": "amd64",
}
}
}
},
"updated": "Thu, 23 Jan 2014 13:01:51 -0500",
"format": "products:1.0"
Notice how the sha256 differ but I continued anyway. juju:released: tools.json so they will be accessible through the webserver tools/streams/ v1/*
Changed the permission of the generated index.json and com.ubuntu.
$ sudo chmod 644 juju-metadata/
I logged into the Trusty VM where I tried to bootstrap MAAS: 10.98.3. 20/juju- metadata/ tools
# juju bootstrap --debug --metadata-source=http://
and got this failure in the node's /var/log/ cloud-init- output. log
...
Adding new user `mongodb' (UID 107) with group `nogroup' ...
Not creating home directory `/home/mongodb'.
Adding group `mongodb' (GID 114) ...
Done.
Adding...