[vserver] upstart and vserver

From: Jeff Jansen <jeff.jansen_at_kkoncepts.net>
Date: Mon 20 Dec 2010 - 03:38:56 GMT
Message-ID: <4D0ECFD0.8010808@kkoncepts.net>

I've gotten lucid guests running on debian squeeze as the host by
following the instructions at

http://linux-vserver.org/Upstart_issues

However, I still find that I can't stop and start services through
upstart in a guest if the upstart configuration contains "expect fork"
or "expect daemon". Upstart hangs.

Running upstart commands manually with --verbose and watching an strace
seems to show that upstart gets the pid of the process wrong. So my
guess is that it's related to this bug,
"http://bugs.launchpad.net/upstart/+bug/530779", about upstart using
ptrace() to track pids when a process forks and then exits.

If, therefore, I take a program and change its configuration so it does
NOT fork into the background and remove the "expect fork" line from the
upstart config file, everything works properly. Upstart can stop and
start the program correctly.

But there are programs, like 'ssh', where you don't want to do that.
The only way to stop ssh from forking is to put it into 'debug' mode,
where it can only accept one connect at a time. Upstart can run it
properly in that configuration, but that's not how you want to run ssh.

So in that case I've removed the upstart config file for ssh
(/etc/init/ssh.conf) and put a "/etc/init.d/ssh" config file back. Now
ssh works properly since it's being stopped and started as a normal sysv
program.

So does anyone have any ideas where to go next? Is there some way to
debug this problem better? If it is an issue with ptrace, is there some
way to make that work better in vserver?

TIA

Jeff Jansen

Versions:
                   Kernel: 2.6.32-5-vserver-amd64
                   VS-API: 0x00020305
             util-vserver: 0.30.215; Jun 18 2010, 13:35:17
Received on Mon Dec 20 03:39:12 2010

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Mon 20 Dec 2010 - 03:39:13 GMT by hypermail 2.1.8