Re: [vserver] upstart and vserver

From: Herbert Poetzl <herbert_at_13thfloor.at>
Date: Mon 20 Dec 2010 - 06:36:51 GMT
Message-ID: <20101220063651.GC3971@MAIL.13thfloor.at>

On Mon, Dec 20, 2010 at 11:38:56AM +0800, Jeff Jansen wrote:
> 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.

what does 'hangs' mean here?
anything relevant in the (upstart) logs?
does it work properly on an unpatched system with vanilla kernel?

> 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.

so, the important part is to check if ptrace reports something
wrong inside a Linux-VServer guest then, if so, we should fix
it, otherwise it's an upstart bug and has to be fixed there ...

also, does manually mean from an ssh logon or via 'enter'?
and does it work properly when the guest shuts down?

> 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?

first, I'd update to 2.6.36.x with the latest patch and the
most recent util-vserver, because that's where all the
updates and fixes go, and check that the 'issue' still
exists there ...

> Is there some way to debug this problem better?

enabling Linux-VServer debugging for that kernel would be
advised to get some information on the Linux-VServer side
and of course, enabling whatever debug log upstart can
provide is probably a good idea too ...

> If it is an issue with ptrace, is there some
> way to make that work better in vserver?

if it is an issue caused by ptrace reporting something
wrong inside a Linux-VServer guest you do not really
have to worry anymore, as it will be considered a bug
and fixed ASAP ...

best,
Herbert

> 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 06:37:06 2010

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