From: Boris Derzhavets Subject: Re: issues with running xend init.d script Date: Thu, 17 Sep 2009 08:13:00 -0700 (PDT) Message-ID: <88567.46359.qm@web56106.mail.re3.yahoo.com> References: <19122.17163.791643.649760@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0491540433==" Return-path: In-Reply-To: <19122.17163.791643.649760@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Michael J Coss , Ian Jackson Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --===============0491540433== Content-Type: multipart/alternative; boundary="0-1634106248-1253200380=:46359" --0-1634106248-1253200380=:46359 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable >This is now done in xen-unstable's /etc/init.d/xend.=A0 It might be >worth backporting this as evidently people are having trouble with >older trees (I assume you're on 3.4?) Script /etc/init.d/xend in 3.4.1=A0 looks like :- . . . . . . . . /etc/rc.d/init.d/functions if [ ! -d /proc/xen ]; then =A0=A0=A0=A0=A0=A0=A0 exit 0 fi if ! grep -q "control_d" /proc/xen/capabilities ; then =A0=A0=A0=A0=A0=A0=A0 exit 0 fi ******************** Changeset 20185 ******************** @@ -21,6 +21,15 @@ =20 shopt -s extglob test -f /etc/sysconfig/xend && . /etc/sysconfig/xend + +if test "x$1" =3D xstart && \ + test -d /proc/xen && \ + ! test -d /proc/xen/capabilities && \ + grep '=09xenfs$' /proc/filesystems >/dev/null && \ + ! grep '^xenfs ' /proc/mounts >/dev/null; +then +=09mount -t xenfs xenfs /proc/xen +fi =20 if ! grep -q "control_d" /proc/xen/capabilities ; then =09exit 0 It seems that some other CSs ( which ones ?) from Xen Unstable have to be b= ackported as well before 20185.=20 Boris. --- On Thu, 9/17/09, Ian Jackson wrote: From: Ian Jackson Subject: Re: [Xen-devel] issues with running xend init.d script To: "Michael J Coss" Cc: "xen-devel@lists.xensource.com" Date: Thursday, September 17, 2009, 10:09 AM Michael J Coss writes ("[Xen-devel] issues with running xend init.d script"= ): > The first issue was that xend wants to check the Xen is running, and=20 > does that by checking /proc/xen/capabilities, which requires xenfs to be= =20 > mounted.=A0 It was not in the fstab, and so wasn't mounted.=A0 This shoul= d=20 > probably should be in the install setup somewhere, or maybe the first=20 > time the xend is run, it checks to see if it's mounted and if it isn't=20 > tries to mounts it and adds an entry to fstab if successful.=20 This is now done in xen-unstable's /etc/init.d/xend.=A0 It might be worth backporting this as evidently people are having trouble with older trees (I assume you're on 3.4?) > The second issue was that the script network-bridge didn't handle my=20 > network interfaces properly.=A0 I tracked down the problem to the fact=20 > that the script, in the function get_ip_info() uses "ip addr show dev"=20 > to get the ip address and broadcast address.=A0 Unfortunately on my=20 > machine, I have ipv6 configured, and so there is a second inet line for= =20 > the link local ipv6 address.=A0 As a temporary hack, I added "scope=20 > global" to the ip command, and the network is setup albeit without=20 > ipv6.=A0 This certainly isn't a real fix, but does fix the case where the= =20 > ipv6 is only a local address. If you'd like to provide a patch for the script, we'd all be grateful :-). Ian. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel =0A=0A=0A --0-1634106248-1253200380=:46359 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
>This is now done in xen-unstable's /etc/i= nit.d/xend.  It might be
>worth backporting this as evidently pe= ople are having trouble with
>older trees (I assume you're on 3.4?)
Script /etc/init.d/xend in 3.4.1  looks like :-
. . . . . . .=

. /etc/rc.d/init.d/functions

if [ ! -d /proc/xen ]; then
=         exit 0
fi
if ! grep -q "co= ntrol_d" /proc/xen/capabilities ; then
     &nb= sp;  exit 0
fi
********************
Changeset 20185
******= **************
@@ -21,6 +2=
1,15 @@

shopt -s extglob
test -f /etc/sysconfig/xend &a= mp;& . /etc/sysconfig/xend
+
+if test "x$1" =3D xstart && \
+ test -d /proc/xen && \
+ ! test -d /proc/xen/capabilities && \
+ grep '=09xenfs$' /proc/filesystems >/de= v/null && \
+ ! grep '^xenfs '= /proc/mounts >/dev/null;
+then
+=09mount -t xenfs xenfs /proc/xen
= +fi

if ! grep -q "control_d" /proc= /xen/capabilities ; then
=09exit 0
It seems that some other CS= s ( which ones ?) from Xen Unstable have to be backported as well before 20= 185.

Boris.

--- On Thu, 9/17/09, Ian Jackson <Ian.J= ackson@eu.citrix.com> wrote:

Fro= m: Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: [Xen-devel= ] issues with running xend init.d script
To: "Michael J Coss" <mjcoss@alcatel-luce= nt.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xenso= urce.com>
Date: Thursday, September 17, 2009, 10:09 AM

Michael J Coss writes ("[Xen-devel] issues with running x= end init.d script"):
> The first issue was that xend wants to check t= he Xen is running, and
> does that by checking /proc/xen/capabilitie= s, which requires xenfs to be
> mounted.  It was not in the fst= ab, and so wasn't mounted.  This should
> probably should be in= the install setup somewhere, or maybe the first
> time the xend is = run, it checks to see if it's mounted and if it isn't
> tries to mou= nts it and adds an entry to fstab if successful.

This is now done i= n xen-unstable's /etc/init.d/xend.  It might be
worth backporting t= his as evidently people are having trouble with
older trees (I assume you're on 3.4?)

> The second issue was that the script ne= twork-bridge didn't handle my
> network interfaces properly.  I= tracked down the problem to the fact
> that the script, in the func= tion get_ip_info() uses "ip addr show dev"
> to get the ip address a= nd broadcast address.  Unfortunately on my
> machine, I have ip= v6 configured, and so there is a second inet line for
> the link loc= al ipv6 address.  As a temporary hack, I added "scope
> global"= to the ip command, and the network is setup albeit without
> ipv6.&= nbsp; This certainly isn't a real fix, but does fix the case where the
= > ipv6 is only a local address.

If you'd like to provide a patch = for the script, we'd all be grateful
:-).

Ian.

___________= ____________________________________
Xen-devel mailing list
Xen-devel@lists.xe= nsource.com
http://lists.xensource.com/xen-devel
=

=0A=0A --0-1634106248-1253200380=:46359-- --===============0491540433== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0491540433==--