Unit assignment to "unused" machines
William Reade
william.reade at canonical.com
Mon Dec 26 12:25:16 UTC 2011
On Sun, 2011-12-25 at 11:44 +0100, Nick Barcet wrote:
> One thing that we might miss when removing this assign_to_unused_machine
> is the ability to "prestart machines" so that they are readily available
> when we really need them. Starting a machine takes time, specially on
> bare metal, but anywhere else too, and I think we have been using this
> "trick" to speed up demos. A null charm was used to fire up "empty"
> machines to that objective.
So, I infer that you *have* been depending on the window between unit
destruction and machine-trashing. ie, you've been deploying null charms
and then, when you need a machine, destroying the null unit and adding a
new one of the service you need, and trusting that you'll slip the new
unit onto the machine before the PA gets round to trashing it.
I personally don't think it'd be sensible for us to guarantee this
behaviour in future -- IMO it's based on an implementation detail, and
is already risky (...or possibly, if you've found it to be reliable,
there's a bug that makes it so; still an implementation detail).
> Maybe we need to have a pre-provisioning option in 'juju deploy' to
> allow for this behavior in a more sensible manner. For example:
> $juju deploy --preprovision <myservice> 5
> would do everything to start 5 machines, up to the install hook
> (including it), but wait until a 'juju add-unit <myservice>' is called
> to actually continue with other events?
>
> This would also be useful for highly busy system that need to respond
> quickly to change in their loads...
Hmm... this is clearly valuable for orchestra, but how relevant is it to
other providers? On EC2, the cost of 2 spare machines kept in reserve
will be *exactly* the same as the cost of 2 additional machines actually
running the service. (And unless/until we get some sort of autoscaling
in response to load, you *still* have to manually add-unit to get the
benefits, so it seems it would be all cost, with no actual benefits).
I'm wondering if there's some way we could enhance orchestra and the
juju orchestra provider in concert, so we could support your use case
without inflicting misfeatures on the other providers [0]; I seem to
recall that, around UDS time, Dustin Kirkland was exploring options for
quick reimaging of orchestra machines, but I don't remember any details.
Does anyone know if there's been any progress on this front?
Cheers
William
More information about the Juju
mailing list