Comment 5 for bug 1779161

Revision history for this message
Cory Johns (johnsca) wrote :

We discussed this on IRC, but posting it here for reference and adding a bit more detail.

The purpose of setting the constraints is not to influence the name of automatically created VMs, it's to control how the applications get deployed to manually created VMs. With MAAS, the classic usage pattern is to pre-allocate VMs with specific sets of resources, which you would then tag appropriately to create pools of VMs suitable for different roles. You could then target those VMs with tag constraints in Juju / conjure-up, so that the different applications would be placed on VMs that were well aligned with the resources that they need. It would also have the side-effect of preventing new VMs from being created from the pods if the pre-created and tagged VMs were exhausted, however the upshot of that is that provisioning would fail and conjure-up would report it as a failed deployment. But you wouldn't end up in a situation where you had a ton of VMs in which it wasn't clear what was allocated to them.

Aside from making it easier to manage VMs manually via MAAS, I guess pods allow for automatic VM creation by Juju. However, in that case, MAAS will create as many VMs as Juju asks for, and it sounds like there's not an easy way in MAAS to figure out what's assigned to each. Of course, you should be able to use Juju to determine this (with `juju list-models` and `juju status -m $model`) and I did think that Juju would tag the VMs via MAAS to at least give some clue as to how they're used. If MAAS supports having Juju provide the name for automatically created VMs, it would certainly be nice to have the MAAS provider in Juju support that and give them clear and useful names (presumably including the model ID and machine number).