agent bouncing during startup until we have provider creds

Bug #1218256 reported by John A Meinel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
John A Meinel

Bug Description

We consolidated a couple of calls for the Upgrader when we moved over to the API version. However this had an unexpected interaction.

Specifically when you initially bootstrap, you don't have credentials for your provider yet (that happens on the first status/deploy/etc after bootstrap completes.)

During that time, the Machine agent is running the Upgrader, which asks the API Server what tools it should be running.

In 1.13.2 we thought it would be good to have a single API call for this, but it turns out that call then goes and tries to read the private storage, which requires provider credentials.

It will be better to have 2 calls. The first one just sees the desired agent version *without* the associated "where do I download the tools from" URL.

Related branches

Revision history for this message
John A Meinel (jameinel) wrote :

note the error log looks like this:
2013-08-29 10:01:35 DEBUG juju codec.go:103 rpc/jsoncodec: <- {"RequestId":11,"Type":"Upgrader","Request":"Tools","Params":{"Entities":[{"Tag":"machine-0"}]}}
2013-08-29 10:01:35 DEBUG juju codec.go:103 rpc/jsoncodec: <- {"RequestId":12,"Type":"NotifyWatcher","Id":"3","Request": "Next","Params":{}}
2013-08-29 10:01:35 INFO juju.provider.ec2 ec2.go:187 opening environment "amz-jam"
2013-08-29 10:01:35 DEBUG juju codec.go:168 rpc/jsoncodec: -> {"RequestId":11,"Error":"environment has no access-key or secret-key","Response":{}}
2013-08-29 10:01:35 DEBUG juju codec.go:103 rpc/jsoncodec: <- {"RequestId":13,"Type":"NotifyWatcher","Id":"3","Request": "Stop","Params":{}}
2013-08-29 10:01:35 DEBUG juju codec.go:168 rpc/jsoncodec: -> {"RequestId":12,"Error":"watcher has been stopped","ErrorCode":"stopped","Response":{}}
2013-08-29 10:01:35 DEBUG juju codec.go:168 rpc/jsoncodec: -> {"RequestId":13,"Response":{}}
2013-08-29 10:01:35 ERROR juju runner.go:200 worker: fatal "upgrader": environment has no access-key or secret-key
2013-08-29 10:01:35 DEBUG juju runner.go:234 worker: killing "machiner"
2013-08-29 10:01:35 DEBUG juju runner.go:234 worker: killing "deployer"

Revision history for this message
John A Meinel (jameinel) wrote :

The proposed fix also has an advantage that any time EnvironConfig changes, we were probing the environment for a full list of tools for every agent. This should cause the probe-for-tools to only happen when there is actually a change to the agent version.
Though it doesn't fix the probe-the-environment for every agent that is running.

Go Bot (go-bot)
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: none → 1.14.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.