Descriptionstate.Unit: don't reuse existing machines
Two main changes here:
* A new AssignNew policy has been added that doesn't reuse machines
* A function to AssignToNewMachine for a Unit
We don't want to reuse machines right now as existing machines
that may have had units deployed on them may well be dirty, as we
cannot ensure that the charms clean up after themselves. Perhaps
in the not too distant future, we may be able to deploy charms
into containers that would mean that when we removed the unit we
can be sure that the machine is clean, but until that is the
case, we don't want to reuse machines. However I didn't want to
remove functionality that we would be wanting again soon(ish), so
a new policy has been created, and the providers updated to use
it.
To make the operations to construct a new machine easily
available, a new function was added to State to get the required
operations.
Unit gets a new function to AssignToNewMachine. This creates the
new machine and sets the assignment in one transaction.
Preconditions are much easier here as we know that the machine
doesn't have any current principals, and is of the correct
series.
https://code.launchpad.net/~thumper/juju-core/start-instance-tool-selection/+merge/155688
(do not edit description out of merge proposal)
Patch Set 1 #
Total comments: 26
Patch Set 2 : state.Unit: don't reuse existing machines #
Total comments: 12
Patch Set 3 : state.Unit: don't reuse existing machines #Patch Set 4 : state.Unit: don't reuse existing machines #
MessagesTotal messages: 10
|