mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joseph Wu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MESOS-4609) Subprocess should be more intelligent about setting/inheriting libprocess environment variables
Date Wed, 23 Nov 2016 22:01:58 GMT

    [ https://issues.apache.org/jira/browse/MESOS-4609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15691474#comment-15691474
] 

Joseph Wu commented on MESOS-4609:
----------------------------------

Committed the refactoring parts of this ticket: {code}
commit d022300acc907bfe507a7cb8f1c5767a2bd6d7bb
Author: Armand Grillet <armand.grillet@gmail.com>
Date:   Wed Nov 23 13:21:31 2016 -0800

    Added net::IP parsing template to the flags parsers.
    
    This will allow us to specify the `net::IP` type
    as a field inside flags.
    
    Review: https://reviews.apache.org/r/53558/
{code}
{code}
commit 1d33559fad35a4ca84f275b1c1544aa5afa48e28
Author: Armand Grillet <armand.grillet@gmail.com>
Date:   Wed Nov 23 13:21:32 2016 -0800

    Transformed env variable parsing into Flags in libprocess.
    
    This retains existing environment variables read by libprocess
    (LIBPROCESS + IP, ADVERTISE_IP, PORT, ADVERTISE_PORT) but parsing
    is done via a Flags object.  This also documents the behavior and
    expectations of the flags, and prints a more helpful error message
    if the environment variables are set incorrectly.
    
    Review: https://reviews.apache.org/r/53559/
{code}

> Subprocess should be more intelligent about setting/inheriting libprocess environment
variables 
> ------------------------------------------------------------------------------------------------
>
>                 Key: MESOS-4609
>                 URL: https://issues.apache.org/jira/browse/MESOS-4609
>             Project: Mesos
>          Issue Type: Bug
>          Components: libprocess
>    Affects Versions: 0.27.0
>            Reporter: Joseph Wu
>              Labels: mesosphere
>
> Mostly copied from [this comment|https://issues.apache.org/jira/browse/MESOS-4598?focusedCommentId=15133497&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15133497]
> A subprocess inheriting the environment variables {{LIBPROCESS_*}} may run into some
accidental fatalities:
> | || Subprocess uses libprocess || Subprocess is something else ||
> || Subprocess sets/inherits the same {{PORT}} by accident | Bind failure -> exit |
Nothing happens (?) |
> || Subprocess sets a different {{PORT}} on purpose | Bind success (?) | Nothing happens
(?) |
> (?) = means this is usually the case, but not 100%.
> A complete fix would look something like:
> * If the {{subprocess}} call gets {{environment = None()}}, we should automatically remove
{{LIBPROCESS_PORT}} from the inherited environment.  
> * The parts of [{{executorEnvironment}}|https://github.com/apache/mesos/blame/master/src/slave/containerizer/containerizer.cpp#L265]
dealing with libprocess & libmesos should be refactored into libprocess as a helper. 
We would use this helper for the Containerizer, Fetcher, and ContainerLogger module.
> * If the {{subprocess}} call is given {{LIBPROCESS_PORT == os::getenv("LIBPROCESS_PORT")}},
we can LOG(WARN) and unset the env var locally.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message