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

Re: [PATCH 06/20] tools/xenstore: remove all watches when a domain has stopped



Hi Juergen,

On 08/11/2022 07:54, Juergen Gross wrote:
On 07.11.22 19:33, Julien Grall wrote:


On 07/11/2022 07:54, Juergen Gross wrote:
On 06.11.22 22:18, Julien Grall wrote:
Hi Juergen,

On 01/11/2022 15:28, Juergen Gross wrote:
When a domain has been recognized to have stopped, remove all its
registered watches. This avoids sending watch events to the dead domain
when all the nodes related to it are being removed by the Xen tools.

 From my understanding, shutdown doesn't mean dead. It may be used during migration (or snapshotting), where we don't want to touch the state in case of a cancellation (or resume).

For instance, see the command XS_RESUME which will clear domain->shutdown.

Oh, good catch!

I need to additionally check the "shutdown reason". I can remove the
watches only in case of the reason not having been "suspend".

This is quite fragile because we may add new shutdown code in the future that could resume.

I think it would be better to only delete the watches if the domain is effectively dying (I don't think it can come back from that state)

This is how it is done today.

Not really. dominfo.dying is only set if the domain is dead (i.e. DOMDYING_dead). This is happening *after* everything has been relinquished. So this is quite late compare to what you seem to want.


The domain's Xenstore entries are removed before the domain is being
destroyed.
Do you mean before domain_kill() is called? If so, maybe we should call domain_kill() before hand.

The other alternative, would be to notify the Xenstored that domain is never going to come back.

Cheers,

--
Julien Grall



 


Rackspace

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