Re: [Vserver] hostname -va

From: Herbert Poetzl <herbert_at_13thfloor.at>
Date: Thu 16 Nov 2006 - 18:28:50 GMT
Message-ID: <20061116182850.GB25583@MAIL.13thfloor.at>

On Thu, Nov 16, 2006 at 08:02:38AM +0100, Daniel Haensse wrote:
>
> > inside of what vserver :) i.e. please provide
> > a few more details, like kernel version, tool version
> > and such
> >
> >
> vserver1:/# uname -va
> Linux vserver1.foobar.com 2.6.17-2-vserver-amd64 #1 SMP Wed Sep 13
> 18:02:36 CEST 2006 x86_64 GNU/Linux
> virtual:~# vserver --version
> vserver 0.30.211 -- manages the state of vservers
> This program is part of util-vserver 0.30.211
>
> It's a debian etch system installed last week, so it should
> be up to date

well, I have no idea what vserver version is in that kernel,
but let's hope the debian folks made a good choice ...

> > let's see ...
> >
> come on :-)
> > that one would be quite interesting to get
> > the strace from, please try something like
> >
> > strace -fF hostname -va
> >
> vserver1:/# strace -fF hostname -va
> execve("/bin/hostname", ["hostname", "-va"], [/* 15 vars */]) = 0
> uname({sys="Linux", node="vserver1.foobar.com", ...}) = 0
> brk(0) = 0x503000
...
> uname({sys="Linux", node="vserver1.foobar.com", ...}) = 0
> gettimeofday({1163656218, 118761}, NULL) = 0
> getpid() = 6611
> open("/etc/resolv.conf", O_RDONLY) = 3
...
> open("/etc/nsswitch.conf", O_RDONLY) = 3
> fstat(3, {st_mode=S_IFREG|0644, st_size=475, ...}) = 0
...
> socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
> connect(3, {sa_family=AF_INET, sin_port=htons(53),
> sin_addr=inet_addr("129.132.98.12")}, 28) = 0
...
> Looks like it is not happy /etc/hosts and the local dns server is
> misconfigured. Why does it resolve the name with dns when it finds a
> /etc/hosts?

that is part of the resolve mechanisms of libc
(read: you have to consult the config e.g. /etc/nsswitch.conf
and talk to the debian folks, if it doesn't do what it's
supposed to do)

> > and provide the output ...
> >
> >> vserver1:/# cat /etc/resolv.conf
> >> search foobar.com
> >> nameserver 192.168.5.5
> >> nameserver 129.132.98.12
> >> nameserver 129.132.250.2
> >> nameserver 129.132.250.220
> >
> > IIRC, this won't work as expected, as you can
> > only specify 3 nameservers in /etc/resolv.conf
> >
> Sure, is there a way to update this automatically from the hosts
> (virtual) configuration (dhcp)

basically you could setup a dhcp (on the host) and
send out requests with some identifier (guest) to
reiceive answers and then parse them and write them
into the file ... OTOH you could simply remove one
of them from the guest :)

HTH,
Herbert

> regards Dani
>
> _______________________________________________
> Vserver mailing list
> Vserver@list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Thu Nov 16 18:30:20 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Thu 16 Nov 2006 - 18:30:25 GMT by hypermail 2.1.8