Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

[SPARK-370][SPARK-499] Change image to run as nobody #189

Merged
merged 6 commits into from
Sep 28, 2017

Conversation

ArtRand
Copy link
Contributor

@ArtRand ArtRand commented Sep 25, 2017

Problem

The Spark image that is used for running the Dispatcher, Drivers, and Executors runs as root meaning that Marathon requires permissions to launch containers as root when on a strict-mode cluster.

Solution

Change default to nobody, allow access to directories in the image necessary for running Spark and it's components (e.g. nginx).

Tested

CI unit tests for basic functionality, manually on a strict-mode cluster (see JIRA for details) and manually against a Kerberized HDFS cluster

Manual tests

  • Kerberos
  • History server

@ArtRand ArtRand changed the title wip, let's see if this works [SPARK-370][SPARK-499] Change image to run as nobody Sep 26, 2017
@@ -72,15 +72,18 @@ RUN ln -s /bin/grep /usr/bin/grep

RUN ln -s /var/lib/runit/service/spark /etc/service/spark
RUN ln -s /var/lib/runit/service/nginx /etc/service/nginx
RUN mkdir -p /etc/hadoop
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is repeated in L. 60 above, one of them can be removed.

Copy link
Contributor

@susanxhuynh susanxhuynh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (assuming tests pass)

@@ -76,11 +76,13 @@ RUN ln -s /var/lib/runit/service/nginx /etc/service/nginx
ADD dist /opt/spark/dist

# Commenting these for now, because we're running Spark as root in strict mode

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this comment mean?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like it should go away?

@ArtRand ArtRand merged commit fd1a470 into master Sep 28, 2017
@ArtRand ArtRand deleted the spark-370-2-run-as-nobody branch September 28, 2017 01:45
@skonto
Copy link
Contributor

skonto commented Oct 13, 2017

@susanxhuynh @ArtRand I am not so sure about nobody in general its a relic: https://lwn.net/Articles/695526/ although widely used...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants