Thursday evening handover, 7/6/2012
roger peppe
roger.peppe at canonical.com
Thu Jun 7 09:51:42 UTC 2012
On 7 June 2012 07:05, Dave Cheney <david.cheney at canonical.com> wrote:
> Hello,
>
> Today I remerged all my changes to the new juju-core tree and worked on adding the functionality for the PA to be able to start and stop machines via the Environ.
>
> I have hit one snag and wanted to ask for some background. In the python version there is a method on the provider that gets all the running instances id's. This method is used to check if there are any machines running which do not appear in the state. We have no such method in the go environ.Environs interface; you can get the environ.Instance for a set of running instances from the Environ, but you need to know their ids. As the PA is trying to shut down instances for which we have lost track of their ids, this won't work.
>
> Is there are reason for environ.Instances being the way it is, or is this an oversight ?
The reason that Environ.Instances is the way it is currently is that you aren't
guaranteed to get all machines even if you have just started them,
due to the eventual consistency semantics of ec2. (The original semantics
of Instances was as you describe).
One possibility would be to interpret a nil slice argument to Instances
as asking for all instances.
Out of interest, when do you see this situation (extra instances not
mentioned in the state) happening in practice?
More information about the Juju-dev
mailing list