Skip to content

allow-run-as-root Environment variables aren't honored #6920

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
JosephDVL opened this issue Aug 21, 2019 · 3 comments
Closed

allow-run-as-root Environment variables aren't honored #6920

JosephDVL opened this issue Aug 21, 2019 · 3 comments

Comments

@JosephDVL
Copy link

Thank you for taking the time to submit an issue!

Background information

Running OpenMPI in a docker container is often done as root. The earlier issue #4451 and merge #5597 added two environment variables to control that behavior without the command line flag.

Trying to set those environment variables does not seem to fix all possible code paths as an error message is still returned.

What version of Open MPI are you using? (e.g., v1.10.3, v2.1.0, git branch name and hash, etc.)

OpenMPI 4.0.1

Describe how Open MPI was installed (e.g., from a source/distribution tarball, from a git clone, from an operating system distribution package, etc.)

Compiled from source

Please describe the system on which you are running

  • Operating system/version: Ubuntu 18.04 docker image
  • Computer hardware: Intel
  • Network type: SHMEM and gigabit ethernet

Details of the problem

I compiled OpenMPI 4.0.1 from source using default GNU compilers on a Ubuntu 18.04 docker image. Trying to run a "hello world" MPI program results in an error message saying either '--allow-run-as root' needs to be provided or to set the two environment variables OMPI_ALLOW_RUN_AS_ROOT=1 and OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1

After setting both variables, the error message changes to repeat the option for the command line flag, but does not include the language about the environment variables. Doing a grep of the code suggests another possible place that needs the additional test of the environment variables:

orte/tools/orterun/orterun.c: Line 145

@JosephDVL
Copy link
Author

I see that this has been fixed already in git. Closing issue.

@jsquyres
Copy link
Member

Yep, sorry this wasn't fixed in the initial v4.0.0 / .1 releases. If you need a local patch, you should be able to grab it from the PRs that were just merged. Also, the fix should be in the v4.0.x nightly snapshot tarballs by now (https://www.open-mpi.org/nightly/v4.0.x/).

FWIW: We're getting verrrrrry close to a v4.0.2rc, so taking one of those 4.0.x nightly snapshot tarballs for a spin is probably pretty safe / stable.

@Nelson-numerical-software

An official release with this working feature would be really appreciated.
This ticket should be not closed until really merged.

mgovoni-devel pushed a commit to west-code-development/West that referenced this issue Aug 19, 2022
mgovoni-devel pushed a commit to west-code-development/West that referenced this issue Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants