News

Back to Horms' Home Page

Xen on empty /var/lib/xend/state/sr.xml

[Chiz in Aoyama]

I'm not sure how/why/when /var/lib/xend/state/sr.xml became zero length, but I am sure that Xen's reaction was fairly difficult to read: xend wouldn't start.

# /etc/init.d/xend restart
.........

The log, at 61 lines, was much more verbose, though equally useless unless you are prepared to delve into the code. It can be found here. It turns out the interesting portion for debugging the problem is:

  File "usr/lib/python2.5/site-packages/xen/xend/XendNode.py", line 240, in _init_SRs
      saved_srs = self.state_store.load_state('sr')

Diving into the code, I put a few debugging statements into XendStateStore.py, which seemed to indicate that the breakage was occurring around the time that /var/lib/xend/state/sr.xml was read. On inspection I found this file to be empty, while similar files in the same directory were not.

A solution: # rm /var/lib/xend/state/sr.xml

A Lesson Learnt: If you follow xen-unstable, from time to time things will break in bizarre ways.

A Mystery: How did the file end up empty in the first place?

Thu, 30 Apr 2009 11:56:25 +1000| Permalink