agent-state pending

Dimiter Naydenov dimiter.naydenov at canonical.com
Mon Aug 5 16:03:35 UTC 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On  5.08.2013 17:51, Gustavo Niemeyer wrote:
> On Mon, Aug 5, 2013 at 4:46 PM, Dimiter Naydenov 
> <dimiter.naydenov at canonical.com> wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>> 
>> I just did a live test an hour ago on tip + --upload-tools on EC2
>> and everything seemed fine, although it took some more time than
>> usual to get from "pending" to "started" state. Looking at the 
>> cloud-init-output.log, the machine was still running cloudinit
>> stuff 3-4m after it was started. It usually takes less with my
>> live EC2 tests.
> 
> I've bootstrapped the environment several hours ago, so that
> doesn't seem to be the case.
> 
> Also, these machines have units running fine already, so it
> wouldn't make sense for the agent to be pending if it's doing
> actions already.

- From 1.12 onwards the machiner uses the API and SetAgentAlive logic
changed, so now by having an active API connection the agent is deemed
alive. The agent-state is set using a Machiner SetStatus API call. If
you check the all-machines.log on machine 0, you can probably find if
lines like these can be found:

[LOG] 47.41701 DEBUG juju rpc/jsoncodec: <-
{"RequestId":5,"Type":"Machiner","Request":"SetStatus","Params":{"Entities":[{"Tag":"machine-0","Status":"started","Info":""}],"Machines":null}}
[LOG] 47.42615 DEBUG juju rpc/jsoncodec: ->
{"RequestId":5,"Response":{"Results":[{"Error":null}]}}
[LOG] 47.42637 INFO juju.worker.machiner "machine-0" started

It seems like the SetStatus call have failed for some reason (like the
API connection cannot be established). It's also worth looking for
lines like:

[LOG] 80.41588 DEBUG juju rpc/jsoncodec: <-
{"RequestId":7,"Type":"Deployer","Request":"APIAddresses","Params":{}}
...
[LOG] 80.42256 DEBUG juju rpc/jsoncodec: ->
{"RequestId":7,"Response":{"Result":["localhost:35658"]}}

The deployer is also using the API and at startup it reports what
state/API addresses the API server reported back. If you see
"localhost" on something other than machine 0, then the agent will
fail to connect to the API server. It should list the EC2 public
address of the machine there.

I hope this helps shedding some light on the issue.

> 
> 
> gustavo @ http://niemeyer.net
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJR/8zXAAoJENzxV2TbLzHwDsoH/j7pVC7c/SZcl10gJWouYKeo
GJraDEHgEZqNpRJjDMCkTa+agA9N/LF7MvO3OJclGv9Sq7xZxADdY0ZH/0lTfNA0
azgFlfnL3YjCGEOPH71/+XjzaOfGaRounpClulxK0mVHWbg++bnYid2/HCkLSmnT
yvXHd/rCYRzn2V5KMCi1napbOeGQgpNgsTcDofiPwGfTHnYf/sYe83Q5duC8Epoi
2jY7YJCSGCsjg6FiN1+ZYwtAUUAkrd9fYhm+8qP8lzoa09C3woYhWljMGmyHkkeC
Y1Jw7Q6s8FgmR/TQ+9n+969LXBD1+5zhzXTZjgAmOzKKaDTIoZoJ8BB2F1+7mnc=
=GbMR
-----END PGP SIGNATURE-----



More information about the Juju-dev mailing list