You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by "marios@redhat.com" <ma...@redhat.com> on 2012/04/03 09:18:52 UTC
Re: destroy has to include stopping? how to not support reboot?
Hi Dies:
On 02/03/12 02:31, Koper, Dies wrote:
> The API documentation has:
>
> destroy Stop the instance and completely destroy it
>
> FGCP's destroy equivalent does not stop it first. I first need to stop
> it, wait until it's stopped, then destroy it (may even have to detach
> resources such as global IP addresses from it first).
>
> Is it enough to just NOT include the following state transition, or do I
> need to do anything more?
> (I see only GoGrid and SBC have it)
there is no 'right' vs 'wrong' with respect to instance states - the
instance life-cycle is entirely dictated by the given cloud provider.
I don't know enough about the FGCP cloud - however, from what you
describe above - there is a 'destroy' action which completely stops the
instance and frees resources, and there is also a 'stop' action which
just stops the instance (pull the plug vs graceful shutdown?)
running.to(:finish) .on(:destroy)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
i.e. invoke the kill+free resources functionality (i.e. 'pull the plug'?)
running.to(:shutting_down) .on(:stop)
shutting_down.to(:stopped) .automatically
stopped.to(:finish) .on(:destroy)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
i.e. invoke the stop. (I assume an intermediate 'pending' state while it
is gracefully shutdown). Then from the stopped state it can also be
destroyed to kill+free resources.
>
> running.to( :finish ) .on( :destroy )
>
> Similar question for reboot:
> FGCP doesn't have a single operation for it. I first need to stop it,
> wait until it's stopped, then start it again.
>
so you don't *have* to have a reboot action and method, if this is not
supported by FGCP (from a quick look I see the rhevm driver doesn't do
reboot). So combined with the above you could do something like:
running.to(:shutting_down) .on(:stop)
shutting_down.to(:stopped) .automatically
stopped.to(:finish) .on(:destroy)
stopped.to(:pending) .on(:start)
pending.to(:running) .automatically
marios
> Is it enough to make the reboot_instance method do:
>
> raise "Reboot action not supported"
>
> and NOT include the following state transition, or do I need to do
> anything more?
>
> running.to( :running ) .on( :reboot )
>
> I noticed condor driver has this state instance but reboot_instance is
> not implemented??
> I also noticed gogrid driver has reboot_instance implemented but this
> state transition is not included??
>
> Cheers,
> Dies
>