You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Murat Odabasi <mu...@gmail.com> on 2013/07/30 20:21:11 UTC

Prevent users from killing each other's jobs

Hi there,

I am trying to introduce some sort of security to prevent different
people using the cluster from interfering with each other's jobs.

Following the instructions at
http://hadoop.apache.org/docs/stable/cluster_setup.html and
https://www.inkling.com/read/hadoop-definitive-guide-tom-white-3rd/chapter-9/security
, this is what I put in my mapred-site.xml:

<property>
  <name>mapred.task.tracker.task-controller</name>
  <value>org.apache.hadoop.mapred.LinuxTaskController</value>
</property>

<property>
  <name>mapred.acls.enabled</name>
  <value>true</value>
</property>

I can see the configuration parameters in the job configuration when I
run a hive query, but the users are still able to kill each other's
jobs.

Any ideas about what I may be missing?
Any alternative approaches I can adopt?

Thanks.

Re: Prevent users from killing each other's jobs

Posted by Vinod Kumar Vavilapalli <vi...@apache.org>.
That is correct. Seems like something else is happening.

One thing to see if all your users or more importantly their group is added to the cluster-admin acl (mapreduce.cluster.administrators)

You should look at mapreduce audit logs (which by default go into JobTracker logs, search for Audit). It clearly logs which user is killing a job

Thanks,
+Vinod

On Jul 30, 2013, at 11:31 AM, Murat Odabasi wrote:

> I'm not sure how I should do that.
> 
> The documentation says "A job submitter can specify access control
> lists for viewing or modifying a job via the configuration properties
> mapreduce.job.acl-view-job and mapreduce.job.acl-modify-job
> respectively. By default, nobody is given access in these properties."
> 
> My understanding is no other user should be able to modify a job
> unless explicitly authorized. Is that not the case? Should I set these
> two properties before running the job?
> 
> Thanks.
> 
> 
> On 30 July 2013 19:25, Vinod Kumar Vavilapalli <vi...@apache.org> wrote:
>> 
>> You need to set up Job ACLs. See
>> http://hadoop.apache.org/docs/stable/mapred_tutorial.html#Job+Authorization.
>> 
>> It is a per job configuration, you can provide with defaults. If the job
>> owner wishes to give others access, he/she can do so.
>> 
>> Thanks,
>> +Vinod Kumar Vavilapalli
>> Hortonworks Inc.
>> http://hortonworks.com/
>> 
>> On Jul 30, 2013, at 11:21 AM, Murat Odabasi wrote:
>> 
>> Hi there,
>> 
>> I am trying to introduce some sort of security to prevent different
>> people using the cluster from interfering with each other's jobs.
>> 
>> Following the instructions at
>> http://hadoop.apache.org/docs/stable/cluster_setup.html and
>> https://www.inkling.com/read/hadoop-definitive-guide-tom-white-3rd/chapter-9/security
>> , this is what I put in my mapred-site.xml:
>> 
>> <property>
>> <name>mapred.task.tracker.task-controller</name>
>> <value>org.apache.hadoop.mapred.LinuxTaskController</value>
>> </property>
>> 
>> <property>
>> <name>mapred.acls.enabled</name>
>> <value>true</value>
>> </property>
>> 
>> I can see the configuration parameters in the job configuration when I
>> run a hive query, but the users are still able to kill each other's
>> jobs.
>> 
>> Any ideas about what I may be missing?
>> Any alternative approaches I can adopt?
>> 
>> Thanks.
>> 
>> 


Re: Prevent users from killing each other's jobs

Posted by Murat Odabasi <mu...@gmail.com>.
I'm not sure how I should do that.

The documentation says "A job submitter can specify access control
lists for viewing or modifying a job via the configuration properties
mapreduce.job.acl-view-job and mapreduce.job.acl-modify-job
respectively. By default, nobody is given access in these properties."

My understanding is no other user should be able to modify a job
unless explicitly authorized. Is that not the case? Should I set these
two properties before running the job?

Thanks.


On 30 July 2013 19:25, Vinod Kumar Vavilapalli <vi...@apache.org> wrote:
>
> You need to set up Job ACLs. See
> http://hadoop.apache.org/docs/stable/mapred_tutorial.html#Job+Authorization.
>
> It is a per job configuration, you can provide with defaults. If the job
> owner wishes to give others access, he/she can do so.
>
> Thanks,
> +Vinod Kumar Vavilapalli
> Hortonworks Inc.
> http://hortonworks.com/
>
> On Jul 30, 2013, at 11:21 AM, Murat Odabasi wrote:
>
> Hi there,
>
> I am trying to introduce some sort of security to prevent different
> people using the cluster from interfering with each other's jobs.
>
> Following the instructions at
> http://hadoop.apache.org/docs/stable/cluster_setup.html and
> https://www.inkling.com/read/hadoop-definitive-guide-tom-white-3rd/chapter-9/security
> , this is what I put in my mapred-site.xml:
>
> <property>
>  <name>mapred.task.tracker.task-controller</name>
>  <value>org.apache.hadoop.mapred.LinuxTaskController</value>
> </property>
>
> <property>
>  <name>mapred.acls.enabled</name>
>  <value>true</value>
> </property>
>
> I can see the configuration parameters in the job configuration when I
> run a hive query, but the users are still able to kill each other's
> jobs.
>
> Any ideas about what I may be missing?
> Any alternative approaches I can adopt?
>
> Thanks.
>
>

Re: Prevent users from killing each other's jobs

Posted by pandees waran <pa...@gmail.com>.
Hi Mikhail,

Could you please explain how we can track all the kill requests for a job?
Is there any feature available in hadoop stack for this? Or do we need to
track this in OS layer by capturing the signals?

Thanks,
Pandeesh
On Jul 31, 2013 12:03 AM, "Mikhail Antonov" <ol...@gmail.com> wrote:

> In addition to using job's ACLs you could have more brutal schema. Track
> all requests to kill the jobs, and if any request is coming from the user
> who should't be trying to kill this particular job, then ssh from the
> script to his client machine and forcibly reboot it :)
>
>
> 2013/7/30 Edward Capriolo <ed...@gmail.com>
>
>> Honestly tell your users to stop being jerks. People know if they kill my
>> query there is going to be hell to pay :)
>>
>>
>> On Tue, Jul 30, 2013 at 2:25 PM, Vinod Kumar Vavilapalli <
>> vinodkv@apache.org> wrote:
>>
>>>
>>> You need to set up Job ACLs. See
>>> http://hadoop.apache.org/docs/stable/mapred_tutorial.html#Job+Authorization
>>> .
>>>
>>> It is a per job configuration, you can provide with defaults. If the job
>>> owner wishes to give others access, he/she can do so.
>>>
>>>  Thanks,
>>> +Vinod Kumar Vavilapalli
>>> Hortonworks Inc.
>>> http://hortonworks.com/
>>>
>>> On Jul 30, 2013, at 11:21 AM, Murat Odabasi wrote:
>>>
>>> Hi there,
>>>
>>> I am trying to introduce some sort of security to prevent different
>>> people using the cluster from interfering with each other's jobs.
>>>
>>> Following the instructions at
>>> http://hadoop.apache.org/docs/stable/cluster_setup.html and
>>>
>>> https://www.inkling.com/read/hadoop-definitive-guide-tom-white-3rd/chapter-9/security
>>> , this is what I put in my mapred-site.xml:
>>>
>>> <property>
>>>  <name>mapred.task.tracker.task-controller</name>
>>>  <value>org.apache.hadoop.mapred.LinuxTaskController</value>
>>> </property>
>>>
>>> <property>
>>>  <name>mapred.acls.enabled</name>
>>>  <value>true</value>
>>> </property>
>>>
>>> I can see the configuration parameters in the job configuration when I
>>> run a hive query, but the users are still able to kill each other's
>>> jobs.
>>>
>>> Any ideas about what I may be missing?
>>> Any alternative approaches I can adopt?
>>>
>>> Thanks.
>>>
>>>
>>>
>>
>
>
> --
> Thanks,
> Michael Antonov
>

Re: Prevent users from killing each other's jobs

Posted by Mikhail Antonov <ol...@gmail.com>.
In addition to using job's ACLs you could have more brutal schema. Track
all requests to kill the jobs, and if any request is coming from the user
who should't be trying to kill this particular job, then ssh from the
script to his client machine and forcibly reboot it :)


2013/7/30 Edward Capriolo <ed...@gmail.com>

> Honestly tell your users to stop being jerks. People know if they kill my
> query there is going to be hell to pay :)
>
>
> On Tue, Jul 30, 2013 at 2:25 PM, Vinod Kumar Vavilapalli <
> vinodkv@apache.org> wrote:
>
>>
>> You need to set up Job ACLs. See
>> http://hadoop.apache.org/docs/stable/mapred_tutorial.html#Job+Authorization
>> .
>>
>> It is a per job configuration, you can provide with defaults. If the job
>> owner wishes to give others access, he/she can do so.
>>
>>  Thanks,
>> +Vinod Kumar Vavilapalli
>> Hortonworks Inc.
>> http://hortonworks.com/
>>
>> On Jul 30, 2013, at 11:21 AM, Murat Odabasi wrote:
>>
>> Hi there,
>>
>> I am trying to introduce some sort of security to prevent different
>> people using the cluster from interfering with each other's jobs.
>>
>> Following the instructions at
>> http://hadoop.apache.org/docs/stable/cluster_setup.html and
>>
>> https://www.inkling.com/read/hadoop-definitive-guide-tom-white-3rd/chapter-9/security
>> , this is what I put in my mapred-site.xml:
>>
>> <property>
>>  <name>mapred.task.tracker.task-controller</name>
>>  <value>org.apache.hadoop.mapred.LinuxTaskController</value>
>> </property>
>>
>> <property>
>>  <name>mapred.acls.enabled</name>
>>  <value>true</value>
>> </property>
>>
>> I can see the configuration parameters in the job configuration when I
>> run a hive query, but the users are still able to kill each other's
>> jobs.
>>
>> Any ideas about what I may be missing?
>> Any alternative approaches I can adopt?
>>
>> Thanks.
>>
>>
>>
>


-- 
Thanks,
Michael Antonov

Re: Prevent users from killing each other's jobs

Posted by Edward Capriolo <ed...@gmail.com>.
Honestly tell your users to stop being jerks. People know if they kill my
query there is going to be hell to pay :)


On Tue, Jul 30, 2013 at 2:25 PM, Vinod Kumar Vavilapalli <vinodkv@apache.org
> wrote:

>
> You need to set up Job ACLs. See
> http://hadoop.apache.org/docs/stable/mapred_tutorial.html#Job+Authorization
> .
>
> It is a per job configuration, you can provide with defaults. If the job
> owner wishes to give others access, he/she can do so.
>
> Thanks,
> +Vinod Kumar Vavilapalli
> Hortonworks Inc.
> http://hortonworks.com/
>
> On Jul 30, 2013, at 11:21 AM, Murat Odabasi wrote:
>
> Hi there,
>
> I am trying to introduce some sort of security to prevent different
> people using the cluster from interfering with each other's jobs.
>
> Following the instructions at
> http://hadoop.apache.org/docs/stable/cluster_setup.html and
>
> https://www.inkling.com/read/hadoop-definitive-guide-tom-white-3rd/chapter-9/security
> , this is what I put in my mapred-site.xml:
>
> <property>
>  <name>mapred.task.tracker.task-controller</name>
>  <value>org.apache.hadoop.mapred.LinuxTaskController</value>
> </property>
>
> <property>
>  <name>mapred.acls.enabled</name>
>  <value>true</value>
> </property>
>
> I can see the configuration parameters in the job configuration when I
> run a hive query, but the users are still able to kill each other's
> jobs.
>
> Any ideas about what I may be missing?
> Any alternative approaches I can adopt?
>
> Thanks.
>
>
>

Re: Prevent users from killing each other's jobs

Posted by Vinod Kumar Vavilapalli <vi...@apache.org>.
You need to set up Job ACLs. See http://hadoop.apache.org/docs/stable/mapred_tutorial.html#Job+Authorization.

It is a per job configuration, you can provide with defaults. If the job owner wishes to give others access, he/she can do so.

Thanks,
+Vinod Kumar Vavilapalli
Hortonworks Inc.
http://hortonworks.com/

On Jul 30, 2013, at 11:21 AM, Murat Odabasi wrote:

> Hi there,
> 
> I am trying to introduce some sort of security to prevent different
> people using the cluster from interfering with each other's jobs.
> 
> Following the instructions at
> http://hadoop.apache.org/docs/stable/cluster_setup.html and
> https://www.inkling.com/read/hadoop-definitive-guide-tom-white-3rd/chapter-9/security
> , this is what I put in my mapred-site.xml:
> 
> <property>
>  <name>mapred.task.tracker.task-controller</name>
>  <value>org.apache.hadoop.mapred.LinuxTaskController</value>
> </property>
> 
> <property>
>  <name>mapred.acls.enabled</name>
>  <value>true</value>
> </property>
> 
> I can see the configuration parameters in the job configuration when I
> run a hive query, but the users are still able to kill each other's
> jobs.
> 
> Any ideas about what I may be missing?
> Any alternative approaches I can adopt?
> 
> Thanks.