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

[Xen-devel] libxl device xenstore entries cleanup



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: signature.asc
Description: OpenPGP digital signature

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

 


Rackspace

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