diff options
author | Keir Fraser <keir@xensource.com> | 2007-11-06 09:40:44 +0000 |
---|---|---|
committer | Keir Fraser <keir@xensource.com> | 2007-11-06 09:40:44 +0000 |
commit | e02df4427901bd0f98335a8e1daa066676faef83 (patch) | |
tree | c66e135448f2d522dfa6a9d9b1ca0a4066bca118 /docs | |
parent | fca749bf8d6e48167b8342f613c999e17c6b259e (diff) | |
download | xen-e02df4427901bd0f98335a8e1daa066676faef83.tar.gz xen-e02df4427901bd0f98335a8e1daa066676faef83.tar.bz2 xen-e02df4427901bd0f98335a8e1daa066676faef83.zip |
xenstored: Recover from corrupt tdb on reboot
Xen cannot work when xenstored's tdb is corrupt. When that happens
somehow (and we've seen it happen), even reboot doesn't recover from
it. It could: there is no state in tdb that needs to be persisted
across reboots.
This patch arranges that tdb is removed before xenstored is started,
provided it doesn't already run. This is safe, because:
* xenstored cannot be restarted. If it dies, Xen's screwed until
reboot.
* /usr/sbin/xend always starts xenstored anyway.
* xenstored locks its pid-file (see write_pidfile() in
tools/xenstore/xenstored_core.c), and refuses to start when it
can't.
* My patch makes /usr/sbin/xend remove tdb iff it can lock the
pid-file. In other words, it removes tdb only when xenstored is not
running, and locks it out until it is done.
Bonus fix: it also removes stale copies of the tdb xenstored tends
to leave behind when it exits uncleanly.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions