Hello, I noticed a strace delay when running "virsh list" on my Xen-4.1.3 test server. On further investigation I noticed that in XenStore there were multiple /vm/$UUID entries suffixed by -$VERSION, especially I hat 16 entries for my dom0. For each reboot of the host I get a new entry. After disabling Xend I get the following output after a reboot:> root at xen5:~# xenstore-ls /local/domain/0 > name = "Domain-0"If I then start Xend, I get more data added:> root at xen5:~# /etc/init.d/xend start > Starting xen management daemon: xend. > root at xen5:~# xenstore-ls /local/domain/0 > vm = "/vm/00000000-0000-0000-0000-000000000000-2" > device = "" > control = "" > platform-feature-multiprocessor-suspend = "1" > error = "" > memory = "" > target = "3400192" > guest = "" > hvmpv = "" > data = "" > cpu = "" > 1 = "" > availability = "online" > 0 = "" > availability = "online" > description = "" > console = "" > limit = "1048576" > type = "xenconsoled" > domid = "0" > name = "Domain-0"Notice that I now have vm=$UUID-2. If you just restart Xend, the problem does not show; you need to actually reboot to host, so that /local/domain/0/vm does not exist. I found commit <http://xenbits.xen.org/hg/xen-unstable.hg/rev/265950e3df69> which added the suffix handling, which I never noticed before. I found the same issue reported at <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666135>. For comparison I just installed a fresh Debian Wheezy rc1 and noticed that the XenStore tdb there is locates in /var/_run_/xenstore/tdb instead of /var/_lib_/xenstore/tdb. Since /var/run/ lives on a tempfs, it's nuked on every reboot and thus the problem doesn't exist there. Is the XenStore tdb supposed to survive a reboot or must it be cleared between each reboot? Sincerely Philipp -- Philipp Hahn Open Source Software Engineer hahn at univention.de Univention GmbH be open. fon: +49 421 22 232- 0 Mary-Somerville-Str.1 D-28359 Bremen fax: +49 421 22 232-99 http://www.univention.de/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part. URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20120824/296ff46b/attachment.pgp>
Ian Campbell
2012-Aug-24 15:05 UTC
[Pkg-xen-devel] Bug#666135: [Xen-devel] XenStore tdb vs. reboot
On Fri, 2012-08-24 at 16:00 +0100, Philipp Hahn wrote:> Is the XenStore tdb supposed to survive a reboot or must it be cleared > between each reboot?Stuff in xenstore is not required to survive a reboot and clearing it on boot is a good best practice, since it avoids bugs in the C xenstored ;-) The ocaml xenstore doesn't even have an on disk DB by default. Ian.
On Fri, Aug 24, 2012 at 04:05:56PM +0100, Ian Campbell wrote:> On Fri, 2012-08-24 at 16:00 +0100, Philipp Hahn wrote: > > Is the XenStore tdb supposed to survive a reboot or must it be cleared > > between each reboot? > > Stuff in xenstore is not required to survive a reboot and clearing it on > boot is a good best practice, since it avoids bugs in the C > xenstored ;-)Many installations that are using C xenstored mount /var/lib/xenstored as a tmpfs. It seems that a proposed patch [1] to the Linux init scripts (pre-xencommons) wasn''t applied.> The ocaml xenstore doesn''t even have an on disk DB by default. > > Ian.Matt [1] http://lists.xen.org/archives/html/xen-devel/2010-01/msg00667.html