Outils pour utilisateurs

Outils du site


tof:computer:vserver:upstart_ubuntu_lucid

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révision
Révision précédente
tof:computer:vserver:upstart_ubuntu_lucid [12/07/2010 17:18]
Christophe Boyanique
tof:computer:vserver:upstart_ubuntu_lucid [13/07/2010 11:58]
Christophe Boyanique
Ligne 2: Ligne 2:
  
 This tweak is inspired by [[http://​linux-vserver.org/​Upstart_issues]]. This tweak is inspired by [[http://​linux-vserver.org/​Upstart_issues]].
- 
-Stopping the vserver does not (yet) work correctly: init do not stop services and all processes are killed after a timeout by vserver utils: 
-<​code>​ 
-# vserver <​vservername>​ 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: 
- 
----------------------------------------------------------------------- 
-15816   153 <​vservername> ​ ?   ​Ss ​  0:00 /sbin/init 
-15835   153 <​vservername> ​ ?   ​Ss ​  0:00 dbus-daemon --system --fork 
-15838   153 <​vservername> ​ ?   ​Sl ​  0:00 rsyslogd -c4 
-15847   153 <​vservername> ​ ?   ​Ss ​  0:00 /​usr/​sbin/​sshd 
-15955   153 <​vservername> ​ ?   ​Ss ​  0:00 atd 
--------------------------------------------------------------------- 
-</​code>​ 
- 
-The vserver can be stopped cleanly by going to level 0 in the vserver: 
-<​code>​ 
-vserver <​vservername>​ exec telinit 0 
-</​code>​ 
- 
-<​code>​ 
-19:57 <​@Bertl>​ well, regarding console: you probably don't want 'the console'​ created inside a guest, because that means that  
-               ​upstart (from the guest) will write on your host console (and can read stuff from there too) 
-19:58 <​@Bertl>​ what you want is to put a tty or pts there instead of the console, or if you like to see the output on the  
-               ​current tty just tty 
-19:59 <​@Bertl>​ regarding the stop: your guest seems to ignore the '​normal'​ init signalling which is done when a guest is shut  
-               down 
-19:59 <​@Bertl>​ thus, after a given (configureable) timeout, the guest is killed instead 
-20:00 <​@Bertl>​ util-vserver does not execute stuff inside the guest, it simply sends a signal to init (inside the guest) 
-20:01 <​@Bertl>​ (the singnal is SIGINT, and this equals to the CTRL-ALT-DEL action) 
-</​code>​ 
  
 ===== Choose plain init style ===== ===== Choose plain init style =====
Ligne 65: Ligne 32:
   upstart-udev-bridge ureadahead-other ureadahead; do mv /​etc/​vservers/<​vservername>/​vdir/​etc/​init/​${srv}.conf \   upstart-udev-bridge ureadahead-other ureadahead; do mv /​etc/​vservers/<​vservername>/​vdir/​etc/​init/​${srv}.conf \
   /​etc/​vservers/<​vservername>/​vdir/​root/​init.disabled/;​ done   /​etc/​vservers/<​vservername>/​vdir/​root/​init.disabled/;​ done
 +</​code>​
 +
 +Be carefull to keep the ''​control-alt-delete.conf''​ service as it is used to shutdown the vserver with ''​vserver <​vservername>​ stop'':​
 +
 +<​code>​
 +20:00 <​@Bertl>​ util-vserver does not execute stuff inside the guest, it simply sends a signal to init (inside the guest)
 +20:01 <​@Bertl>​ (the singnal is SIGINT, and this equals to the CTRL-ALT-DEL action)
 </​code>​ </​code>​
  
Ligne 142: Ligne 116:
 #        *.=debug;​*.=info;​\ #        *.=debug;​*.=info;​\
 #        *.=notice;​*.=warn ​      ​|/​dev/​xconsole #        *.=notice;​*.=warn ​      ​|/​dev/​xconsole
 +</​code>​
 +
 +
 +===== Tweak ssh configuration =====
 +
 +In ''/​etc/​init/​ssh.conf''​ comment the following line:
 +
 +<​code>​
 +# replaces SSHD_OOM_ADJUST in /​etc/​default/​ssh
 +#oom never
 </​code>​ </​code>​
  
 ===== Create the console device ===== ===== Create the console device =====
  
-Missing of ''/​dev/​console''​ makes all scripts with ''​console output''​ fail:+Missing of ''/​dev/​console''​ makes all scripts with ''​console output''​ fail. First think would be to create the ''​console''​ device inside the guest but this should be avoided: 
 <​code>​ <​code>​
-# mknod --mode=600 /​etc/​vservers/​<vservername>/vdir/dev/console ​c 5 1+19:57 <@Bertlwell, regarding ​console: you probably don't want 'the console'​ created inside a guest, because that means that  
 +               ​upstart (from the guest) will write on your host console (and can read stuff from there too) 
 +19:58 <​@Bertl>​ what you want is to put a tty or pts there instead of the console, or if you like to see the output on the  
 +               ​current tty just tty
 </​code>​ </​code>​
 +
 +I use ''​tty''​ so the console outpouts on the current tty:
 +
 +<​code>​
 +# mknod --mode=600 /​etc/​vservers/<​vservername>/​vdir/​dev/​console c 5 0
 +</​code>​
 +
 +
 +If you want to troubleshot from outside the vserver you can use for example ''​tty8''​ as the console device for vservers:
 +
 +<​code>​
 +# mknod --mode=600 /​etc/​vservers/<​vservername>/​vdir/​dev/​console c 4 8
 +</​code>​
 +
  
 ===== Install dbus ===== ===== Install dbus =====
tof/computer/vserver/upstart_ubuntu_lucid.txt · Dernière modification: 13/07/2010 11:58 par Christophe Boyanique