API server inaccessible for roughly 5 seconds after bootstrap
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Fix Released
|
High
|
Unassigned | ||
1.20 |
Fix Released
|
High
|
Unassigned |
Bug Description
when bootstrapping and attempting to access the api service directly after juju responds with:
Traceback (most recent call last):
File "/tmp/jujudumps
j.login()
File "/home/
File "/home/
self.
File "/home/
self.
File "/home/
socket.
ConnectionRefus
This is a part of a python library we use to access juju api but the error is obviously in response to the api server being unavailable.
To reproduce you can use our python library and the following code:
$ pip install macumba
Script:
#!/bin/bash
cat <<-EOF > ~/.juju/
default: local
environments:
local:
type: local
container: kvm
lxc-clone: true
admin-secret: pass
EOF
juju bootstrap
cat <<-EOF > /tmp/jujudumpst
#!/usr/bin/env python3
import macumba
from pprint import pprint
JUJU_URL = 'wss://
JUJU_PASS = 'pass'
if __name__ == "__main__":
j = macumba.
j.login()
ret = j.status()
pprint(ret)
EOF
chmod +x /tmp/jujudumpst
/tmp/jujudumpst
After waiting roughly 5-10 seconds the api server will become available. This did not use to happen in juju version 1.18.
Currently seen on Trusty, juju-core 1.20.x
Thanks
Adam
tags: | added: api cloud-installer |
Changed in juju-core: | |
importance: | Undecided → High |
status: | New → Triaged |
milestone: | none → 1.21-alpha1 |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
Attaching machine-0.log which contains output from failed connection and shortly after where the api server started accepting requests