juju status sometimes fails with KeyError: 'current'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Invalid
|
Undecided
|
Unassigned | ||
Mojo: Continuous Delivery for Juju |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
After deploying a snapstore service such as snapfind, running the 'productionize' post-deploy command:
mojo run --manifest-file golive/manifest
will intermittently fail (about 1 in 8 times), with the output shown below.
The error is harmless, and retrying the 'mojo run' command generally then succeeds. However, I think it's important not to train people to ignore errors during deploys.
I'm not sure this is the right place to report the error. Maybe something in the snapstore manifest/etc is awry?
I'm not 100% certain whether the following output represents more than one error. Ideally, under normal operation, I would like to not see any error messages during a deploy.
Any insight appreciated. Thank you!
--
2019-10-07 15:26:55 [INFO] Checking Juju status
WARNING closing api sessions failed closing statusAPI: codec.handleRes
2019-10-07 15:27:05 [ERROR] Unknown error
Traceback (most recent call last):
File "/usr/lib/
args.func(args)
File "/usr/lib/
return method(*args, **kwargs)
File "/usr/lib/
manifest.
File "/usr/lib/
phase_
File "/usr/lib/
juju_
File "/usr/lib/
if self.ready() and not wait_for_steady:
File "/usr/lib/
application
File "/usr/lib/
if not self._check_
KeyError: 'current'
Related branches
- Stuart Bishop (community): Approve
- Mojo Maintainers: Pending requested
-
Diff: 114 lines (+87/-1)3 files modifiedmojo/juju/status.py (+5/-1)
mojo/tests/test_juju2.py (+5/-0)
mojo/tests/testdata/juju2-busy2.yaml (+77/-0)
Changed in juju: | |
status: | Incomplete → Invalid |
Changed in mojo: | |
status: | Invalid → New |
This seems like it's a failure message from juju itself (basically from `juju status --format=yaml`). We could potentially deal with this a bit more gracefully in terms of the message we're displaying, but short of retrying we'd still need to consider this an error.