All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Marczykowski <marmarek@invisiblethingslab.com>
To: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: libxl device xenstore entries cleanup
Date: Wed, 17 Apr 2013 16:54:03 +0200	[thread overview]
Message-ID: <516EB78B.3000009@invisiblethingslab.com> (raw)


[-- 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

                 reply	other threads:[~2013-04-17 14:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=516EB78B.3000009@invisiblethingslab.com \
    --to=marmarek@invisiblethingslab.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.