> On July 13, 2015, 5:46 p.m., Cody Maloney wrote: > > src/master/main.cpp, line 35 > > <https://reviews.apache.org/r/36425/diff/2/?file=1009590#file1009590line35> > > > > unused include
how did you find out? (I really miss IntelliJ highlighting that for me in Java...) > On July 13, 2015, 5:46 p.m., Cody Maloney wrote: > > src/master/main.cpp, line 148 > > <https://reviews.apache.org/r/36425/diff/2/?file=1009590#file1009590line148> > > > > Supersedes -> Overrides like you did in the docs? yes - fixed. > On July 13, 2015, 5:46 p.m., Cody Maloney wrote: > > src/master/main.cpp, line 211 > > <https://reviews.apache.org/r/36425/diff/2/?file=1009590#file1009590line211> > > > > Could you add a basic "Can we change this discoveredIp -> an actual IP > > address" check here? The error message when LIBPROCESS_IP ends up > > incorrect inside libprocess is going to not say very cleanly where that > > value came from, and I suspect when doing iteration it will be fairly > > common for people to write IP scripts which give incorrect / invalid output. This is what happens when you give a non-parseable IP: ``` $ ./bin/mesos-master.sh --ip_discovery_script=~/discovery-ip.py --work_dir=/tmp WARNING: Logging before InitGoogleLogging() is written to STDERR I0713 12:12:52.721210 1955922688 main.cpp:185] Discovering Master server IP using ~/discovery-ip.py I0713 12:12:52.741296 1955922688 main.cpp:211] Setting IP for Mesos Master to: [10.0.77.243/24] F0713 12:12:52.741581 1955922688 process.cpp:861] Parsing LIBPROCESS_IP=10.0.77.243/24 failed: Failed to parse the IP *** Check failure stack trace: *** Abort trap: 6 ``` and, if things go catastophically off the rails: ``` $ ./bin/mesos-master.sh --ip_discovery_script=~/discovery-ip.py --work_dir=/tmp WARNING: Logging before InitGoogleLogging() is written to STDERR I0713 12:15:07.231408 1955922688 main.cpp:185] Discovering Master server IP using ~/discovery-ip.py I0713 12:15:07.251881 1955922688 main.cpp:211] Setting IP for Mesos Master to: [mesos-master.rack-101.az12.comcast.wp.com] F0713 12:15:07.252142 1955922688 process.cpp:861] Parsing LIBPROCESS_IP=mesos-master.rack-101.az12.comcast.wp.com failed: Failed to parse the IP *** Check failure stack trace: *** Abort trap: 6 ``` Looks pretty clear to me what went on? - Marco ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/36425/#review91492 ----------------------------------------------------------- On July 13, 2015, 4:35 p.m., Marco Massenzio wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/36425/ > ----------------------------------------------------------- > > (Updated July 13, 2015, 4:35 p.m.) > > > Review request for mesos, Benjamin Hindman and Cody Maloney. > > > Bugs: MESOS-2902 > https://issues.apache.org/jira/browse/MESOS-2902 > > > Repository: mesos > > > Description > ------- > > Jira: MESOS-2902 > > It is sometimes useful to enable an external script to > configure the IP address the Mesos Master will bind to > on the server, where it's not desirable to set the > --ip flag and/or a "wrapper" script is not a viable option. > > This patch adds a --ip_discovery_script to point to a local > script that will emit as its only output the IP address that > the Master will bind to: only spaces and newlines are allowed; > further, as we cannot use the `libprocess` sub-processing > facilities, we cannot timeout the script, should this block > for long times (or even forever). > > This will override the --ip flag, which, even if set, will be > ignored. > > > Diffs > ----- > > docs/configuration.md feee5594c88112f77ce382cb3dd8628653f92d01 > src/master/main.cpp fd4de4d0d9c3e9617408022d10b5e161bdc911e1 > > Diff: https://reviews.apache.org/r/36425/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Marco Massenzio > >
