Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-4100

Include ContainerID in certain Hook interface calls?

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.25.0
    • Fix Version/s: None
    • Component/s: c++ api
    • Labels:
      None

      Description

      I'm building an agent module which uses both the Isolator interface[1] to track containers over their lifespan, and the Hook interface[2] to inject environment variables into those containers.

      Nearly all of the Isolator interface calls include the ContainerID, sometimes as the sole identifier. Meanwhile the Hook.slaveExecutorEnvironmentDecorator call is only given an ExecutorInfo, and doesn't have a ContainerID at all.

      At the moment I'm working around the lack of ContainerID in the Hook call by storing a temporary ExecutorInfo->ContainerID mapping when Isolator.prepare() is called, then reading/clearing that mapping when Hook.slaveExecutorEnvironmentDecorator() is called. While this workaround appears to work for now, I worry that it will be brittle in the future, since it depends on Isolator.prepare() consistently being called before Hook.slaveExecutorEnvironmentDecorator().

      The immediate issue is specific to including a ContainerID parameter within Hook.slaveExecutorEnvironmentDecorator(), but it may make sense to determine if other Hook calls should have similar updates.

      [1] https://git-wip-us.apache.org/repos/asf?p=mesos.git;a=blob;f=include/mesos/slave/isolator.hpp
      [2] https://git-wip-us.apache.org/repos/asf?p=mesos.git;a=blob;f=include/mesos/hook.hpp

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              nickbp Nicholas Parker

              Dates

              • Created:
                Updated:

                Issue deployment