[Vserver] rebooting from inside

2006-10-09 Thread Mehdi Bennani

Hello,

I'm trying to reboot from inside a vserver.

===With sysv init style:

test:/# reboot

Broadcast message from root (pts/1) (Mon Oct  9 09:45:00 2006):

The system is going down for reboot NOW!
shutdown: timeout opening/writing control channel /dev/initctl
init: timeout opening/writing control channel /dev/initctl
test:/#

Doesn't do it...

===With plain init style:

test:/home/admin# reboot

Broadcast message from root (pts/1) (Mon Oct  9 09:47:12 2006):

The system is going down for reboot NOW!

ssh disconnects but vserver doesn't come up again...

On the guest:

vserver:~# vserver-stat
CTX   PROCVSZ  RSSuserTIME   sysTIMEUPTIME NAME
0   62140.5M  42.6M   2m40s20   3m50s28   3d00h33 root server
112.2M  1.1M 4m12s85   8m07s79   3d00h28
monitoring server
65   10.4M 2.7M 0m00s30   0m00s64   3d00h32 vszope6
26   1   1.5M  528K 0m00s28   0m00s22   2m12s82 test26
 --- still there, one process left!


Trying to stop it:

vserver:~# vserver test26 stop
A timeout occured while waiting for the vserver to finish and it will
be killed by sending a SIGKILL signal. The following process list
might be useful for finding out the reason of this behavior:

--
3100026 test26?Ss 0:00 init [6]
--

... It looks like the vserver init doesn't stop by itself and gets stuck.

reboot -f gives the same result on both init styles
CAP_SYS_BOOT is set in /etc/vservers/test26/bcapabilities
time-out is set to 120 in /etc/vservers/test26/apps/vshelper/sync-timeout





Any idea?
Thanks a lot

Mehdi Bennani




=
System info:
Debian sarge

vserver:~# /usr/sbin/vserver-info
Versions:
  Kernel: 2.6.17-2-vserver-686
  VS-API: 0x00020002
util-vserver: 0.30.211; Oct  8 2006, 14:51:45
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] rebooting from inside

2006-10-09 Thread Mehdi Bennani


 reboot -f gives the same result on both init styles

Interesting, even with sysv? What is left in the guest at that point?


Actually, with sysv, reboot -f doesn't return any error but the
vserver doesn't reboot
(ssh session isn't interrupted and the uptime shown by vserver-stat on
the host doesn't go back to zero).




What distribution are you running in your guest?


Debian Sarge built with vserver NAME build -m debootstrap -- -d sarge.


Thanks,

Mehdi Bennani
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] rebooting from inside

2006-10-09 Thread Mehdi Bennani

 Actually, with sysv, reboot -f doesn't return any error but the
 vserver doesn't reboot
 (ssh session isn't interrupted and the uptime shown by vserver-stat on
 the host doesn't go back to zero).

Hmm. How did you install the utils? Did you install them by hand? If so,
did you remember to run make install-distribution? (which would install
/sbin/vshelper, the program that executes reboots on behalf of guests)


The utils 0.30.210 were installed with apt.
I just uninstalled it and dpkg'ed the new 0.30.211, hoping it would
help but nope...
/sbin/vshelper is a soft link to /usr/lib/util-vserver/vshelper
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] rebooting from inside

2006-10-09 Thread Mehdi Bennani

Sorry! There was a file named disabled in
/etc/vservers/.defaults/apps/vshelper/
I deleted it and now it works well in both init styles.
Thank you for your help.

Best regards,

Mehdi Bennani
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] lvremove: Can't remove open logical volume

2006-09-19 Thread Mehdi Bennani

Hello, thanks a lot for your answer.


You can see this message posted by Daniel Hokka Zakrisson :
http://archives.linux-vserver.org/200607/0139.html . His web site has this
patch and some others. The debian package integrates it with others.



I tried to apply the patch over 0.30.210 source and recompile, but the
problem is still here.
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] lvremove: Can't remove open logical volume

2006-09-19 Thread Mehdi Bennani
Hi Christian and Rik,

Thank you for the umounting in all namespaces solution, it seems to partially solve the problem. But, for a reason I can't understand, some logical volunes still remain open even after performing vnamespace -e [xid] umount for each running context.


Best regards,Mehdi
2006/9/15, Christian Affolter [EMAIL PROTECTED]:
 Try to unmount your volume for each active name space: vnamespace -e [namespace of context xid] umount /your/lvm/volume
 Thanks a lot, but my lv's are the root of each vserver so I have to stop them before umounting, then the namespace is no longer in use and I get: vnamespace: vc_enter_namespace(): No such process
You will have to unmount the lvms in all the _remaining_ name spaces...Use vserver-stat to list all running vservers (active name spaces) andperform vnamespace -e [xid] umount for each one.___
Vserver mailing listVserver@list.linux-vserver.orghttp://list.linux-vserver.org/mailman/listinfo/vserver

___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] lvremove: Can't remove open logical volume

2006-09-19 Thread Mehdi Bennani

 SOLVED ! ! ! 

Hi all,

I just found out that
vnamespace -e [namespace of context xid] umount /your/lvm/volume
must be performed TWO times in each namespace:

-with /your/lvm/volume as the mountpoint, i.e /vservers/vs01
-with /your/lvm/volume as the lvm device, i.e /dev/volume1/vs01

Then I have to umount BOTH mountpoint and lvm device on the host
system for the lvremove command to work.

Again, thank you so much for your help and for your work on the vserver project!


Best regards,



Mehdi Bennani
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


[Vserver] lvremove: Can't remove open logical volume

2006-09-15 Thread Mehdi Bennani
Hello,
I am setting up a host with LVM volumes for each vserver.
I made scripts for vserver creation which include on-the-fly Logical Volume creation, formating and mount, that works pretty well.
Things are getting worse when I try to delete a Logical Volume after having the vserver stopped and its partition umounted:
I randomly get this error:
Can't remove open logical volume
Here are basic examples of the scripts:
CREATIONusage:vcreate [name]
#!/bin/bashlvcreate -L5000 -n$1 vg0mkreiserfs -f /dev/vg0/$1mkdir /vservers/$1mount /dev/vg0/$1 /vservers/$1vserver $1 build -m skeleton 


DELETIONusage:vdelete [name]
#!/bin/bashvserver $1 stoplsof /vservers/$1umount -f /vservers/$1lvremove -f /dev/vg0/$1
The Logical Volume seems actually umounted because cat /proc/mounts doesn't mention it, but *something* is still using it and I cannot figure out what.
A reboot of the host corrects the problem but I can't reboot the whole system each time I need to delete a vserver.
I have found a log chat at http://irc.13thfloor.at/LOG/2006-04/LOG_2006-04-22.txt
 where someone was experiencing exaclty the same problem but no solution was found at the moment. 
Thanks in advance for any help or ideas!
Regards,
Mehdi Bennani

=system info==
vserver:~# vserver-infoVersions: Kernel: 2.6.12lvs VS-API: 0x00020001 util-vserver: 0.30.210; Jun 11 2006, 14:57:10
Features: CC: gcc, gcc (GCC) 3.3.5 (Debian 1:3.3.5-13) CXX: g++, g++ (GCC) 3.3.5 (Debian 1:3.3.5-13) CPPFLAGS: '' CFLAGS: '-Wall -g -O2 -std=c99 -Wall -pedantic -W' 
 CXXFLAGS: '-g -O2 -ansi -Wall -pedantic -W -fmessage-length=0' build/host: i386-pc-linux-gnu/i386-pc-linux-gnu Use dietlibc: yes Build C++ programs: yes
 Build C99 programs: yes Available APIs: compat,v11,fscompat,v13,net,oldproc,olduts ext2fs Source: e2fsprogs syscall(2) invocation: alternative vserver(2) syscall#: 273/glibc 

Paths: prefix: /usr sysconf-Directory: /etc cfg-Directory: /etc/vservers initrd-Directory: $(sysconfdir)/init.d pkgstate-Directory: /var/run/vservers 
 vserver-Rootdir: /var/lib/vservers
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] lvremove: Can't remove open logical volume

2006-09-15 Thread Mehdi Bennani
Hi,


 Try to unmount your volume for each active name space: vnamespace -e [namespace of context xid] umount /your/lvm/volume


Thanks a lot, but my lv's are the root of each vserver so I have to stop them before umounting, then the namespace is no longer in use and I get:
vnamespace: vc_enter_namespace(): No such process


Obviously if I try it before stopping the vserver, I get:umount: /vservers/vtest3: device is busy

Regards,


Mehdi

___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


Re: [Vserver] Cloning a vserver

2006-06-27 Thread Mehdi Bennani
Hi,Have you changed the context numberin /etc/vservers/new/context?As I had lots of trouble changing config stuff when copying, I have a personal way for copy/duplicate:-make a new vserver skeleton named new with right ip, context, etc that way:
vserver [name] build -m skeleton --hostname [hostname] --interface eth0:[ip] --context [context number]-Copy old to new:cp -a /vservers/old/* /vservers/new/-make the dummy interface in /etc/vservers/new/interfaces to have 
127.0.0.1-change config files in /vservers/new/etc/ to fit new ip and hostnameThese steps can be handled by scripts...I am making a report about vserver (in french, with details about installation and management) and should be able to put it online soon, I'll let the list know.
Salutations,Mehdi Bennani2006/6/27, Odile Bénassy [EMAIL PROTECTED]: Hello,  I hope not to disturb with a low-level question, I still hope will be
 useful to others.  I'm very happy with my vservers in general, I must say, and the users too, of course.  I want to copy a vserver into a second one, because the second one will
 run the same software.  So I had an IP .xxx and a name old  And I want a new IP .yyy and a new name new  1) I copied all the /vservers/old to /vservers/new
  2) I copied all the /etc/vservers/old to /etc/vservers/new and also /etc/vservers/old.conf to /etc/vservers/new.conf  3) I went into /etc/vservers/new.conf, into /etc/vservers/new, into
 /vservers/new/etc and change there every string .xxx into .yyy, and old into new  4) I fixed the /etc/vservers/new symlink  Now both vservers can start and stop. I can ping both IPs.
  But if I enter new I am in old.  What do I have left behind?  -- Odile Bénassy, ingénieure informaticienne Service de la Recherche et des Études Doctorales
 Faculté Jean Monnet, Université Paris Sud 11 54 bd Desgranges, 92331 Sceaux Cedex Tél : +33 (0)1 40 91 18 77 - Fax : +33 (0)1 40 91 18 56  ___
 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


[Vserver] vsched and multi-CPU

2006-05-30 Thread Mehdi Bennani

Hello,

I've read the pages about vsched on

http://linux-vserver.org/vsched+explained:
http://linux-vserver.org/Scheduler+Parameters

I'm trying to figure out how vserver deals with multi-processor
systems and systems with hyperthreaded processors (detected as
bi-processor).


and I would like an explanation about something that seems ambigous to me:


--Both pages seem to say that (fill-rate) / (interval) is the
proportion for ONE processor in the system. But a sentence in
http://linux-vserver.org/vsched+explained...:

So, if you have four CPUs and you want one context to get an average
of one whole CPU to itself, then you'd set fill-rate to 1 and interval
to 4.

... is not clear... does it mean that (fill-rate) / (interval) is the
proportion for the FOUR CPU's?

Where is the truth?

--Is a processor with Hyperthreading counted as two processors by vserver?


Thanks,


Mehdi Bennani
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


[vserver] load tests for memory

2006-05-17 Thread Mehdi Bennani

Hello,

As a student, I am making a project about virtualization for dedicated
webservers to be offered to customers.
One important concern is to determinate how many vservers can be
hosted on the same machine, by making load tests.

I have installed collectd and rrd on the host, and one vserver with
apache to serve html pages with processor usage, system load, memory
usage, for the host and the vservers (thanks to the collectd plugin
for vserver and the collectd2html.pl script!).

I have several test vservers with schedule and rlimits, on which I run
memtest to fill completly the memory and see if limitations are
respected and what is system's behavior if total memory rlimits exceed
host's memory.


Is vserver designed to kill processes that try to use more memory than
available on the host system?
I have experienced such behaviour with memtest when total vservers rss
approach total host RAM and trying to start a new memtest on another
vserver:

Allocated 273678336 bytes...trying mlock...Killed

..and cannot determine if memtests exits itself because it cannot lock
pages anymore or if it is killed by the kernel because host RAM is
full?

By the way, I'm not sure memtest is the ideal for what I am trying to
do: fill each vserver allocated memory at its max and see what's
happening, end eventually what happens when swap is starting to be
used, but memtest locks all the pages so swap is never used... Anyone
knows about a more appropriate test software just filling RAM with
loads of data?

Thanks a lot, any help will be welcome.


Mehdi Bennani


=
System info:

Dell 1850 2*Intel Xeon 3Ghz
1G RAM

Debian 3.1 with precompiled 2.6.12lvs kernel and apt-get'ed
util-vserver:  0.30.210

vserver:/# vserver-info
Versions:
  Kernel: 2.6.12lvs
  VS-API: 0x00020001
util-vserver: 0.30.210; Apr 19 2006, 16:06:42
___
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver