Skip to contentSkip to conversation

XenStore tdb vs. reboot

DISCUSSION Philipp Hahn 3 participants 3 messages Aug 24, 2012

lore
Share & tools
lore
#0 lore raw

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:

Quoted 2 lines
root@xen5:~# xenstore-ls /local/domain/0
name = "Domain-0"

If I then start Xend, I get more data added:

Quoted 16 lines
root@xen5:~# /etc/init.d/xend start
Starting xen management daemon: xend.
root@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"
Quoted 8 lines
 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

Signature · 4 lines
Philipp Hahn           Open Source Software Engineer      [email protected]
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/

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#1 lore raw
Quoted 2 lines · Philipp Hahn

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.

#2 lore raw
Quoted 7 lines · Ian Campbell
Quoted 2 lines · Philipp Hahn

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.

Quoted 3 lines

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