Giter Site home page Giter Site logo

Comments (9)

parente avatar parente commented on May 21, 2024

Ah, yes. The mesos slaves need to have --no-switch-user set. Otherwise, the jovyan user must exist on all worker nodes. I meant to document this in the README and you just reminded me.

You can either have the cluster jobs run as root (dangerous), create jovyan on every worker node (painful), or set that flag (easy, if you don't mind the slaves all running as the user as which they were launched).

from docker-stacks.

jlamcanopy avatar jlamcanopy commented on May 21, 2024

Thanks! That makes a lot of sense now.

Ideally, I would like the user to be "spark" because this is what the username we used for submitting spark jobs. Is it difficult to make it configurable (i.e. jovyan to "whatevernamewewanttouse")? :)
I think it is better to stick with --switch-user (default setting) because not everyone using mesos wants to have the same privilege as spark users. What do you think?

from docker-stacks.

parente avatar parente commented on May 21, 2024

I agree it would be nice, but not sure how easy to enable that. We've had lots of trouble with getting users, groups, and permissions straight. Maybe the last round of fixes in that area greased the wheels for making the user name configurable too. I'll give it a look at least.

from docker-stacks.

parente avatar parente commented on May 21, 2024

After a quick snoop, the answer is: not easily. The Dockerfiles have USER jovyan strewn throughout to switch back and forth between root executed commands and the notebook user commands. Last I tried, I could not use an environment variable in a Docker USER line. If that's still the case, then the only other alternative to making it work would be to su/sudo to NB_USER throughout all the Dockerfiles in place of the USER statements. The editing isn't bad: making sure every image builds properly after that change is the bulk of that work (i.e., env vars are set properly using su/sudo instead of USER).

from docker-stacks.

parente avatar parente commented on May 21, 2024

And to clarify my last comment, that would only allow build time changes of NB_USER. Run time is a whole other big problem involving usermod and ownership fixes.

from docker-stacks.

jerrylam avatar jerrylam commented on May 21, 2024

Hey @parente, thanks for looking into it. I was hoping it is an easy sweep. I have been building images for the past few days too so I understand the pain and the complexity. Meanwhile, I think I will keep hacking the Dockerfiles!

from docker-stacks.

parente avatar parente commented on May 21, 2024

I documented the Mesos user requirements (create jovyan or run with --no-switch_user on slaves) in the pyspark and all-spark READMEs. I think this is the best we can do for the moment. If a more flexible option presents itself, I'll certainly revisit this.

from docker-stacks.

DmitryBe avatar DmitryBe commented on May 21, 2024

hey @parente,
i set MESOS_NO_SWITCH_USER=true in /etc/default/mesos-slave on agent nodes;
looks like this doesn't help
PS. also tried MESOS_SWITCH_USER=false

from docker-stacks.

DmitryBe avatar DmitryBe commented on May 21, 2024

ok, i think i did this wrong.
approach that works:

bash
touch /etc/mesos-slave/?no-switch_user
rm -rf /var/lib/mesos/meta

from docker-stacks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.