Project: mesos
Issue MESOS-5312: Env `MESOS_SANDBOX` is not set properly for command tasks that changes rootfs.
This is in the context of Mesos containerizer (a.k.a., unified containerizer). I did a simple test: {noformat} sudo sbin/mesos-master --work_dir=/tmp/mesos/master sudo GLOG_v=1 sbin/mesos-slave --master=10.0.2.15:5050 --isolation=docker/runtime,filesystem/linux --work_dir=/tmp/mesos/slave/ --image_providers=docker --executor_environment_variables="{}" sudo bin/mesos-execute --master=10.0.2.15:5050 --name=test --docker_image=alpine --command="env" MESOS_EXECUTOR_ID=test SHLVL=1 MESOS_CHECKPOINT=0 MESOS_EXECUTOR_SHUTDOWN_GRACE_PERIOD=5secs LIBPROCESS_PORT=0 MESOS_AGENT_ENDPOINT=10.0.2.15:5051 MESOS_SANDBOX=/tmp/mesos/slave/slaves/2d7e44bb-3282-4193-bdc4-eeab9e0943c2-S0/frameworks/1a1cad18-2d87-43dd-97b6-1dbf2d229061-0000/executors/test/runs/bb8dd72c-fb4c-426a-be18-51b0621339f6 MESOS_NATIVE_JAVA_LIBRARY=/home/vagrant/dist/mesos/lib/libmesos-0.29.0.so MESOS_FRAMEWORK_ID=1a1cad18-2d87-43dd-97b6-1dbf2d229061-0000 MESOS_SLAVE_ID=2d7e44bb-3282-4193-bdc4-eeab9e0943c2-S0 MESOS_NATIVE_LIBRARY=/home/vagrant/dist/mesos/lib/libmesos-0.29.0.so MESOS_DIRECTORY=/tmp/mesos/slave/slaves/2d7e44bb-3282-4193-bdc4-eeab9e0943c2-S0/frameworks/1a1cad18-2d87-43dd-97b6-1dbf2d229061-0000/executors/test/runs/bb8dd72c-fb4c-426a-be18-51b0621339f6 PWD=/mnt/mesos/sandbox MESOS_SLAVE_PID=slave(1)@10.0.2.15:5051 {noformat} `MESOS_SANDBOX` above should be `/mnt/mesos/sandbox`.
Story points: 2