Null provider and failing early
Tim Penhey
tim.penhey at canonical.com
Mon Aug 26 22:44:30 UTC 2013
Hi William,
I've been thinking about the null provider. There are two things that
currently bother me about it.
Firstly the storage solution. I'm thinking we could just use some form
of auth-key to prevent anyone but the provider writing to it, perhaps
that would be sufficient.
Secondly is the add machine problem. The point of the null provider is
that it will never start an instance. The problem at this stage is that
there is no way for the CLI (or API) at this stage to know whether or
not it is possible to create a machine, so one will be added to state
before the provider has got a chance to say yay or nay, as this comes
during the provisioner task.
What would likely happen then is that a machine would get added to
state, and the provisioner would record an error against it as the
provider says "nah, not creating a machine for you".
Ideally we'd like to fail earlier, preferably at the "try to put this
machine in state" phase.
Perhaps we should have a sanity-check type callback into the provider
with the constraints at the time we want to add a machine. This would
give the null provider the early fail mechanism, and could also allow
other providers to error if people as asking for constraints that really
don't make sense.
What do you think?
Tim
More information about the Juju-dev
mailing list