WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH] Fix bootloader handling when empty string is bei

To: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] Fix bootloader handling when empty string is being output
From: Michal Novotny <minovotn@xxxxxxxxxx>
Date: Tue, 31 Aug 2010 13:33:18 +0200
Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx>, "'xen-devel@xxxxxxxxxxxxxxxxxxx'" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 31 Aug 2010 04:33:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1283251070.12544.9397.camel@xxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4C7BADAA.9080209@xxxxxxxxxx> <1283244457.12544.9283.camel@xxxxxxxxxxxxxxxxxxxxxx> <4C7CC85A.8070803@xxxxxxxxxx> <4C7CD2D2.9010305@xxxxxxxxxx> <1283249417.12544.9367.camel@xxxxxxxxxxxxxxxxxxxxxx> <4C7CD6FC.2000503@xxxxxxxxxx> <1283251070.12544.9397.camel@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Thunderbird/3.0.4
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<ian.campbell@xxxxxxxxxx>
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.


Thanks Ian! I've tested the patch and it's working fine. You can push it to the tree since it helped me with this one and `xm create -c PVguest` syntax was working fine when applied.

Michal

--
Michal Novotny<minovotn@xxxxxxxxxx>, RHCE
Virtualization Team (xen userspace), Red Hat


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel