Ubuntu-Solutions-Engineering/cloud-installer — pull request #148 by mikemccracken (2014-08-21 19:59:06+00:00)
Title: Refactor deploys, ensure mysql is up before keystone is deployed

Similar goals to PR 124: https://github.com/Ubuntu-Solutions-Engineering/cloud-installer/pull/124

* Ensure that mysql is up before keystone is deployed. see cloudinstall/charms/keystone.py for the setup() that does this.

* change core.py Controller.init_deploy_charms to check for the return value of setup and defer all deploys until the current charm's setup() indicates success.

* also refactor init_deploy_charms to simplify the code to reflect that it is now only run once and in a separate thread, so no need to keep track of 'finalized' charms, since we can just loop until all threads are deployed then enqueue them into the charm queue. Enqueueing is now a separate function for readability and to simplify future unit testing.

* Several changes to log messages are included here as they were useful for debugging the change in this branch.

* Now uses recently-added MacumbaError class to catch exceptions from the juju client library.