OpenVZ Forum


Home » General » Support » (upstart?) not starting in Debian7 container (I need to manually run telinit 5)
(upstart?) not starting in Debian7 container [message #50648] Mon, 30 September 2013 08:06 Go to next message
narcisgarcia is currently offline  narcisgarcia
Messages: 41
Registered: May 2009
Member
I'm using Debian 6 hardware node (HN) with Linux 2.6.32-5-openvz-686 and vzctl 3.0.30.2

Created a container with the OpenVZ precreated template for Debian 7, installed openssh-server, and when stop+start the container, and entering, the only processes I see are:
$ ps -A -o comm,args
init            init
upstart-udev-br upstart-udev-bridge --daemon
udevd           /sbin/udevd --daemon
udevd           /sbin/udevd --daemon
udevd           /sbin/udevd --daemon
upstart-socket- upstart-socket-bridge --daemon
vzctl           vzctl: pts/0     
bash            -bash
ps              ps -A -o comm,args


I need to manually set runlevel 5 to start the rest of services:
$ telinit 5
$ ps -A -o comm,args
COMMAND         COMMAND
init            init
upstart-udev-br upstart-udev-bridge --daemon
udevd           /sbin/udevd --daemon
udevd           /sbin/udevd --daemon
udevd           /sbin/udevd --daemon
upstart-socket- upstart-socket-bridge --daemon
vzctl           vzctl: pts/0     
bash            -bash
rc              /bin/sh /etc/init.d/rc 5
rsyslogd        /usr/sbin/rsyslogd -c5
saslauthd       /usr/sbin/saslauthd -a pam -c -m /var/run/saslauthd -n 2
saslauthd       /usr/sbin/saslauthd -a pam -c -m /var/run/saslauthd -n 2
S16sendmail     /bin/sh /etc/rc5.d/S16sendmail start
make            /usr/bin/make all -s -C /etc/mail
sh              /bin/sh -c if [ -x /usr/share/sendmail/update_tls ]; then \ ./usr/share/sendmail/update_tls || true; \ .fi;
update_tls      /bin/sh -e /usr/share/sendmail/update_tls
openssl         openssl dsaparam 2048 -out /etc/mail/tls/sendmail-common.prm
ps              ps -A -o comm,args


I'm going to patch "vz" service in HN to run "telinit 5" on each Debian7 container, but... Does somebody know a cleaner way to solve this?
Is vzctl launching upstart but something is broken in the template to follow the "boot" sequence?


Narcis Garcia

[Updated on: Mon, 30 September 2013 08:27]

Report message to a moderator

Re: (upstart?) not starting in Debian7 container [message #50651 is a reply to message #50648] Mon, 30 September 2013 17:23 Go to previous messageGo to next message
Paparaciz
Messages: 302
Registered: August 2009
Senior Member
Not sure where you should start debug problem.
just tested with kernel 2.6.32-042stab081.3 and vzctl 4.5.1
works for me. didn't needed to install openssh-server though. it was already included and started.

as a starting point I suggest update to latest rhel6 based kernel and latest vz tools and friends versions.

https://wiki.openvz.org/Install_kernel_from_RPM_on_Debian_6. 0
Re: (upstart?) not starting in Debian7 container [message #50652 is a reply to message #50648] Tue, 01 October 2013 15:18 Go to previous messageGo to next message
narcisgarcia is currently offline  narcisgarcia
Messages: 41
Registered: May 2009
Member
Tried under CentOS 6.4, and a Debian 7 container boots completely (some process waits several minutes for upstart runs).

Also tried to install vzctl 4.5.1 from "unstable" repository in Debian, but then vzctl doesn't work (some error about a file .so not found).

Instead of installing foreign packages (probably not designed for Debian), I prefer to implement my own patch, which gives a faster result:

1. Install vzctl from "testing" repository (well integrated and works better)

2. Add a line at the end of start() function, in the script file /etc/init.d/vz :
/usr/local/bin/vz-upstarts.sh

3. Create the file /usr/local/bin/vz-upstarts.sh and make it executable (I attach it to this message)


This workaround consists in look each running container for the case hasn't boot the minimal services, and in that case execute "telinit 5" in it.


Narcis Garcia

[Updated on: Tue, 01 October 2013 15:22]

Report message to a moderator

Re: (upstart?) not starting in Debian7 container [message #50653 is a reply to message #50652] Thu, 03 October 2013 04:16 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Try http://download.openvz.org/debian -- it's wheezy-test have all the latest and greatest stuff packed. The command to install the kernel is
apt-get install linux-image-openvz-amd64


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: (upstart?) not starting in Debian7 container [message #50655 is a reply to message #50648] Thu, 03 October 2013 07:44 Go to previous messageGo to next message
narcisgarcia is currently offline  narcisgarcia
Messages: 41
Registered: May 2009
Member
As I understand, I can upgrade Hardware Node to Debian 7.1, install kernel and utilities from download.openvz.org/debian and the result is a "stable" Debian Wheezy ready for production (?)

Narcis Garcia
Re: (upstart?) not starting in Debian7 container [message #50693 is a reply to message #50653] Sat, 12 October 2013 09:02 Go to previous message
narcisgarcia is currently offline  narcisgarcia
Messages: 41
Registered: May 2009
Member
Tried with Debian 7 in a 32-bit Hardware Node, but similar result in Debian7 container:

$ ps -A -o comm,args
COMMAND         COMMAND
init            init
kthreadd/777    [kthreadd/777]
khelper/777     [khelper/777]
upstart-udev-br upstart-udev-bridge --daemon
udevd           /sbin/udevd --daemon
udevd           /sbin/udevd --daemon
udevd           /sbin/udevd --daemon
upstart-socket- upstart-socket-bridge --daemon
vzctl           vzctl: pts/0   
bash            -bash
rc              /bin/sh /etc/init.d/rc 2
sshd            /usr/sbin/sshd
S15rsyslog      /bin/sh /etc/rc2.d/S15rsyslog start
ps              ps -A -o comm,args
S15rsyslog      /bin/sh /etc/rc2.d/S15rsyslog start

$ telinit 5
$ ps -A -o comm,args
COMMAND         COMMAND
init            init
kthreadd/777    [kthreadd/777]
khelper/777     [khelper/777]
upstart-udev-br upstart-udev-bridge --daemon
udevd           /sbin/udevd --daemon
udevd           /sbin/udevd --daemon
udevd           /sbin/udevd --daemon
upstart-socket- upstart-socket-bridge --daemon
vzctl           vzctl: pts/0   
bash            -bash
sshd            /usr/sbin/sshd
rsyslogd        /usr/sbin/rsyslogd -c5
saslauthd       /usr/sbin/saslauthd -a pam -c -m /var/run/saslauthd -n 2
saslauthd       /usr/sbin/saslauthd -a pam -c -m /var/run/saslauthd -n 2
sendmail-mta    sendmail: MTA: accepting connections          
xinetd          /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive -inetd_compat -inetd_ipv6
apache2         /usr/sbin/apache2 -k start
apache2         /usr/sbin/apache2 -k start
cron            /usr/sbin/cron
ps              ps -A -o comm,args


in HN:
$ lsb_release -d
Description:	Debian GNU/Linux 7.1 (wheezy)
$ uname -a
Linux hn 2.6.32-042stab059.7 #1 SMP Tue Jul 24 19:11:01 MSD 2012 i686 GNU/Linux
$ vzctl --version
vzctl version 3.0.30.2


(it seems that the i386 repository in download.openvz.org/debian has similar packages than Debian's distribution repository)


Narcis Garcia

[Updated on: Sat, 12 October 2013 09:05]

Report message to a moderator

Previous Topic: When Host is 32bits and Guest 64 Bits
Next Topic: qemu-arm-static mmap error
Goto Forum:
  


Current Time: Tue Apr 23 23:07:06 GMT 2024

Total time taken to generate the page: 0.01364 seconds