mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jiang Yan Xu <...@jxu.me>
Subject Re: Review Request 60720: Fixed initialization of `__address__` in the abscense of `--ip` flag.
Date Mon, 10 Jul 2017 16:12:57 GMT


> On July 7, 2017, 4: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()`)

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.


> On July 7, 2017, 4:18 p.m., Jiang Yan Xu wrote:
> > 3rdparty/libprocess/src/process.cpp
> > Lines 1151-1157 (original), 1151-1158 (patched)
> > <https://reviews.apache.org/r/60720/diff/1/?file=1771682#file1771682line1151>
> >
> >     Why do you need to modify the current instance of `__address__` in the case
above but but have to create a new instance of `inet::Address` in the case below?
> >     
> >     Can they be made consistent?
> 
> Avinash sridharan wrote:
>     yeah I can just set `__address__.ip = libprocess_flags->ip.get()`

+1.


> On July 7, 2017, 4: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.

What about flag vaidation?


- Jiang Yan


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


On July 7, 2017, 5:08 p.m., Avinash sridharan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/60720/
> -----------------------------------------------------------
> 
> (Updated July 7, 2017, 5:08 p.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