[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] Lifecycle



On 14 July 2016 at 17:22, Nick Betteridge
<lists.nick.betteridge@xxxxxxxxx> wrote:
>
>>>>>>
>>>>>>> The basic calls would be Start, Stop, Pause, Resume. Restart?
>>>>>
>>>>>> I suspect restart may be difficult to distinguish in certain
>>>>>> contexts, this would make it an unreliable event. Do you have any
>>>>>> particular use cas for something you'd like to do knowing that you
>>>>>> are going to restart ?
>>>>>>
>>>>>
>>>>> ...in particular I wonder what Restart and Pause/Resume look like in a
>>>>> unikernel / microservice world, and how are they different from
>>>>> Stop...Start. (Assuming immutability, compile-time configuration,
>>>>> state persistence into Irmin, and so on.)
>>>>
>>>> Micromanagement interface? :)
>>>>
>>>
>>> I guess the use-case I had in mind was the radio modem connected to the
>>> unikernel:
>>>
>>> Stop -> inform participating unikernels that we're stopping, housekeep,
>>> turn off the radio.
>>> Pause -> housekeep, turn off the radio
>>> Restart -> housekeep
>>>
>>> Certainly 'Stop' is a must-have.
>>
>> Ah-- I guess I don't understand who's invoking which operation :)
>>
>> I had assumed that Start/Stop were operations that could be invoked on
>> a unikernel to boot it and then cleanly shut it down. But from what
>> you say above it sounds like Stop is a message that a unikernel may
>> broadcast to other unikernels to say "I'm stopping"? (I may just be
>> completely misunderstanding though!)
>>
>
> No, no - you're quite right. Whatever is controlling the unikernel
> passes on up-coming states to the unikernel, on starting, on stopping
> etc.. It's then up to the unikernel to act on being told that 'we're
> shutting you down, buddy: STOP' via mirageos/platform etc..
>
> I guess this would be done via vchan, in the case of xen, and there must
> be something similar for kvm?

Note that for poweroff and reboot you can use
OS.Lifecycle.await_shutdown_request

https://github.com/mirage/mirage-platform/blob/master/unix/lib/lifecycle.mli


-- 
talex5 (GitHub/Twitter)        http://roscidus.com/blog/
GPG: 5DD5 8D70 899C 454A 966D  6A51 7513 3C8F 94F6 E0CC
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.