All of lore.kernel.org
 help / color / mirror / Atom feed
* libxl device xenstore entries cleanup
@ 2013-04-17 14:54 Marek Marczykowski
  0 siblings, 0 replies; only message in thread
From: Marek Marczykowski @ 2013-04-17 14:54 UTC (permalink / raw)
  To: xen-devel@lists.xen.org


[-- Attachment #1.1: Type: text/plain, Size: 1484 bytes --]

Hi,

Currently libxl removes entries from xenstore "device/" tree only in case of:
a) domain destroy (clean all domain directory)
b) dom0-initiated device remove

But this doesn't cover all the cases. At least this isn't done:
a) backend domain shutdown, backend-initiated remove
b) backend domain destroy (here backend driver doesn't have chance to signal
frontend)
c) frontend initiated remove

First two apply only for backends in driver domain of course. The last one can
be triggered by xenstore-write device/vbd/DEVID/state 5, but I have a patch
which map eject on normal disk (not cdrom) operation to remove.

The "c" case also applies to backend entries.
All of above means that devices with state=6 are left in xenstore, preventing
add new device in the same place (eg reattach networking after backend domain
restart).

Currently I have workarounded this with python script, which watch all
device/*/state entries and clean them up in case of state=6 detected (with
some nasty sleep to not race with libxl in case of domain
destroy/dom0-initiated remove). But IMO this should be done in libxl toolstack
itself.
Perhaps something similar to handling cdrom eject?
Also device remove should generate some event, eg. to allow libvirt update
domain configuration state.

Any ideas how to do this? I believe it is too late for 4.3, but perhaps can be
backported later?

-- 
Best Regards / Pozdrawiam,
Marek Marczykowski
Invisible Things Lab


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 553 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-04-17 14:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-17 14:54 libxl device xenstore entries cleanup Marek Marczykowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.