-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request juju#9481 from manadart/zone-constraints
juju#9481 ## Description of change This patch comes about following discussion of the absence of availability zone placement support in bundles. It is intended to meet the following needs: - Bundles do support constraints, so allowing zones as constraints delivers this capability. - It accommodates MAAS deployments where normal AZ distribution is required, but some zones need to be excluded from consideration. It includes the following functional changes: - "zones" is now a valid constraint keyword, intended for constraining deployment to one or more availability zones. - Machine provisioning accommodates supplied zone constraints, including within a distribution group. - Unit assignment accommodates supplied zone constraints. #### Notable Behaviour Change Note that policy-based deployment of units to empty machines changes subtly. If these conditions are met: - zone constraints are present, - there are empty machines in any of the availability zones in the constraints, - a non-empty distribution group for the application is determined and; - the distribution group would normally cause a new machine to be created. Then one of the existing empty machines is used for deployment. ## QA steps - `juju bootstrap aws zone-test --no-gui --debug --build-agent` - `juju deploy redis red0 -n 2 --constraints zones=us-east-1a` - Check that Redis comes up on new machines in the us-east-1a zone. - `juju add-machine -n 2 --series trusty --constraints zones=us-east-1a` - Check that 2 new machines come up in the us-east-1a zone. - `juju deploy redis red1 -n 2 --constraints zones=us-east-1c` - Check that the empty us-east-1a machines are not used and that Redis is deployed to new us-east-1c machines. - `juju deploy redis red2 -n 2 --constraints zones=us-east-1a` - Check that the empty machines in us-east-1a are deployed to. - `juju add-machine --series trusty --constraints zones=us-east-1a` - `juju add-machine --series trusty --constraints zones=us-east-1c` - `juju deploy redis red3 -n 2 --constraints zones=us-east-1a,us-east-1c` - Check that a unit is deployed to each of the previously added machines. - `juju add-machine lxd --constraints zones=us-east-1d` - Check that a container is created on a new machine in us-east-1d. - Copy the _mediawiki-single_ bundle and add lines `constraints: zones=us-east-1a` to the applications. - Deploy the bundle and check that all machines were created in us-east-1. - `juju deploy redis redany -n 3` - Check that Redis is deployed to new machines in 3 different zones (no regression). #### New Distribution Test - `juju add-machine --series trusty --constraints zones=us-east-1a` - `juju add-machine --series trusty --constraints zones=us-east-1a` - `juju deploy redis red4 -n 2 --constraints zones=us-east-1a,us-east-1c` - Check that one unit goes to one of the existing machines, and another is added to a new machine in us-east1c. ## Documentation changes Yes. ## Bug reference https://bugs.launchpad.net/juju/+bug/1791715
- Loading branch information
Showing
23 changed files
with
1,080 additions
and
222 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.