You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Jie Yu <yu...@gmail.com> on 2016/10/07 23:49:56 UTC

Deprecate MESOS_DIRECTORY executor environment variable

Hi,

Want to initiate a discussion here. Before Mesos containerizer has
container image support (all containers share the same host file system),
$MESOS_DIRECTORY env variable is used to let executor know their sandbox
location.

Later, we introduced container image support to Mesos containerizer so that
each container can has its own root filesystem. Due to some historical
reason (thermos), we decided to keep $MESOS_DIRECTORY to be the path to the
sandbox on the host filesystem (e.g., `/var/lib/mesos/slaves/...`) even if
the container has its own root filesystem. And introduced a new
$MESOS_SANDBOX to point to the sandbox in the container's root filesystem
(e.g., `/mnt/mesos/sandbox`). If the container does not have a root
filesystem, $MESOS_DIRECTORY == $MESOS_SANDBOX.

Now, we plan to deprecate $MESOS_DIRECTORY because it'll be really
confusing to executor writers, and it'll be an error if they try to access
$MESOS_DIRECTORY if their container has a root filesystem defined.

- Jie

Re: Deprecate MESOS_DIRECTORY executor environment variable

Posted by Vinod Kone <vi...@apache.org>.
If the sandbox host path is not yet available in v1 API, it should be made
available. I'll be happy to shepherd.

The rules for APIs stipulate that the deprecation period doesn't start
> until the next major release (2.0).
>

We need to revise the API compatibility rules a bit. Right now the rules
for API conflict a bit with rules of deprecation in the versioning doc.
It's my bad because I wrote those in different points of time but didn't
reconcile them.

Re: Deprecate MESOS_DIRECTORY executor environment variable

Posted by Yan Xu <xu...@apple.com>.
The rules for APIs stipulate that the deprecation period doesn't start
until the next major release (2.0). I suppose environment variable changes
don't qualify (or do they? This is how the agent interface with the
executor and requires executor developers to change their programs). So
when should it start (1.1 vs. 2.0)?

On Fri, Oct 7, 2016 at 5:33 PM, Jie Yu <yu...@gmail.com> wrote:

> https://github.com/apache/mesos/blob/master/docs/versioning.md
>
> "The deprecation period for any given feature will be 6 months. Having a
> set period allows Mesos developers to not indefinitely accrue technical
> debt and allows users time to plan for upgrades."
>
> - Jie
>
> On Fri, Oct 7, 2016 at 5:28 PM, Zameer Manji <zm...@apache.org> wrote:
>
> > Jie,
> >
> > Without commenting on this deprecation, how is this going to work now
> that
> > Mesos is 1.0?
> >
> > What is the definition of "deprecate" being used here? Is it something
> that
> > will be removed in Mesos 2.0?
> >
> > On Fri, Oct 7, 2016 at 4:49 PM, Jie Yu <yu...@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > Want to initiate a discussion here. Before Mesos containerizer has
> > > container image support (all containers share the same host file
> system),
> > > $MESOS_DIRECTORY env variable is used to let executor know their
> sandbox
> > > location.
> > >
> > > Later, we introduced container image support to Mesos containerizer so
> > that
> > > each container can has its own root filesystem. Due to some historical
> > > reason (thermos), we decided to keep $MESOS_DIRECTORY to be the path to
> > the
> > > sandbox on the host filesystem (e.g., `/var/lib/mesos/slaves/...`) even
> > if
> > > the container has its own root filesystem. And introduced a new
> > > $MESOS_SANDBOX to point to the sandbox in the container's root
> filesystem
> > > (e.g., `/mnt/mesos/sandbox`). If the container does not have a root
> > > filesystem, $MESOS_DIRECTORY == $MESOS_SANDBOX.
> > >
> > > Now, we plan to deprecate $MESOS_DIRECTORY because it'll be really
> > > confusing to executor writers, and it'll be an error if they try to
> > access
> > > $MESOS_DIRECTORY if their container has a root filesystem defined.
> > >
> > > - Jie
> > >
> > > --
> > > Zameer Manji
> > >
> >
>

Re: Deprecate MESOS_DIRECTORY executor environment variable

Posted by Joshua Cohen <jc...@apache.org>.
Thermos would definitely need a period to adjust where both are supported,
as we do make pretty wide usage of $MESOS_DIRECTORY.

On Fri, Oct 7, 2016 at 5:55 PM, Zameer Manji <zm...@apache.org> wrote:

> Thanks for clearing that up.
>
> I've cced Joshua Cohen (who is currently maintaining thermos) to weigh in
> here.
>
> I suspect that deprecating this blindly might break something for tasks
> under the Docker Containerizer.
>
> On Fri, Oct 7, 2016 at 5:33 PM, Jie Yu <yu...@gmail.com> wrote:
>
>> https://github.com/apache/mesos/blob/master/docs/versioning.md
>>
>> "The deprecation period for any given feature will be 6 months. Having a
>> set period allows Mesos developers to not indefinitely accrue technical
>> debt and allows users time to plan for upgrades."
>>
>> - Jie
>>
>> On Fri, Oct 7, 2016 at 5:28 PM, Zameer Manji <zm...@apache.org> wrote:
>>
>> > Jie,
>> >
>> > Without commenting on this deprecation, how is this going to work now
>> that
>> > Mesos is 1.0?
>> >
>> > What is the definition of "deprecate" being used here? Is it something
>> that
>> > will be removed in Mesos 2.0?
>> >
>> > On Fri, Oct 7, 2016 at 4:49 PM, Jie Yu <yu...@gmail.com> wrote:
>> >
>> > > Hi,
>> > >
>> > > Want to initiate a discussion here. Before Mesos containerizer has
>> > > container image support (all containers share the same host file
>> system),
>> > > $MESOS_DIRECTORY env variable is used to let executor know their
>> sandbox
>> > > location.
>> > >
>> > > Later, we introduced container image support to Mesos containerizer so
>> > that
>> > > each container can has its own root filesystem. Due to some historical
>> > > reason (thermos), we decided to keep $MESOS_DIRECTORY to be the path
>> to
>> > the
>> > > sandbox on the host filesystem (e.g., `/var/lib/mesos/slaves/...`)
>> even
>> > if
>> > > the container has its own root filesystem. And introduced a new
>> > > $MESOS_SANDBOX to point to the sandbox in the container's root
>> filesystem
>> > > (e.g., `/mnt/mesos/sandbox`). If the container does not have a root
>> > > filesystem, $MESOS_DIRECTORY == $MESOS_SANDBOX.
>> > >
>> > > Now, we plan to deprecate $MESOS_DIRECTORY because it'll be really
>> > > confusing to executor writers, and it'll be an error if they try to
>> > access
>> > > $MESOS_DIRECTORY if their container has a root filesystem defined.
>> > >
>> > > - Jie
>> > >
>> > > --
>> > > Zameer Manji
>> > >
>> >
>>
>> --
>> Zameer Manji
>>
>

Re: Deprecate MESOS_DIRECTORY executor environment variable

Posted by Zameer Manji <zm...@apache.org>.
Thanks for clearing that up.

I've cced Joshua Cohen (who is currently maintaining thermos) to weigh in
here.

I suspect that deprecating this blindly might break something for tasks
under the Docker Containerizer.

On Fri, Oct 7, 2016 at 5:33 PM, Jie Yu <yu...@gmail.com> wrote:

> https://github.com/apache/mesos/blob/master/docs/versioning.md
>
> "The deprecation period for any given feature will be 6 months. Having a
> set period allows Mesos developers to not indefinitely accrue technical
> debt and allows users time to plan for upgrades."
>
> - Jie
>
> On Fri, Oct 7, 2016 at 5:28 PM, Zameer Manji <zm...@apache.org> wrote:
>
> > Jie,
> >
> > Without commenting on this deprecation, how is this going to work now
> that
> > Mesos is 1.0?
> >
> > What is the definition of "deprecate" being used here? Is it something
> that
> > will be removed in Mesos 2.0?
> >
> > On Fri, Oct 7, 2016 at 4:49 PM, Jie Yu <yu...@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > Want to initiate a discussion here. Before Mesos containerizer has
> > > container image support (all containers share the same host file
> system),
> > > $MESOS_DIRECTORY env variable is used to let executor know their
> sandbox
> > > location.
> > >
> > > Later, we introduced container image support to Mesos containerizer so
> > that
> > > each container can has its own root filesystem. Due to some historical
> > > reason (thermos), we decided to keep $MESOS_DIRECTORY to be the path to
> > the
> > > sandbox on the host filesystem (e.g., `/var/lib/mesos/slaves/...`) even
> > if
> > > the container has its own root filesystem. And introduced a new
> > > $MESOS_SANDBOX to point to the sandbox in the container's root
> filesystem
> > > (e.g., `/mnt/mesos/sandbox`). If the container does not have a root
> > > filesystem, $MESOS_DIRECTORY == $MESOS_SANDBOX.
> > >
> > > Now, we plan to deprecate $MESOS_DIRECTORY because it'll be really
> > > confusing to executor writers, and it'll be an error if they try to
> > access
> > > $MESOS_DIRECTORY if their container has a root filesystem defined.
> > >
> > > - Jie
> > >
> > > --
> > > Zameer Manji
> > >
> >
>
> --
> Zameer Manji
>

Re: Deprecate MESOS_DIRECTORY executor environment variable

Posted by Jie Yu <yu...@gmail.com>.
https://github.com/apache/mesos/blob/master/docs/versioning.md

"The deprecation period for any given feature will be 6 months. Having a
set period allows Mesos developers to not indefinitely accrue technical
debt and allows users time to plan for upgrades."

- Jie

On Fri, Oct 7, 2016 at 5:28 PM, Zameer Manji <zm...@apache.org> wrote:

> Jie,
>
> Without commenting on this deprecation, how is this going to work now that
> Mesos is 1.0?
>
> What is the definition of "deprecate" being used here? Is it something that
> will be removed in Mesos 2.0?
>
> On Fri, Oct 7, 2016 at 4:49 PM, Jie Yu <yu...@gmail.com> wrote:
>
> > Hi,
> >
> > Want to initiate a discussion here. Before Mesos containerizer has
> > container image support (all containers share the same host file system),
> > $MESOS_DIRECTORY env variable is used to let executor know their sandbox
> > location.
> >
> > Later, we introduced container image support to Mesos containerizer so
> that
> > each container can has its own root filesystem. Due to some historical
> > reason (thermos), we decided to keep $MESOS_DIRECTORY to be the path to
> the
> > sandbox on the host filesystem (e.g., `/var/lib/mesos/slaves/...`) even
> if
> > the container has its own root filesystem. And introduced a new
> > $MESOS_SANDBOX to point to the sandbox in the container's root filesystem
> > (e.g., `/mnt/mesos/sandbox`). If the container does not have a root
> > filesystem, $MESOS_DIRECTORY == $MESOS_SANDBOX.
> >
> > Now, we plan to deprecate $MESOS_DIRECTORY because it'll be really
> > confusing to executor writers, and it'll be an error if they try to
> access
> > $MESOS_DIRECTORY if their container has a root filesystem defined.
> >
> > - Jie
> >
> > --
> > Zameer Manji
> >
>

Re: Deprecate MESOS_DIRECTORY executor environment variable

Posted by Zameer Manji <zm...@apache.org>.
Jie,

Without commenting on this deprecation, how is this going to work now that
Mesos is 1.0?

What is the definition of "deprecate" being used here? Is it something that
will be removed in Mesos 2.0?

On Fri, Oct 7, 2016 at 4:49 PM, Jie Yu <yu...@gmail.com> wrote:

> Hi,
>
> Want to initiate a discussion here. Before Mesos containerizer has
> container image support (all containers share the same host file system),
> $MESOS_DIRECTORY env variable is used to let executor know their sandbox
> location.
>
> Later, we introduced container image support to Mesos containerizer so that
> each container can has its own root filesystem. Due to some historical
> reason (thermos), we decided to keep $MESOS_DIRECTORY to be the path to the
> sandbox on the host filesystem (e.g., `/var/lib/mesos/slaves/...`) even if
> the container has its own root filesystem. And introduced a new
> $MESOS_SANDBOX to point to the sandbox in the container's root filesystem
> (e.g., `/mnt/mesos/sandbox`). If the container does not have a root
> filesystem, $MESOS_DIRECTORY == $MESOS_SANDBOX.
>
> Now, we plan to deprecate $MESOS_DIRECTORY because it'll be really
> confusing to executor writers, and it'll be an error if they try to access
> $MESOS_DIRECTORY if their container has a root filesystem defined.
>
> - Jie
>
> --
> Zameer Manji
>

Re: Deprecate MESOS_DIRECTORY executor environment variable

Posted by Jie Yu <yu...@gmail.com>.
>
> This sandbox host path information is available through the agent's
> /state endpoint but I don't think it's available via the agent HTTP API?


@vinodkone, can you confirm this?

On Fri, Oct 7, 2016 at 6:10 PM, Yan Xu <xu...@apple.com> wrote:

> I agree that the executor shouldn't need to known about the sandbox host
> path for itself but today it provides a way for the information to be
> propagated to the scheduler or external systems.
>
> I don't remember how thermos observer works but I guess the executor
> registers itself to a the observer and provides it with information about
> the host path for its sandbox? I could be incorrect about thermos but this
> usage pattern exists elsewhere as well and will break after this change.
>
> Overall I agree that we should deprecate this usage pattern but it's worth
> providing solutions to replace it. This sandbox host path information is
> available through the agent's /state endpoint but I don't think it's
> available via the agent HTTP API? The `GetExecutors` call doesn't return
> this path but its `ListFiles` and `ReadFile` calls expect this path. Should
> the host path be added to the result of GetExecutors call? (This being just
> one example)
>
> On Fri, Oct 7, 2016 at 4:49 PM, Jie Yu <yu...@gmail.com> wrote:
>
> > Hi,
> >
> > Want to initiate a discussion here. Before Mesos containerizer has
> > container image support (all containers share the same host file system),
> > $MESOS_DIRECTORY env variable is used to let executor know their sandbox
> > location.
> >
> > Later, we introduced container image support to Mesos containerizer so
> that
> > each container can has its own root filesystem. Due to some historical
> > reason (thermos), we decided to keep $MESOS_DIRECTORY to be the path to
> the
> > sandbox on the host filesystem (e.g., `/var/lib/mesos/slaves/...`) even
> if
> > the container has its own root filesystem. And introduced a new
> > $MESOS_SANDBOX to point to the sandbox in the container's root filesystem
> > (e.g., `/mnt/mesos/sandbox`). If the container does not have a root
> > filesystem, $MESOS_DIRECTORY == $MESOS_SANDBOX.
> >
> > Now, we plan to deprecate $MESOS_DIRECTORY because it'll be really
> > confusing to executor writers, and it'll be an error if they try to
> access
> > $MESOS_DIRECTORY if their container has a root filesystem defined.
> >
> > - Jie
> >
>

Re: Deprecate MESOS_DIRECTORY executor environment variable

Posted by Yan Xu <xu...@apple.com>.
I agree that the executor shouldn't need to known about the sandbox host
path for itself but today it provides a way for the information to be
propagated to the scheduler or external systems.

I don't remember how thermos observer works but I guess the executor
registers itself to a the observer and provides it with information about
the host path for its sandbox? I could be incorrect about thermos but this
usage pattern exists elsewhere as well and will break after this change.

Overall I agree that we should deprecate this usage pattern but it's worth
providing solutions to replace it. This sandbox host path information is
available through the agent's /state endpoint but I don't think it's
available via the agent HTTP API? The `GetExecutors` call doesn't return
this path but its `ListFiles` and `ReadFile` calls expect this path. Should
the host path be added to the result of GetExecutors call? (This being just
one example)

On Fri, Oct 7, 2016 at 4:49 PM, Jie Yu <yu...@gmail.com> wrote:

> Hi,
>
> Want to initiate a discussion here. Before Mesos containerizer has
> container image support (all containers share the same host file system),
> $MESOS_DIRECTORY env variable is used to let executor know their sandbox
> location.
>
> Later, we introduced container image support to Mesos containerizer so that
> each container can has its own root filesystem. Due to some historical
> reason (thermos), we decided to keep $MESOS_DIRECTORY to be the path to the
> sandbox on the host filesystem (e.g., `/var/lib/mesos/slaves/...`) even if
> the container has its own root filesystem. And introduced a new
> $MESOS_SANDBOX to point to the sandbox in the container's root filesystem
> (e.g., `/mnt/mesos/sandbox`). If the container does not have a root
> filesystem, $MESOS_DIRECTORY == $MESOS_SANDBOX.
>
> Now, we plan to deprecate $MESOS_DIRECTORY because it'll be really
> confusing to executor writers, and it'll be an error if they try to access
> $MESOS_DIRECTORY if their container has a root filesystem defined.
>
> - Jie
>