From: Jacques Gelinas (jack_at_solucorp.qc.ca)
Date: Wed Nov 21 2001 - 15:55:10 EST
On Wed, 21 Nov 2001 22:20:01 -0500, Robert Lassfolk wrote
> when i try to start a vserver with iproot=192.168.0.2 it doesn't start and
Is it really failing to start ?
> i get this in /var/messages
> modprobe: Can't locate module 192.168.0.2
> same thing happens when i try chbind --ip 192.168.0.2 command.
I just found out this is a cosmetic problem in chbind. It supports
the following usage
/usr/sbin/chbind --ip eth0 command
where eth0 may be any network device. This is convenient to
start services in the root server without having to enter the IP number.
Now, chbind is kind of naive. It pick the --ip argument and ask the
kernel about it, thinking that it might be a network device. Seeing
the kernel fails, it will use gethostbyname to resolve the argument. gethostbyname
accept either a name or an IP number.
This make chbind simple and general. So far so good.
The flaw is in the kernel. A cosmetic flaw. Basically, if you ask the
kernel
"do you have information about network device xxx"
the kernel will say
"no, but let me find out if modprobe can find something
for me".
modprobe fails to locate a driver for xxx, so the kernel return failure and
chbind continue with gethostbyname.
Given the auto-loading of kernel module is transparent to application, there
is no way to tell the kernel not to use modprobe.
The solution is to scan /proc/net/dev to tell if this is a network device or not.
Now, this is a cosmetic bug and I will fix it. But it does not tell that chbind
failed. Something else is happening.
What do you get when you do
/sbin/chbind --ip 1.2.3.4 /bin/sh
(beside the error in /var/log/messages)
You should get
ipv4root is now 1.2.3.4
and a prompt. If you do (at that prompt)
cat /proc/self/status
you must see a line like this
ipv4root: 04030201
If this is the case, then chbind works.
Do you have other error messages ?
> is there some configuration option that i need to set in the kernel, or is
> the problem elsewhere?
No option
---------------------------------------------------------
Jacques Gelinas <jack_at_solucorp.qc.ca>
vserver: run general purpose virtual servers on one box, full speed!
http://www.solucorp.qc.ca/miscprj/s_context.hc
This archive was generated by hypermail 2.1.4 : Mon Aug 19 2002 - 12:01:00 EDT