Re: [Vserver] setting /proc/sys/kernel/shmmax on the guest (solved)

2007-03-08 Thread Adrian Reyer
Thanks to Bertl and daniel_hozac this is solved already.
Most recent util-vserver tools (0.30.213-rcX) from
http://people.linux-vserver.org/~dhozac/t/uv-testing/ can do this.
Just create files
/etc/vservers//sysctl//{setting,value}
holding the key and the value.

E.g. here it looks like this to change shmmax:
# cat /etc/vservers/testguest/sysctl/kernel.shmmax/setting 
kernel.shmmax
# cat /etc/vservers/testguest/sysctl/kernel.shmmax/value   
2147483648

Regards,
_are_
-- 
LiHAS - Adrian Reyer Fon:  +49 (7 11) 78 28 50 90
Krehlstraße 1 - D-70563 StuttgartFax:  +49 (7 11) 78 28 50 91
 [EMAIL PROTECTED] - http://lihas.de
Linux, Netzwerke, Consulting & Support   USt-ID: DE 227 816 626 Stuttgart
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] setting /proc/sys/kernel/shmmax on the guest

2007-03-07 Thread Adrian Reyer
On Tue, Jan 02, 2007 at 03:47:35AM +0100, Daniel Hokka Zakrisson wrote:
> >>Could somebody tell me how to modify the guest config to execute "echo
> for this particular problem. Having a non-executable one that does 
> something like
> VSERVER_EXTRA_CMDS=( $_CHAINECHO /proc/sys/kernel/shmmax 134217728 )
> is probably the only way to make it happen (with current tools).

I am just running into this very same problem. However, if the above
is a solution I don't understand it.
So far I tried adding this line to prepre-start and making
prepre-start executable as well as just setting this as an environment
variable before calling the vserver start.
Both ways result in just no shmmax changed.
For another attempt I added to vserver.start above the
"[EMAIL PROTECTED]" \
an
$_CHAINECHO /proc/sys/kernel/shmmax 134217728 -- \

unfortunately this stops the vserver from starting and I actually
don't understand what parameters would be correct for the chain-echo.

Regards,
_are_
-- 
LiHAS - Adrian Reyer Fon:  +49 (7 11) 78 28 50 90
Krehlstraße 1 - D-70563 StuttgartFax:  +49 (7 11) 78 28 50 91
 [EMAIL PROTECTED] - http://lihas.de
Linux, Netzwerke, Consulting & Support   USt-ID: DE 227 816 626 Stuttgart
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] gateway in vserver

2004-12-30 Thread Adrian Reyer
On Thu, Dec 30, 2004 at 02:14:28PM -0500, sergey ivanov wrote:
> Is it possible to start context 0 without connection to internet, and 
> then start vserver to be a gateway? So that default route in context 0 
> and all other will be to the alias of eth1, which gateway vserver is 
> attached to, and in this vserver to set up dhcp connection on eth0 and 
> route default to this connection?
> I do not understand, if routing should be done in context 0, so it 
> should be delayed till dhcp connection be established, and rerouted each 
> time IP is changed. Or it may be delegated to vserver?

To my understanding, context 0 can always access all interfaces and is
the context that sets up routing. So no, you can't prevent context 0
from having a gateway. And same time nothing will prevent you from
setting up the default routing via eth1. I the other machines have no
eth1 access, you need to alter their outgoing IP via SNAT.
Might ofc be wrong, but then someone will reply and I will get it
right myself, too ;)

Regards,
Adrian
-- 
LiHAS - LinuxHaus Stuttgart  Fon:  +49 (7 11) 2 85 19 05
Inh.: Adrian Reyer   Fax:  +49 (7 11) 5 78 06 92
 Mail: [EMAIL PROTECTED]
Linux, Netzwerke, Consulting & Support   http://lihas.de/
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] Syslog and vserver

2004-12-28 Thread Adrian Reyer
On Tue, Dec 28, 2004 at 07:19:50PM +0100, Oliver Welter wrote:
> What is the best way to use syslog inside the vServers - is it possible 
> to have one Logfile on the main maschine that collects all information ? 
> Whats the best way to do so ? Sharing a syslock socket ? Creating a 
> syslog instance fpr each vServer and using network-feature of syslog ?

No idea about the 'best' way, I set up an exra vsrver as loghost and
all other syslogs log there. The host has a seperate syslog to another
machine as I had to debug some hardware/driver issues here that are not
yet confirmed to be fixed

Regards,
Adrian
-- 
LiHAS - LinuxHaus Stuttgart  Fon:  +49 (7 11) 2 85 19 05
Inh.: Adrian Reyer   Fax:  +49 (7 11) 5 78 06 92
 Mail: [EMAIL PROTECTED]
Linux, Netzwerke, Consulting & Support   http://lihas.de/


signature.asc
Description: Digital signature
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


[Vserver] xid /proc/net trouble and /proc/meminfo strangeness

2004-12-22 Thread Adrian Reyer
Hi there,

it gets increasingly strange with /proc here.
The first symptoms had been for me to be unable to access /proc/net
(e.g. ifconfig) from the master server. Now I have enabled
CONFIG_VSERVER_DEBUG=y
and am able to see with e.g. dmesg what happens:

vxW: xid=0 did lookup hidden 0101fc438058[#106,4026531861] »/proc/net«.

It looks to me like #106 is a contextid, and indeed, if I 'vserver
enter' that server, I have a working ifconfig and can access
/proc/net. I have no idea how to give /proc/net back to xid 0 or why
it gets messed up.
However, xid of /proc/net at least remains the same. If I stop the
vservers, I see this about /proc/meminfo in my log:
Dec 22 09:43:11 localhost kernel: vxW: xid=106 did lookup hidden 
0101ffdf8b98[#103,4026531842] /proc/meminfo.
Dec 22 09:43:11 localhost kernel: vxW: xid=103 did lookup hidden 
0101f0e2add8[#101,4026531842] /proc/meminfo.
Dec 22 09:43:11 localhost kernel: vxW: xid=104 did lookup hidden 
0101f0e2add8[#103,4026531842] /proc/meminfo.
Dec 22 09:43:13 localhost kernel: vxW: xid=101 did lookup hidden 
0101f6c02dd8[#102,4026531842] /proc/meminfo.

It looks to me like /proc/meminfo has always the wrong xid for the
processes accessing it and always different ones.

Anyone with a hint here?

Regards,
Adrian
-- 
LiHAS - LinuxHaus Stuttgart  Fon:  +49 (7 11) 2 85 19 05
Inh.: Adrian Reyer   Fax:  +49 (7 11) 5 78 06 92
 Mail: [EMAIL PROTECTED]
Linux, Netzwerke, Consulting & Support   http://lihas.de/
___
Vserver mailing list
[EMAIL PROTECTED]
http://list.linux-vserver.org/mailman/listinfo/vserver


[Vserver] Re: vsched segfault (and workaround ;)

2004-12-20 Thread Adrian Reyer
On Mon, Dec 20, 2004 at 09:57:59PM +0100, Enrico Scholz wrote:
> > as pointed out by Hollow, confirmed by me and workarounded by Bertl,
> > vsched with hard limits segfaults after setting the values.  by ading
> > '-- true' to the command line, it stops segfaulting while continue
> > working correctly.
> Sorry, can not reproduce it. Can you give an example please?

Sure, happens here on amd64, Hollow has it on i386. I myself use
2.6.10-rc3-vs1.9.3.11:
# vsched --xid 49161 --fill-rate 2 --interval 100 --tokens 499 --tokens-min 1 
--tokens-max 999 --prio-bias 0
Segmentation fault
# vsched --xid 49161 --fill-rate 2 --interval 100 --tokens 499 --tokens-min 1 
--tokens-max 999 --prio-bias 0 -- true
#

Both methods set the values correctly according to '# cat
/proc/virtual/49161/sched'

I attach an strace of the failed call:

# strace vsched --xid 49161 --fill-rate 2 --interval 100 --tokens 499 
--tokens-min 1 --tokens-max 999 --prio-bias 0
execve("/usr/sbin/vsched", ["vsched", "--xid", "49161", "--fill-rate", "2", 
"--interval", "100", "--tokens", "499", "--tokens-min", "1", "--tokens-max", 
"999", "--prio-bias", "0"], [/* 15 vars */]) = 0
uname({sys="Linux", node="master1a", ...}) = 0
brk(0)  = 0x502000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x2a9556a000
access("/etc/ld.so.nohwcap", F_OK)  = -1 ENOENT (No such file or directory)
open("/etc/ld.so.preload", O_RDONLY)= -1 ENOENT (No such file or directory)
open("/usr/lib/tls/x86_64/libvserver.so.0", O_RDONLY) = -1 ENOENT (No such file 
or directory)
stat("/usr/lib/tls/x86_64", 0x7fb1e0) = -1 ENOENT (No such file or 
directory)
open("/usr/lib/tls/libvserver.so.0", O_RDONLY) = -1 ENOENT (No such file or 
directory)
stat("/usr/lib/tls", 0x7fb1e0)  = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64/libvserver.so.0", O_RDONLY) = -1 ENOENT (No such file or 
directory)
stat("/usr/lib/x86_64", 0x7fb1e0)   = -1 ENOENT (No such file or directory)
open("/usr/lib/libvserver.so.0", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0006\0\0"..., 640) = 640
fstat(3, {st_mode=S_IFREG|0755, st_size=638544, ...}) = 0
mmap(NULL, 1088368, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2a9566c000
mprotect(0x2a95675000, 1051504, PROT_NONE) = 0
mmap(0x2a9576c000, 40960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0) = 
0x2a9576c000
close(3)= 0
open("/usr/lib/libc.so.6", O_RDONLY)= -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)  = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=14059, ...}) = 0
mmap(NULL, 14059, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2a95776000
close(3)= 0
access("/etc/ld.so.nohwcap", F_OK)  = -1 ENOENT (No such file or directory)
open("/lib/libc.so.6", O_RDONLY)= 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0`\324\1\0"..., 640) = 640
fstat(3, {st_mode=S_IFREG|0644, st_size=1294400, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x2a9577a000
mmap(NULL, 2353800, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2a9577b000
mprotect(0x2a9589d000, 1165960, PROT_NONE) = 0
mmap(0x2a9597b000, 241664, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 
0x10) = 0x2a9597b000
mmap(0x2a959b6000, 14984, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2a959b6000
close(3)= 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x2a959ba000
arch_prctl(0x1002, 0x2a959ba090)= 0
munmap(0x2a95776000, 14059) = 0
vserver(0, 0x3f, 0, 0, 0)   = 65572
vserver(0xe010003, 0xc009, 0x7fbac0, 0x2, 0) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

Regards,
Adrian
-- 
LiHAS - LinuxHaus Stuttgart  Fon:  +49 (7 11) 2 85 19 05
Inh.: Adrian Reyer   Fax:  +49 (7 11) 5 78 06 92
 Mail: [EMAIL PROTECTED]
Linux, Netzwerke, Consulting & Support   http://lihas.de/
___
Vserver mailing list
[EMAIL PROTECTED]
http://list.linux-vserver.org/mailman/listinfo/vserver


[Vserver] vsched segfault (and workaround ;)

2004-12-20 Thread Adrian Reyer
Hi there,

as pointed out by Hollow, confirmed by me and workarounded by Bertl,
vsched with hard limits segfaults after setting the values.
by ading '-- true' to the command line, it stops segfaulting while
continue working correctly.

Regards,
Adrian
-- 
LiHAS - LinuxHaus Stuttgart  Fon:  +49 (7 11) 2 85 19 05
Inh.: Adrian Reyer   Fax:  +49 (7 11) 5 78 06 92
 Mail: [EMAIL PROTECTED]
Linux, Netzwerke, Consulting & Support   http://lihas.de/
___
Vserver mailing list
[EMAIL PROTECTED]
http://list.linux-vserver.org/mailman/listinfo/vserver


[Vserver] Opteron, debian-amd64, util-vserver compile bug and workaround

2004-12-15 Thread Adrian Reyer
Hi,

when I tried to compile util-vserver-0.30.196, i got this error:
src/keep-ctx-alive.c: In function `doit':
src/keep-ctx-alive.c:145: error: `__arr' undeclared (first use in this function)
src/keep-ctx-alive.c:145: error: (Each undeclared identifier is reported only 
once
src/keep-ctx-alive.c:145: error: for each function it appears in.)
make[2]: *** [src/keep-ctx-alive.o] Error 1
make[2]: Leaving directory `/usr/local/src/util-vserver-0.30.196'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/util-vserver-0.30.196'
make: *** [all] Error 2

digging through the various header files I found all definitions to be
in place, so i renamed the variable fd_set to fd_set1 (still type
fd_set) to check which part of the line, the variable or the makro,
actually raised the error in the function doit(). Surprisingly the
error had been gone. The result worked fine. Changing back to original
version produced the error again.
In my understanding of C, there is no difference between the version,
seems for the compiler there is one anyway.

Version info:
# gcc -v
Reading specs from /usr/lib/gcc-lib/x86_64-linux/3.3.5/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang
--prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared
--with-system-zlib --enable-nls --without-included-gettext
--enable-__cxa_atexit --enable-clocale=gnu --enable-debug
--enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc
--disable-multilib x86_64-linux
Thread model: posix
gcc version 3.3.5 (Debian 1:3.3.5-3)

# uname -a
Linux master1a 2.6.9-vs1.9.3 #1 SMP Wed Dec 15 11:21:46 UTC 2004 x86_64 
GNU/Linux

Bertl suggested to test the result of compiling
typedef int karli;
int main(int argc, char *argv[])
{
karli karli = 7;
exit(karli);
}
However, this didn't produce the error.

The system is a dual Opteron running a 64bit AMD-Opteron optimized
Kernel, the distribution is Debians unofficial unstable (sid) amd64
version

Probably this should go to some gcc-dev list, too.

Regards,
Adrian
-- 
LiHAS - LinuxHaus Stuttgart  Fon:  +49 (7 11) 2 85 19 05
Inh.: Adrian Reyer   Fax:  +49 (7 11) 5 78 06 92
 Mail: [EMAIL PROTECTED]
Linux, Netzwerke, Consulting & Support   http://lihas.de/
___
Vserver mailing list
[EMAIL PROTECTED]
http://list.linux-vserver.org/mailman/listinfo/vserver