mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chi Zhang" <chzhc...@gmail.com>
Subject Re: Review Request 28966: PortMappingIsolator: added a metric to expose the number of TC IP filters on eth0.
Date Tue, 16 Dec 2014 01:58:35 GMT


> On Dec. 12, 2014, 11 p.m., Dominic Hamon wrote:
> > src/slave/containerizer/isolators/network/port_mapping.cpp, line 712
> > <https://reviews.apache.org/r/28966/diff/2/?file=790814#file790814line712>
> >
> >     how expensive is this going to be? Can we determine the number of filters without
constructing the port ranges, or cache the number of filters we've added?

Pretty cheap. Number of infos is the number of containers, which is small. 

::getPortRanges is just doing some simple math to break up an interval into port ranges.


> On Dec. 12, 2014, 11 p.m., Dominic Hamon wrote:
> > src/slave/containerizer/isolators/network/port_mapping.cpp, line 633
> > <https://reviews.apache.org/r/28966/diff/2/?file=790814#file790814line633>
> >
> >     instead of this, you can pass in the PID<PortMappingIsolatorProcess> directly
to the contstructor and initialize the Metrics object with (self()).
> >     
> >     Just check that order of construction is correct and 'self()' will return the
right thing ;)

Tried, but hit the same template deduction issue. self() return PID<T> in Process<T>,
so again, even though PortMappingIsolatorProcess is a subclass of IsolatorProcess, GCC thinks
T is IsolatorProcess, because IsolatorProcess is a Process<IsolatorProcess>. And the
PID doesn't allow downcast from IsolatorProcess to PortMappingIsolatorProcess.


- Chi


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


On Dec. 16, 2014, 1:54 a.m., Chi Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28966/
> -----------------------------------------------------------
> 
> (Updated Dec. 16, 2014, 1:54 a.m.)
> 
> 
> Review request for mesos, Dominic Hamon, Ian Downes, and Jie Yu.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> also added a test.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/isolators/network/port_mapping.hpp f1e2352 
>   src/slave/containerizer/isolators/network/port_mapping.cpp 2d81336 
>   src/tests/port_mapping_tests.cpp eb82993 
> 
> Diff: https://reviews.apache.org/r/28966/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Chi Zhang
> 
>


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