This MP will need significant changes, I've got something working, but I'd like to restructure how it's done. Here's the gist: 1. Update _placement_sort() such that when we have two servics with unit_placements, we sort them in a new function. The new sort function prefers maas= units first. This results in ensuring we get all of the maas= placements first since they are critical for a successful deployment with placement. 2. The next challenge that arose after implementing (1) was that the method for allocating machines wasn't handling lxc placement targets that was easily fixed since we just return the placement if it's not something we need to allocate a machine. 3. After fixing (2) as described, then the bigger issue of supporting -to container:service=unit which requires that service *has* the target unit. one of the changes needed to support maas= with placement first was to bring up the unit=0 machine, and then wait until add_units() to bring the remaning units online. This breaks when you have a primary service targeting a service:unit=X where X is > 0. In deployer, multi-unit services are deployed with num_units=svc.units; but that doesn't work as-is with placement. So, if we run with placement first, we deploy the base service, and then immediately add the additional placed units. This ensures that when ceilometer wants to run on lxc:ceph=2 that we actually have a ceph unit=2 available for placement directives. Now with that said, what I think makes more sense is to keep (1), but modify the env.base deploy to accept the placement directives and when doing a deploy a service with multiple units it also takes the unit placement list, then inside deploy, it handles bringing the machines online via the add_machine() call we've added. This should leave the the deploy_services() and add_units() methods mostly untouched. If/when juju deploy starts accepting -n 3 -to maas=host1,maas=host2,maas=host3 as input, juju-deployer can drop calling env.add_machine() and instead just pass the params through to juju itself. On Mon, Mar 2, 2015 at 11:03 AM, Ryan Harper