> On Aug. 14, 2020, 6:21 a.m., Greg Mann wrote:
> > src/csi/service_manager.cpp
> > Lines 740 (patched)
> > <https://reviews.apache.org/r/72759/diff/1/?file=2237900#file2237900line740>
> >
> >     Where does this env var name come from, 'MESOS_NODE_ID'?
> 
> Qian Zhang wrote:
>     Orginially I wanted to just name it `NODE_ID`, however I think it is too 
> generic and may be conflict with other env var used by the CSI plugin. So I 
> changed to add a `MESOS_` prefix just like other env vars that Mesos sets for 
> containers, e.g. `MESOS_FRAMEWORK_ID`, `MESOS_SLAVE_ID`, 
> `MESOS_AGENT_ENDPOINT`. Or maybe we should name it `MESOS_AGENT_IP`?
> 
> Greg Mann wrote:
>     Hm, I think this may not yield a good ID for the agent, since I think 
> it's possible that the value of `self().address.ip` could be the same across 
> all nodes in the cluster - I think it could be `0.0.0.0`/`INADDR_ANY`, for 
> example. Do you think we need to inject the Mesos agent ID into the service 
> manager so that we can use it as the node ID here?

I think `self().address.ip` could not be `0.0.0.0/INADDR_ANY`, see 
https://github.com/apache/mesos/blob/1.10.0/3rdparty/libprocess/src/process.cpp#L1142:L1159
 for details.

> Do you think we need to inject the Mesos agent ID into the service manager so 
> that we can use it as the node ID here?

Yeah, that's my original thought, but it may involve a bit more code changes in 
some other components, like CSI server, SLRP. But after second thought I think 
it should be OK and makes more sense to use Mesos agent ID. I have updated this 
patch accordingly. And could you please update 
https://reviews.apache.org/r/72761 by passing Mesos agent ID to CSI server 
(e.g. as a parameter of `CSIServer::start()`).


- Qian


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


On Aug. 12, 2020, 7:47 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72759/
> -----------------------------------------------------------
> 
> (Updated Aug. 12, 2020, 7:47 p.m.)
> 
> 
> Review request for mesos, Andrei Budnik and Greg Mann.
> 
> 
> Bugs: MESOS-10175
>     https://issues.apache.org/jira/browse/MESOS-10175
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Improved CSI service manager to set node ID for managed CSI plugins.
> 
> 
> Diffs
> -----
> 
>   src/csi/service_manager.cpp 7a8d8e5dc3c3bae5251284652d73b33ca554f783 
> 
> 
> Diff: https://reviews.apache.org/r/72759/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>

Reply via email to