juju show-status fails during teardown

Bug #1742699 reported by John A Meinel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Anastasia

Bug Description

It is unclear if this is a bug in the test assumptions, or a bug in 'juju show-status', but we're having CI runs fail because of it:
http://qa.jujucharms.com/releases/6147/job/destroy-model-lxd/attempt/928
http://qa.jujucharms.com/releases/issue/5759a97d749a56227ed84d46

My first thought is that it is a problem with the test suite. Certainly if you do "juju show-status DYINGMODEL" and that model actually dies, we would expect status to fail, wouldn't we?

Maybe the model should still be there?
2018-01-11 12:33:00 INFO juju --show-log show-status -m destroy-model-lxd:test-tmp-env --format yaml
...
ERROR model "test-tmp-env" has been removed from the controller, run 'juju models' and switch to one of them.
...
raceback (most recent call last):
  File "/var/lib/jenkins/juju-ci-tools/assess_destroy_model.py", line 164, in <module>
    sys.exit(main())
  File "/var/lib/jenkins/juju-ci-tools/assess_destroy_model.py", line 159, in main
    assess_destroy_model(bs_manager.client)
  File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/var/lib/jenkins/juju-ci-tools/deploy_stack.py", line 1056, in booted_context
    yield machines
  File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/var/lib/jenkins/juju-ci-tools/deploy_stack.py", line 962, in runtime_context
    m_client.show_status()
  File "/var/lib/jenkins/juju-ci-tools/jujupy/client.py", line 1021, in show_status
    self.juju(self._show_status, ('--format', 'yaml'))
  File "/var/lib/jenkins/juju-ci-tools/jujupy/client.py", line 1150, in juju
    model, check, timeout, extra_env, suppress_err=suppress_err)
  File "/var/lib/jenkins/juju-ci-tools/jujupy/backend.py", line 197, in juju
    rval = call_func(args, stderr=stderr)
  File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '('juju', '--show-log', 'show-status', '-m', 'destroy-model-lxd:test-tmp-env', '--format', 'yaml')' returned non-zero exit status 1

That sure looks like were getting a non-zero return code, but because the model really isn't there.

Maybe its more the issue that "juju models" is listing models that are in a dying/dead state? There seem to be other bugs around that.

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

I believe this was fixed by other fixes from Anastasia.

Changed in juju:
assignee: nobody → Anastasia (anastasia-macmood)
milestone: none → 2.3.3
status: Triaged → Fix Committed
Changed in juju:
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.