juju-solutions / layer-cwr

Layer for building the Juju Jenkins CI env
Other
2 stars 5 forks source link

ready status is not always correct #27

Closed kwmonroe closed 7 years ago

kwmonroe commented 7 years ago

I've noticed that sometimes the store-login action does not update the cwr status. After running the action successfully, i see:

cwr/0*    active    idle            40.84.158.92    5000/tcp  ready (not authenticated to charm store)

I verified the jenkins user does indeed have the usso-token, so it seems like our report_status() function just isn't getting called:

https://github.com/juju-solutions/layer-cwr/blob/master/reactive/cwr.py#L22

There must be some combination where this works because it doesn't happen to me all the time. I'm guessing when I call the store-login action before the cwr charm is ready, I'm piggy-backing on some other reactive handler (ci_connection_updated or controllers_updated perhaps) to get the ready state.

I'll post working/broken combinations here if/when they come up. Meanwhile, one potential fix would be to move report_status into a helper lib that could be called from actions as well as reactive/cwr.py.

merlijn-sebrechts commented 7 years ago

Happened to me too.