You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@slider.apache.org by Eric Yang <ey...@apache.org> on 2015/02/20 18:23:54 UTC

start service as another user

Hi all,

What is the proper way to start application as another user other than YARN?

In python script, I ran it like this:

      Execute ( daemon_cmd,
        user = serviceUser
      )

But it still get executed as yarn user instead of serviceUser.

Thanks

regards,
Eric

Re: start service as another user

Posted by Eric Yang <er...@gmail.com>.
Thanks Sumit and Ted.  After configuring LinuxContainerExecutor and
cgroup.  NodeManager sees the container being launched as test user, but
Slider process is started as nobody.  My cluster does not have Kerberos
enabled.  In Mapreduce v1, using Linux Task Controller, the child process
could run as the client user.  It looks like YARN does not starting the
container as client user, if Kerberos is not turned on.

I setup kerberos, then containers run as the client user.  Thank you all.

regards,
Eric

On Fri, Feb 20, 2015 at 10:38 AM, Ted Yu <yu...@gmail.com> wrote:

> Discussed with Sumit.
>
> The ability to start as a different user is better implemented by YARN,
> instead of Slider.
>
> Cheers
>
> On Fri, Feb 20, 2015 at 9:42 AM, Sumit Mohanty <sm...@hortonworks.com>
> wrote:
>
> > As the agent does not run as root (either as YARN user on non-secured or
> > the principal that started on secured), Slider has not implemented the
> > ability to start as a different user.
> >
> > -Sumit
> > ________________________________________
> > From: Eric Yang <ey...@apache.org>
> > Sent: Friday, February 20, 2015 9:23 AM
> > To: dev@slider.incubator.apache.org
> > Subject: start service as another user
> >
> > Hi all,
> >
> > What is the proper way to start application as another user other than
> > YARN?
> >
> > In python script, I ran it like this:
> >
> >       Execute ( daemon_cmd,
> >         user = serviceUser
> >       )
> >
> > But it still get executed as yarn user instead of serviceUser.
> >
> > Thanks
> >
> > regards,
> > Eric
> >
>

Re: start service as another user

Posted by Ted Yu <yu...@gmail.com>.
Discussed with Sumit.

The ability to start as a different user is better implemented by YARN,
instead of Slider.

Cheers

On Fri, Feb 20, 2015 at 9:42 AM, Sumit Mohanty <sm...@hortonworks.com>
wrote:

> As the agent does not run as root (either as YARN user on non-secured or
> the principal that started on secured), Slider has not implemented the
> ability to start as a different user.
>
> -Sumit
> ________________________________________
> From: Eric Yang <ey...@apache.org>
> Sent: Friday, February 20, 2015 9:23 AM
> To: dev@slider.incubator.apache.org
> Subject: start service as another user
>
> Hi all,
>
> What is the proper way to start application as another user other than
> YARN?
>
> In python script, I ran it like this:
>
>       Execute ( daemon_cmd,
>         user = serviceUser
>       )
>
> But it still get executed as yarn user instead of serviceUser.
>
> Thanks
>
> regards,
> Eric
>

Re: start service as another user

Posted by Sumit Mohanty <sm...@hortonworks.com>.
As the agent does not run as root (either as YARN user on non-secured or the principal that started on secured), Slider has not implemented the ability to start as a different user.

-Sumit
________________________________________
From: Eric Yang <ey...@apache.org>
Sent: Friday, February 20, 2015 9:23 AM
To: dev@slider.incubator.apache.org
Subject: start service as another user

Hi all,

What is the proper way to start application as another user other than YARN?

In python script, I ran it like this:

      Execute ( daemon_cmd,
        user = serviceUser
      )

But it still get executed as yarn user instead of serviceUser.

Thanks

regards,
Eric