mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilbert Song (JIRA)" <>
Subject [jira] [Commented] (MESOS-7405) Allow isolators to render mapped sandbox specific environment variables.
Date Thu, 20 Apr 2017 22:24:04 GMT


Gilbert Song commented on MESOS-7405:

[~tillt], please let me know if the following logic in your isolator can resolve the issue
of setting environment variables correctly:
  // Determine the correct sandbox directory with/without a rootfs.
  const string directory = containerConfig.has_rootfs()
      ? flags.sandbox_directory

  env["YOUR_ENV_VAR"] = path::join(directory, containerConfig.container_info().volumes(0).container_path());

> Allow isolators to render mapped sandbox specific environment variables.
> ------------------------------------------------------------------------
>                 Key: MESOS-7405
>                 URL:
>             Project: Mesos
>          Issue Type: Bug
>          Components: agent, containerization, isolation
>            Reporter: Till Toenshoff
> Within the mesos-containerizer, isolators are responsible for preparing the containerized
context for an executor by implementing [{{prepare}}|].
> Part of such preparation may e.g. be sandbox mutations within the root filesystem as
well as rendering environment variables returned via the optionally returned [{{ContainerLaunchInfo}}|].
> IIUC currently it seems to not be possible to have an isolator setup environment variables
pointing to mapped locations within the sandbox path as that path gets determined after all
isolators did their preparation.

This message was sent by Atlassian JIRA

View raw message