Comment 2 for bug 1892854

Revision history for this message
Ian Booth (wallyworld) wrote :

A few thoughts...

constraints are intended to be provider agnostic. The supported constraint attributes are not supposed to be specific to any provider. Availability Sets are very much an Azure only construct needed because Windows can't apply updates without needing to reboot :-)

The existing algorithm for determining the availability set name is to pick one of the applications deployed to the machine. So it's not strictly correct to say that availability sets are not used if a machine has more than one unit placed on it.

Given machine constraints are applied prior to provisioning, I assume the workflow you are looking to use is something like:

$ juju add-machine --constraints availability-set=foo
Machine 3 added.

$ juju deploy somecharm --to 3

A better approach is to use placement. Placement can be used for provider specific behaviour. eg we already have

$ juju add-machine zone=us-east-1a (start a machine in zone us-east-1a on AWS)
$ juju add-machine maas2.name (acquire machine maas2.name on MAAS)

We would introduce a new placement directive for availability set on Azure:

$ juju add-machine availability-set=foo