[Pkg-xen-devel] Bug#655301: Bug#655301: Bug#655301: Bug#655301: Bug#655301: xcp-xapi fails to start

Thomas Goirand zigo at debian.org
Tue Jan 17 21:30:33 UTC 2012


On 01/17/2012 02:47 PM, Ritesh Raj Sarraf wrote:
> But the problem is, xcp-xapi wants to have xend disabled.
>
> [ ... ]
>
> So I disabled the xend init file and then ran into this problem.

No wonder why then! Nobody ever wrote/said that you should do that. The
xend init.d script does a lot more than just starting xend. It also:
- modprobe the xenfs and xen-evtchn kernel modules
- mounts /proc/xen as xenfs
- Starts xenconsoled
- Starts xenstored

If the above isn't done, then there's no way that XCP, or even Xen, will
ever work! The only thing that should be disabled is starting xend, all
the rest should stay.

On 01/17/2012 05:18 PM, Mike McClurg wrote:
> I think it would be best if we could create a file /etc/default/xen
> that would let us switch between the xm, xl and xapi toolstacks.

This file already exists!!!

By default, it has nothing in the TOOLSTACK= variable, which is
understood as being the same as TOOLSTACK=xm. If you put TOOLSTACK=xl in
it, then it's xl that is used, and "xm list" (for example) will return:

ERROR:  A different toolstack (xl) have been selected!

The same will happen the other way (eg: xl list will fail if TOOLSTACK
contains "xm" or nothing in it).

> Until
> then, do you think it would be best to copy the required parts of
> xend.init into xcp-xapi.init? Are there any other solutions that we're
> overlooking?

No, that's *not* the solution. The solution is to patch xen-commons,
which I just did (see attached patch for
xen-common-4.1.2/debian/xen-utils-common.xend.init).

By the way, I have proposed to have TOOLSTACK to be configured by
debconf, but Bastian rejected it because he thinks that I shouldn't be
rewriting the /etc/default/xen file. I'm ok with that, but I think that
a sed would be a weaker way, so I asked what Bastian though we should
do, and had no reply to this question. I don't mind doing:

TMPFILE=`mktemp`
grep -v "^TOOLSTACK=" /etc/default/xen >${TMPFILE}
echo "TOOLSTACK=${TOOLSTACK}" >>${TMPFILE}
cat <${TMPFILE} >/etc/default/xen
rm ${TMPFILE}

if you think it's better than just:

echo "# Configuration for Xen system
# ----------------------------

# There exists several tool stacks to configure a Xen system.
#
# Attention: You need to reboot after changing this!
TOOLSTACK=${TOOLSTACK}
" >/etc/default/xen

Please Bastian, let me know what you think, so that this can get
included in the next upload of xen-utils-common.

In the mean while, please accept the attached patch for not starting
xend if TOOLSTACK is "xm" or empty.

I'm doing a retitle of this bug, and I'm assigning it to
xen-utils-common instead of xcp-xapi, which is doing nothing wrong.

Cheers,

Thomas Goirand (zigo)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xen-utils-common.xend.init.patch
Type: text/x-diff
Size: 890 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20120118/944b7a9a/attachment-0001.patch>


More information about the Pkg-xen-devel mailing list