juju-solutions / matrix

Automatic testing of big software deployments under various failure conditions
Other
8 stars 9 forks source link

Fix error in cleanup if model creation fails #80

Closed johnsca closed 7 years ago

johnsca commented 7 years ago

Fixes this:

packages/matrix/matrix.yaml
matrix:378:run: Error adding model: 'Controller' object has no attribute 'get_cloud'
------------------------------------------------------------------------------
matrix:423:cleanup: Error while running crashdump.
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/matrix/rules.py", line 419, in cleanup
    model_name=context.juju_model.info.name,
AttributeError: 'Attribute' object has no attribute 'info'

The distill cause, of course, is that it had an outdated version of libjuju. However, it should handle the uncreated model gracefully regardless.

pengale commented 7 years ago

LGTM