[jira] [Commented] (MESOS-3340) Command-line flags should take precedence over OS Env variables
[ https://issues.apache.org/jira/browse/MESOS-3340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14791568#comment-14791568 ] Marco Massenzio commented on MESOS-3340: yep - it would really be nice to have it in 0.25 - bumped {{target.version}} let's see if we can make it... > Command-line flags should take precedence over OS Env variables > --- > > Key: MESOS-3340 > URL: https://issues.apache.org/jira/browse/MESOS-3340 > Project: Mesos > Issue Type: Improvement > Components: stout >Affects Versions: 0.24.0 >Reporter: Marco Massenzio >Assignee: Klaus Ma > Labels: mesosphere, tech-debt > > Currently, it appears that re-defining a flag on the command-line that was > already defined via a OS Env var ({{MESOS_*}}) causes the Master to fail with > a not very helpful message. > For example, if one has {{MESOS_QUORUM}} defined, this happens: > {noformat} > $ ./mesos-master --zk=zk://192.168.1.4/mesos --quorum=1 > --hostname=192.168.1.4 --ip=192.168.1.4 > Duplicate flag 'quorum' on command line > {noformat} > which is not very helpful. > Ideally, we would parse the flags with a "well-known" priority (command-line > first, environment last) - but at the very least, the error message should be > more helpful in explaining what the issue is. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3340) Command-line flags should take precedence over OS Env variables
[ https://issues.apache.org/jira/browse/MESOS-3340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14791441#comment-14791441 ] Klaus Ma commented on MESOS-3340: - [~mcypark], do you have more comments? If not, maybe we can include this one in 0.25.0 :). > Command-line flags should take precedence over OS Env variables > --- > > Key: MESOS-3340 > URL: https://issues.apache.org/jira/browse/MESOS-3340 > Project: Mesos > Issue Type: Improvement > Components: stout >Affects Versions: 0.24.0 >Reporter: Marco Massenzio >Assignee: Klaus Ma > Labels: mesosphere, tech-debt > > Currently, it appears that re-defining a flag on the command-line that was > already defined via a OS Env var ({{MESOS_*}}) causes the Master to fail with > a not very helpful message. > For example, if one has {{MESOS_QUORUM}} defined, this happens: > {noformat} > $ ./mesos-master --zk=zk://192.168.1.4/mesos --quorum=1 > --hostname=192.168.1.4 --ip=192.168.1.4 > Duplicate flag 'quorum' on command line > {noformat} > which is not very helpful. > Ideally, we would parse the flags with a "well-known" priority (command-line > first, environment last) - but at the very least, the error message should be > more helpful in explaining what the issue is. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3340) Command-line flags should take precedence over OS Env variables
[ https://issues.apache.org/jira/browse/MESOS-3340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14744944#comment-14744944 ] Klaus Ma commented on MESOS-3340: - Sure, I've sent an email to user@ mailing list :). > Command-line flags should take precedence over OS Env variables > --- > > Key: MESOS-3340 > URL: https://issues.apache.org/jira/browse/MESOS-3340 > Project: Mesos > Issue Type: Improvement > Components: stout >Affects Versions: 0.24.0 >Reporter: Marco Massenzio >Assignee: Klaus Ma > Labels: mesosphere, tech-debt > > Currently, it appears that re-defining a flag on the command-line that was > already defined via a OS Env var ({{MESOS_*}}) causes the Master to fail with > a not very helpful message. > For example, if one has {{MESOS_QUORUM}} defined, this happens: > {noformat} > $ ./mesos-master --zk=zk://192.168.1.4/mesos --quorum=1 > --hostname=192.168.1.4 --ip=192.168.1.4 > Duplicate flag 'quorum' on command line > {noformat} > which is not very helpful. > Ideally, we would parse the flags with a "well-known" priority (command-line > first, environment last) - but at the very least, the error message should be > more helpful in explaining what the issue is. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3340) Command-line flags should take precedence over OS Env variables
[ https://issues.apache.org/jira/browse/MESOS-3340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14744093#comment-14744093 ] Marco Massenzio commented on MESOS-3340: Awesome - we all seem to be all in agreement; how about we drop a line to the user@ mailing list, alerting of the impending change and see if anyone raises objections and/or identifies some use cases that we may have missed? As the scenario [~mcypark] outlined is exactly the one I had in mind and that seems the most commonly encountered, I think it should be relatively uncontroversial a change - but better move with caution here, as we risk breaking a few folks' deployment scripts here... Thanks, fellas! > Command-line flags should take precedence over OS Env variables > --- > > Key: MESOS-3340 > URL: https://issues.apache.org/jira/browse/MESOS-3340 > Project: Mesos > Issue Type: Improvement > Components: stout >Affects Versions: 0.24.0 >Reporter: Marco Massenzio >Assignee: Klaus Ma > Labels: mesosphere, tech-debt > > Currently, it appears that re-defining a flag on the command-line that was > already defined via a OS Env var ({{MESOS_*}}) causes the Master to fail with > a not very helpful message. > For example, if one has {{MESOS_QUORUM}} defined, this happens: > {noformat} > $ ./mesos-master --zk=zk://192.168.1.4/mesos --quorum=1 > --hostname=192.168.1.4 --ip=192.168.1.4 > Duplicate flag 'quorum' on command line > {noformat} > which is not very helpful. > Ideally, we would parse the flags with a "well-known" priority (command-line > first, environment last) - but at the very least, the error message should be > more helpful in explaining what the issue is. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3340) Command-line flags should take precedence over OS Env variables
[ https://issues.apache.org/jira/browse/MESOS-3340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14742332#comment-14742332 ] Klaus Ma commented on MESOS-3340: - I'm OK to prioritize command-line flags over environment variables; the code diff was updated accordingly. My previous "description" is that: some user may want to use env to overwrite cli, for example, the slaves were started by {{--ip}}, but he want to overwrite it by env in {{.bashrc}}; because {{.bashrc}} is in shared directory and start scripts are deployed in production. I was thinking to ask Operator to configure cluster explicitly. > Command-line flags should take precedence over OS Env variables > --- > > Key: MESOS-3340 > URL: https://issues.apache.org/jira/browse/MESOS-3340 > Project: Mesos > Issue Type: Improvement > Components: stout >Affects Versions: 0.24.0 >Reporter: Marco Massenzio >Assignee: Klaus Ma > Labels: mesosphere, tech-debt > > Currently, it appears that re-defining a flag on the command-line that was > already defined via a OS Env var ({{MESOS_*}}) causes the Master to fail with > a not very helpful message. > For example, if one has {{MESOS_QUORUM}} defined, this happens: > {noformat} > $ ./mesos-master --zk=zk://192.168.1.4/mesos --quorum=1 > --hostname=192.168.1.4 --ip=192.168.1.4 > Duplicate flag 'quorum' on command line > {noformat} > which is not very helpful. > Ideally, we would parse the flags with a "well-known" priority (command-line > first, environment last) - but at the very least, the error message should be > more helpful in explaining what the issue is. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3340) Command-line flags should take precedence over OS Env variables
[ https://issues.apache.org/jira/browse/MESOS-3340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14741915#comment-14741915 ] Michael Park commented on MESOS-3340: - [~marco-mesos] I think it does make sense to prioritize command-line flags over environment variables. [~klaus1982] mentioned in the description of his review request that he implemented it that way since he thinks overwriting may cause confusion for the user. I would imagine people typically have {{export MESOS_IP=127.0.0.1}} in their {{bashrc}} which they use in most cases by default, and provide the {{--ip=127.168.1.2}} on occasions (e.g. testing) when they want to override it. Having to change it or having to unset it in order to provide the command line flag I think would make it more difficult to use. A similar situation exists in SSL, where flags {{verify_cert}} and {{require_cert}} can conflict. If {{require_cert = true}} and {{verify_cert = false}}, rather than causing an error, we simply override the {{verify_cert}} flag to {{true}} and proceed. [~klaus1982]: What do you think? > Command-line flags should take precedence over OS Env variables > --- > > Key: MESOS-3340 > URL: https://issues.apache.org/jira/browse/MESOS-3340 > Project: Mesos > Issue Type: Improvement > Components: stout >Affects Versions: 0.24.0 >Reporter: Marco Massenzio >Assignee: Klaus Ma > Labels: mesosphere, tech-debt > > Currently, it appears that re-defining a flag on the command-line that was > already defined via a OS Env var ({{MESOS_*}}) causes the Master to fail with > a not very helpful message. > For example, if one has {{MESOS_QUORUM}} defined, this happens: > {noformat} > $ ./mesos-master --zk=zk://192.168.1.4/mesos --quorum=1 > --hostname=192.168.1.4 --ip=192.168.1.4 > Duplicate flag 'quorum' on command line > {noformat} > which is not very helpful. > Ideally, we would parse the flags with a "well-known" priority (command-line > first, environment last) - but at the very least, the error message should be > more helpful in explaining what the issue is. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3340) Command-line flags should take precedence over OS Env variables
[ https://issues.apache.org/jira/browse/MESOS-3340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14741611#comment-14741611 ] Marco Massenzio commented on MESOS-3340: Thanks [~mcypark] for taking this up. I've done a first round of review. The main question (for which I don't really have an answer) is whether we should actually have a "priority" for flags (e.g., {{command-line; OS Env; default value}}) and, instead of erroring out, we should just use the highest priority value provided by the user. In other words: {noformat} MESOS_IP=127.0.0.1 ./bin/mesos-master.sh --ip=192.168.1.2 ... {noformat} would result in {{hostname == "192.168.1.2"}} instead of an error. What do you think, [~mcypark]? [cc: [~vinodkone]] > Command-line flags should take precedence over OS Env variables > --- > > Key: MESOS-3340 > URL: https://issues.apache.org/jira/browse/MESOS-3340 > Project: Mesos > Issue Type: Improvement > Components: stout >Affects Versions: 0.24.0 >Reporter: Marco Massenzio >Assignee: Klaus Ma > Labels: mesosphere, tech-debt > > Currently, it appears that re-defining a flag on the command-line that was > already defined via a OS Env var ({{MESOS_*}}) causes the Master to fail with > a not very helpful message. > For example, if one has {{MESOS_QUORUM}} defined, this happens: > {noformat} > $ ./mesos-master --zk=zk://192.168.1.4/mesos --quorum=1 > --hostname=192.168.1.4 --ip=192.168.1.4 > Duplicate flag 'quorum' on command line > {noformat} > which is not very helpful. > Ideally, we would parse the flags with a "well-known" priority (command-line > first, environment last) - but at the very least, the error message should be > more helpful in explaining what the issue is. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3340) Command-line flags should take precedence over OS Env variables
[ https://issues.apache.org/jira/browse/MESOS-3340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14738968#comment-14738968 ] Bernd Mathiske commented on MESOS-3340: --- I'd love to help, but I will be on vacation soon, for 2 weeks. I'll try to find someone for you. > Command-line flags should take precedence over OS Env variables > --- > > Key: MESOS-3340 > URL: https://issues.apache.org/jira/browse/MESOS-3340 > Project: Mesos > Issue Type: Improvement > Components: stout >Affects Versions: 0.24.0 >Reporter: Marco Massenzio >Assignee: Klaus Ma > Labels: mesosphere, tech-debt > > Currently, it appears that re-defining a flag on the command-line that was > already defined via a OS Env var ({{MESOS_*}}) causes the Master to fail with > a not very helpful message. > For example, if one has {{MESOS_QUORUM}} defined, this happens: > {noformat} > $ ./mesos-master --zk=zk://192.168.1.4/mesos --quorum=1 > --hostname=192.168.1.4 --ip=192.168.1.4 > Duplicate flag 'quorum' on command line > {noformat} > which is not very helpful. > Ideally, we would parse the flags with a "well-known" priority (command-line > first, environment last) - but at the very least, the error message should be > more helpful in explaining what the issue is. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MESOS-3340) Command-line flags should take precedence over OS Env variables
[ https://issues.apache.org/jira/browse/MESOS-3340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14738963#comment-14738963 ] Klaus Ma commented on MESOS-3340: - RR: https://reviews.apache.org/r/38259/ , [~bernd-mesos], would you help to shepherd on this ticket? Current solution is to throw error if any duplicated item. > Command-line flags should take precedence over OS Env variables > --- > > Key: MESOS-3340 > URL: https://issues.apache.org/jira/browse/MESOS-3340 > Project: Mesos > Issue Type: Improvement > Components: stout >Affects Versions: 0.24.0 >Reporter: Marco Massenzio >Assignee: Klaus Ma > Labels: mesosphere, tech-debt > > Currently, it appears that re-defining a flag on the command-line that was > already defined via a OS Env var ({{MESOS_*}}) causes the Master to fail with > a not very helpful message. > For example, if one has {{MESOS_QUORUM}} defined, this happens: > {noformat} > $ ./mesos-master --zk=zk://192.168.1.4/mesos --quorum=1 > --hostname=192.168.1.4 --ip=192.168.1.4 > Duplicate flag 'quorum' on command line > {noformat} > which is not very helpful. > Ideally, we would parse the flags with a "well-known" priority (command-line > first, environment last) - but at the very least, the error message should be > more helpful in explaining what the issue is. -- This message was sent by Atlassian JIRA (v6.3.4#6332)