Re: [Vserver] Host and guest compatability

From: Michael S. Zick <mszick_at_morethan.org>
Date: Wed 09 Aug 2006 - 17:51:01 BST
Message-Id: <200608091151.02023.mszick@morethan.org>

On Wed August 9 2006 10:56, Jim Wight wrote:
> On Wed, 2006-08-09 at 09:58 -0500, Michael S. Zick wrote:
> > On Wed August 9 2006 09:30, Jim Wight wrote:
> > > On Wed, 2006-08-09 at 08:50 -0500, Michael S. Zick wrote:
> > > > Since the chroot command does not change the context (or namespace) then
> > > > it must be the act of trying to run in a different context that breaks
> > > > something.
> > > >
> > > > My guess, the dynamic library handling.
> > > >
> > > > Try executing /lib/libc.so.6 in the guest context, see if you get a
> > > > normal report out of it. It should print its build information,
> > > > including its version.
> > >
> > > What command is required to accomplish that?
> > >
> >
> > The file libc.so.6 is an executable.
> >
> > Just substitute "/lib/libc.so.6" for where you are using "/usr/bin/env"
> > in your testing.
>
> OK. I changed the value of _ENV in util-vserver-vars, which results in
>
> # vserver fc5 start
> GNU C Library development release version 2.3.5, by Roland McGrath et
> al.

Oops.

> Copyright (C) 2005 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
> Compiled by GNU CC version 4.0.1 20050727 (Red Hat 4.0.1-5).
> Compiled on a Linux 2.4.20 system on 2005-08-15.
> Available extensions:
> GNU libio by Per Bothner
> crypt add-on version 2.1 by Michael Glad and others
> Native POSIX Threads Library by Ulrich Drepper et al
> The C stubs add-on version 2.1.2.
> BIND-8.2.3-T5B
> NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
> Glibc-2.0 compatibility add-on by Cristian Gafton
> GNU Libidn by Simon Josefsson
> Thread-local storage support included.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/libc/bugs.html>.
> vshelper.init: can not determine xid of vserver 'fc5'; returned value
> was ''
>
> which is what executing /lib/libc.so.6 on the (FC4) host gives.
> Presumably you would expect the output to be the same as
>
> # chroot /vservers/fc5 /lib/libc.so.6
> GNU C Library development release version 2.4, by Roland McGrath et al.
>

Super!

> Copyright (C) 2006 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
> Compiled by GNU CC version 4.1.0 20060304 (Red Hat 4.1.0-3).
> Compiled on a Linux 2.6.9 system on 2006-05-12.
> Available extensions:
> The C stubs add-on version 2.1.2.
> crypt add-on version 2.1 by Michael Glad and others
> GNU Libidn by Simon Josefsson
> GNU libio by Per Bothner
> NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
> Native POSIX Threads Library by Ulrich Drepper et al
> BIND-8.2.3-T5B
> Thread-local storage support included.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/libc/bugs.html>.
>
> > Or build your own command out of the low level tools, similar too:
> >
> > chbind --ip ${VADDRESS} -- vcontext --create --xid ${VID} --chroot -- \
> > /usr/bin/env -i HOSTNAME=${VROOT} HOME=/root TERM="${TERM}" PS1='\u:\w\$ ' \
> > PATH='/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin' /bin/bash --login +h
>
> Like this
>
> # cd /vservers/fc5
> # vcontext --create --xid 49142 --chroot -- /usr/bin/env -i HOME=/root
> PATH='/bin:/sbin:/usr/bin:/usr/sbin' /bin/bash --login +h
> New security context is 49142
> [root@turing /]# cat /etc/redhat-release
> Fedora Core release 5 (Bordeaux)
> [root@turing /]# /lib/libc.so.6
> GNU C Library development release version 2.4, by Roland McGrath et al.
> Copyright (C) 2006 Free Software Foundation, Inc.
>

You got it and I don't see any complaints from "env", "bash", the loader,
or libc.so.6.

Now the only question is why the high-level tools have a problem starting
your vserver.

Sorry, I can't help with the "why", but you have a shell in the virtual
context to work from. First would probably be to run /sbin/ldconfig.

Major difference here is the various configuration files that the
high-level scripts use. These low-level commands aren't referencing them.

Mike
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Wed Aug 9 17:51:31 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 09 Aug 2006 - 17:51:37 BST by hypermail 2.1.8