From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Marczykowski Subject: libxl device xenstore entries cleanup Date: Wed, 17 Apr 2013 16:54:03 +0200 Message-ID: <516EB78B.3000009@invisiblethingslab.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3520689297712473788==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============3520689297712473788== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigFE94018F73EEC4BADBA6CA67" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigFE94018F73EEC4BADBA6CA67 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 sig= nal frontend) c) frontend initiated remove First two apply only for backends in driver domain of course. The last on= e can be triggered by xenstore-write device/vbd/DEVID/state 5, but I have a pat= ch 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=3D6 are left in xenstore, prev= enting add new device in the same place (eg reattach networking after backend do= main restart). Currently I have workarounded this with python script, which watch all device/*/state entries and clean them up in case of state=3D6 detected (w= ith some nasty sleep to not race with libxl in case of domain destroy/dom0-initiated remove). But IMO this should be done in libxl tool= stack itself. Perhaps something similar to handling cdrom eject? Also device remove should generate some event, eg. to allow libvirt updat= e domain configuration state. Any ideas how to do this? I believe it is too late for 4.3, but perhaps c= an be backported later? --=20 Best Regards / Pozdrawiam, Marek Marczykowski Invisible Things Lab --------------enigFE94018F73EEC4BADBA6CA67 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iQEcBAEBAgAGBQJRbreLAAoJENuP0xzK19csR0MH/0r0EI1alJ3UCd344Ok/nBEM cqwJVgqI8VN0BhqjEimDqHgFKgoAtnGUsx3Kl4EZju7hmtatE3Vb0nL7aitUuuNa jqYwtNo3Qk3FqiZurhSGQ1vOopkRmPfCpBUi0aSpdfwkYbJuEy9SEHc0S7YRz4R7 /BCk70Vb5oPGxwBHAiaqkyR/PI8WprQFcuOuj56fRwKFrdJdKWKzig4o59hNKl5T 3JUcdVP6R6ZjWMiASxZLYAXVitDWV2jbY2F/KepXzNeHYi1O+iNeqBuydmzv8XtF mo8UsAc+ewVBeoyOIqWO+aaM5CkzWHkiEJnGmYsxbtDIls7SWm5L15kIeGtkmZE= =RK4R -----END PGP SIGNATURE----- --------------enigFE94018F73EEC4BADBA6CA67-- --===============3520689297712473788== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============3520689297712473788==--