Merge lp://qastaging/~frankban/juju-quickstart/azure-bootstrap-node into lp://qastaging/juju-quickstart
Proposed by
Francesco Banconi
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 87 | ||||
Proposed branch: | lp://qastaging/~frankban/juju-quickstart/azure-bootstrap-node | ||||
Merge into: | lp://qastaging/juju-quickstart | ||||
Diff against target: |
47 lines (+23/-3) 2 files modified
quickstart/app.py (+9/-3) quickstart/tests/test_app.py (+14/-0) |
||||
To merge this branch: | bzr merge lp://qastaging/~frankban/juju-quickstart/azure-bootstrap-node | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju GUI Hackers | Pending | ||
Review via email: mp+225618@code.qastaging.launchpad.net |
Description of the change
Do not colocate GUI on machine 0 for Azure.
To post a comment you must log in.
Reviewers: mp+225618_ code.launchpad. net,
Message:
Please take a look.
Description:
Do not colocate GUI on machine 0 for Azure.
https:/ /code.launchpad .net/~frankban/ juju-quickstart /azure- bootstrap- node/+merge/ 225618
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/106410044/
Affected files (+25, -3 lines): tests/test_ app.py
A [revision details]
M quickstart/app.py
M quickstart/
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision:
<email address hidden>
Index: quickstart/app.py data['CharmURL' ] gui_charm_ url(charm_ url) node_series) : node_series)
=== modified file 'quickstart/app.py'
--- quickstart/app.py 2014-06-13 13:45:06 +0000
+++ quickstart/app.py 2014-07-04 07:49:03 +0000
@@ -388,9 +388,15 @@
# provided charm URL and just use the already deployed charm.
charm_url = service_
charm = utils.parse_
- # Deploy on the bootstrap node if we are not using the local provider,
and
- # if the requested charm and the bootstrap node have the same series.
- if (env_type != 'local') and (charm.series == bootstrap_
+ # Deploy on the bootstrap node if the following conditions are
satisfied:
+ # - we are not using the local provider (which uses localhost);
+ # - we are not using the azure provider (in which availability sets
prevent
+ # us from relying on the bootstrap node);
+ # - the requested charm and the bootstrap node have the same series.
+ if (
+ (env_type not in ('local', 'azure')) and
+ (charm.series == bootstrap_
+ ):
machine = '0'
return charm_url, machine, service_data, unit_data
Index: quickstart/ tests/test_ app.py tests/test_ app.py' tests/test_ app.py 2014-06-13 13:45:06 +0000 tests/test_ app.py 2014-07-04 07:49:03 +0000
self. assertIsNone( machine)
=== modified file 'quickstart/
--- quickstart/
+++ quickstart/
@@ -947,6 +947,20 @@
# The Juju GUI unit cannot be deployed to localhost.
+ def test_azure_ provider( self, mock_print): node_series = 'trusty' get_charm_ url(return_ value=' cs:trusty/ juju-gui- 42'): environment( node_series, ne(machine) charm_url( self, mock_print):
+ # When using the azure provider, availability sets are enabled and
+ # this prevents us from co-locating the Juju GUI on machine 0.
+ env = self.make_env()
+ charm_url = None
+ env_type = 'azure'
+ bootstrap_
+ check_preexisting = False
+ with
self.patch_
+ url, machine, service_data, unit_data = app.check_
+ env, 'my-gui', charm_url, env_type, bootstrap_
+ check_preexisting)
+ self.assertIsNo
+
def test_default_
# A default charm URL suitable to be deployed in the bootstrap
node is
# returned if the charmworld API is not reachable.