From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Novotny Subject: Re: [PATCH] Fix bootloader handling when empty string is being output Date: Tue, 31 Aug 2010 13:18:27 +0200 Message-ID: <4C7CE503.5090307@redhat.com> References: <4C7BADAA.9080209@redhat.com> <1283244457.12544.9283.camel@zakaz.uk.xensource.com> <4C7CC85A.8070803@redhat.com> <4C7CD2D2.9010305@redhat.com> <1283249417.12544.9367.camel@zakaz.uk.xensource.com> <4C7CD6FC.2000503@redhat.com> <1283251070.12544.9397.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1283251070.12544.9397.camel@zakaz.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: Ian Campbell Cc: Paolo Bonzini , "'xen-devel@lists.xensource.com'" List-Id: xen-devel@lists.xenproject.org On 08/31/2010 12:37 PM, Ian Campbell wrote: > On Tue, 2010-08-31 at 11:18 +0100, Michal Novotny wrote: > >> On 08/31/2010 12:10 PM, Ian Campbell wrote: >> >>> On Tue, 2010-08-31 at 11:00 +0100, Michal Novotny wrote: >>> >>> >>>> I don't know how it's >>>> working with upstream version since I found out that syntax like `xm >>>> create -c PVguest` with default settings (pyGrub bootloader) doesn't >>>> show the pyGrub at all so I don't know what's wrong with my setup. I'm >>>> using 2.6.32.15-xen kernel/hypervisor version with latest unstable >>>> user-space tools. >>>> >>>> Any hint how this should be working Ian? >>>> >>>> >>> It should be working as you expect, e.g. "xm create -c xxx" should show >>> you the pygrub output, unless you have used something like "--entry=x" >>> or "-q" which disable interactive mode in your bootloader_args. >>> >>> I'm afraid I don't know what is broken, I'm reasonably sure it was >>> working for me when I developed libxl_bootloader.c since I was comparing >>> the two. >>> >>> Ian. >>> >>> >>> >> No Ian, it's not working. The config file is having: >> ... >> bootloader = "/usr/bin/pygrub" >> ... >> So it should show the pyGrub ncurses screen, right? >> > Correct. > > >> But it doesn't show >> anything on version cloned from git yesterday. >> > xen-unstable or xen-4.0-testing or something else? > > It looks like this was broken in xen-unstable with 21994:2e08ec0028e4. > The patch below should fix it. > > Ian. > > Subject: libxl+xend: use correct paths for PV console when running bootloader > > Makes "{xl,xm} create -c GUEST" work again with pygrub in interactive > mode which was broken by 21994:2e08ec0028e4 > > Signed-off-by: Ian Campbell > diff -r f77e54fadc18 tools/libxl/libxl_bootloader.c > --- a/tools/libxl/libxl_bootloader.c Tue Aug 31 09:54:18 2010 +0100 > +++ b/tools/libxl/libxl_bootloader.c Tue Aug 31 11:34:20 2010 +0100 > @@ -383,7 +383,7 @@ int libxl_run_bootloader(libxl_ctx *ctx, > goto out_close; > } > > - dom_console_xs_path = libxl_sprintf(&gc, "%s/serial/0/tty", libxl_xs_get_dompath(&gc, domid)); > + dom_console_xs_path = libxl_sprintf(&gc, "%s/console/tty", libxl_xs_get_dompath(&gc, domid)); > libxl_xs_write(&gc, XBT_NULL, dom_console_xs_path, "%s", dom_console_slave_tty_path); > > pid = fork_exec_bootloader(&bootloader_fd, (char *)info->u.pv.bootloader, args); > diff -r f77e54fadc18 tools/python/xen/util/diagnose.py > --- a/tools/python/xen/util/diagnose.py Tue Aug 31 09:54:18 2010 +0100 > +++ b/tools/python/xen/util/diagnose.py Tue Aug 31 11:34:20 2010 +0100 > @@ -77,7 +77,7 @@ def diagnose_console(): > def diagnose_console(): > port = xstransact.Read(dompath + '/console/port') > ringref = xstransact.Read(dompath + '/console/ring-ref') > - tty = xstransact.Read(dompath + '/serial/0/tty') > + tty = xstransact.Read(dompath + '/console/tty') > > if not port: > print "Console port is missing; Xend has failed." > diff -r f77e54fadc18 tools/python/xen/xend/XendBootloader.py > --- a/tools/python/xen/xend/XendBootloader.py Tue Aug 31 09:54:18 2010 +0100 > +++ b/tools/python/xen/xend/XendBootloader.py Tue Aug 31 11:34:20 2010 +0100 > @@ -85,7 +85,7 @@ def bootloader(blexec, disk, dom, quiet > fcntl.fcntl(m1, fcntl.F_SETFL, os.O_NDELAY) > > slavename = ptsname.ptsname(m1) > - dom.storeDom("serial/0/tty", slavename) > + dom.storeDom("console/tty", slavename) > > # Release the domain lock here, because we definitely don't want > # a stuck bootloader to deny service to other xend clients. > > > Well, the XendBootloader.py part seems to be the one (since I use xend with xm, no xl). I'll test it later. Michal -- Michal Novotny, RHCE Virtualization Team (xen userspace), Red Hat