sync-tools requires aws credentials be set in the (shell) environment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Fix Released
|
Critical
|
Frank Mueller |
Bug Description
I was setting up a environment that had MAAS as its provider. bootstrap said this:
$ juju -v bootstrap
2013/04/25 21:32:12 INFO environs: reading tools with major version 1
2013/04/25 21:32:12 INFO environs: falling back to public bucket
2013/04/25 21:32:12 ERROR command failed: no tools available
error: no tools available
A hint on IRC got me to try sync-tools:
$ juju -v sync-tools
2013/04/25 21:46:20 INFO environs/ec2: opening environment "juju-public"
2013/04/25 21:46:20 ERROR failed to initialize the official bucket environment
2013/04/25 21:46:20 ERROR command failed: environment has no access-key or secret-key
error: environment has no access-key or secret-key
Setting AWS_ACCESS_KEY_ID and AWS_SECRET_
Related branches
- Juju Engineering: Pending requested
-
Diff: 326 lines (+229/-28)2 files modifiedcmd/juju/synctools.go (+102/-6)
cmd/juju/synctools_test.go (+127/-22)
Changed in juju-core: | |
importance: | Undecided → High |
status: | New → Confirmed |
tags: | added: canonical-webops-juju |
Changed in juju-core: | |
status: | Triaged → In Progress |
Changed in juju-core: | |
status: | In Progress → Fix Committed |
Changed in juju-core: | |
milestone: | none → 1.11.1 |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
Chasing through the code a little (and I'm not a go programmer at all, but this seems fairly clear):
cmd/juju/ synctools. go:officialBuck etAttrs does not have an access-key or secret-key set synctools. go:Run calls environs. NewFromAttrs( officialBucketA ttrs) open.go: NewFromAttrs: calls cNew config. go:New calls Open on an ec2.environProvider ec2/ec2. go:Open calls SetConfig on an environ ttrs), the only way this can pass is if the environment has the keys.
cmd/juju/
environs/
environs/
environs/
SetConfig calls newConfig
newConfig calls Validate
Validate complains if the passed in config _and_ the environment do not have an access key and a secret key -- and as the passed in config does not (it is made from officialBucketA
I'd guess there needs to be some way to tell Validate that not having the keys is ok, but I'll leave that sort of thing to someone who understands the architecture :)