Specify credential when adding a model #66

Merged
merged 2 commits into from Jan 5, 2017

Conversation

Projects
None yet
2 participants
Owner

johnsca commented Jan 5, 2017

This shouldn't be necessary, as it should use a reasonable default based on the controller's cloud. But if the controller is registered using juju register, it won't do the right thing.

See https://bugs.launchpad.net/juju/+bug/1652171

Fixes #60

Improve error handling around adding and removing model
Errors from add_model (e.g., no credentials) were causing the test to
hang and never terminate.
matrix/rules.py
- context.juju_controller.add_model(name), 30)
+ context.juju_controller.add_model(name,
+ credential_name=credential),
+ 30)
@petevg

petevg Jan 5, 2017

Collaborator

Small indentation fail.

matrix/rules.py
+ await self.destroy_model(context)
+ except Exception as e:
+ log.error('Error destroying model: %s', e)
+ log.debug("%s Complete %s %s", test.name, success, context.states)
@petevg

petevg Jan 5, 2017

Collaborator

This log message will always be excluded from the crash dump, which is a shame, because it tells you whether the test succeeded or failed.

@johnsca

johnsca Jan 5, 2017

Owner

Oh, crap. That's a problem.

Specify credential when adding a model
This shouldn't be necessary, as it should use a reasonable default based
on the controller's cloud.  But if the controller is registered using
`juju register`, it won't do the right thing.

See https://bugs.launchpad.net/juju/+bug/1652171

Fixes #60
Collaborator

petevg commented Jan 5, 2017

LGTM/+1

@johnsca johnsca merged commit 0376f6c into master Jan 5, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment