Comment 3 for bug 1388742

Revision history for this message
Tycho Andersen (tycho-s) wrote : Re: [Bug 1388742] Re: setuid 1000 in guest upstart job hangs container

On Nov 4, 2014 9:41 AM, "James Hunt" <email address hidden> wrote:
>
> man(5) shows the syntax for the setuid stanza as:
>
> setuid USERNAME
>
> So, clearly 'setuid 1000' is not valid and hence neither is your job.
> Attempting to start a job manually which specifies 'setuid 1000' fails
> with the error:
>
> start: Job failed to start
>
> I have so far been unable to recreate your hang. Please specify which
> versions of Ubuntu are being used inside and outside the container.

Utopic on both container and host. It does fail correctly when you do
'service start ', but it doesn't boot correctly.

>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1388742
>
> Title:
> setuid 1000 in guest upstart job hangs container
>
> Status in lxc containers:
> New
> Status in Upstart:
> New
>
> Bug description:
> Hi,
>
> When I run the following upstart job:
>
> # myservice - myservice job file
>
> description "vnc"
> author "Me <myself@i.com>"
>
> # Stanzas
> #
> # Stanzas control when and how a process is started and stopped
> # See a list of stanzas here:
http://upstart.ubuntu.com/wiki/Stanzas#respawn
>
> # When to start the service
> start on runlevel [2345]
>
> # When to stop the service
> stop on runlevel [016]
>
> # Automatically restart process if crashed
> respawn
>
> # Essentially lets upstart know the process will detach itself to the
background
> expect fork
>
> env HOME=/home/ubuntu
>
> setuid 1000 # using the username here works just fine
>
> # Start the process
> exec vnc4server
>
> the container hangs.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/lxc/+bug/1388742/+subscriptions