mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Avinash sridharan <avin...@mesosphere.io>
Subject Re: Review Request 60720: Fixed initialization of `__address__` in the abscense of `--ip` flag.
Date Mon, 10 Jul 2017 18:42:01 GMT


> On July 7, 2017, 11:18 p.m., Jiang Yan Xu wrote:
> > 3rdparty/libprocess/src/process.cpp
> > Line 1135 (original), 1135 (patched)
> > <https://reviews.apache.org/r/60720/diff/1/?file=1771682#file1771682line1135>
> >
> >     You are (re)initalizing/resetting this `__address__` but not `__address6__`
(to None). Should they be consistent?
> >     
> >     Given it's initialized at definition and reset during `finailize` perhaps it
doesn't need to be done here?
> >     
> >     If it needs to be done, can it be moved down closer to where the modifications/reassignments
are done?
> 
> Avinash sridharan wrote:
>     `__address6__` is optional hence we don't initialize it (in fact its initalized to
`None()`)
> 
> Jiang Yan Xu wrote:
>     Yeah I understand so that's why I used "(re)initalizing/resetting" in the comment.
My comment is about the inconsistency:
>     
>     `__address__` is (re)set to ANY_ANY:
>     
>     - At definition.
>     - In finalize().
>     - In initialize().
>     
>     `__address6__` is (re)set to None:
>     
>     - At definition.
>     - In finalize().
>     
>     Seems like there's no reason they need to be different despite `__address6__` is
`Option`al.

Ah !! I c your point. This makes sense, for consistency we should initialize it to `None()`.


> On July 7, 2017, 11:18 p.m., Jiang Yan Xu wrote:
> > 3rdparty/libprocess/src/process.cpp
> > Line 1191 (original), 1192 (patched)
> > <https://reviews.apache.org/r/60720/diff/1/?file=1771682#file1771682line1192>
> >
> >     Should `advertise_ip` be treated the same way as `ip`? i.e., flag validation
and choice between reassignment and modification.
> 
> Avinash sridharan wrote:
>     Once we move to the pattern of doing `__address__.ip = libprocess_flags->ip.get()`
I think handling of `__address__` for `--ip` and `--advertise_ip` will be the same.
> 
> Jiang Yan Xu wrote:
>     What about flag vaidation?

Yeah you are right we should validate `advertise_ip` the same way we validate `ip`. Will add
this as well.


- Avinash


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/60720/#review179958
-----------------------------------------------------------


On July 8, 2017, 12:08 a.m., Avinash sridharan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60720/
> -----------------------------------------------------------
> 
> (Updated July 8, 2017, 12:08 a.m.)
> 
> 
> Review request for mesos and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-7769
>     https://issues.apache.org/jira/browse/MESOS-7769
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> When we introduced the `__address6__ optional IPv6 storage into
> `libprocess` we also introduced a regression because of which the `port`
> doesn't get initialized to whatever is specified in the `--port` flag
> until the `--ip` flag is specified.
> 
> This change fixes the initialization of the `__address__` in the
> absence of the `--ip` flag.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/process.cpp 264298c16199ded4ccbf948f6893f4209c23aed0 
> 
> 
> Diff: https://reviews.apache.org/r/60720/diff/1/
> 
> 
> Testing
> -------
> 
> sudo ./build/bin/mesos-agent.sh  --port=5059 --master=10.0.2.15:5050 --work_dir=/tmp/mesos
> tcp        0      0 0.0.0.0:5059            0.0.0.0:*               LISTEN
> 
> sudo ./build/bin/mesos-agent.sh  --ip=10.0.2.15 --port=5059 --master=10.0.2.15:5050 --work_dir=/tmp/mesos
> tcp        0      0 10.0.2.15:5059          0.0.0.0:*               LISTEN
> 
> 
> Thanks,
> 
> Avinash sridharan
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message