> On Aug. 13, 2020, 10:21 p.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?
>
> Qian Zhang wrote:
> 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()`).
Yep, sgtm.
- Greg
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72759/#review221574
-----------------------------------------------------------
On Aug. 18, 2020, 4:22 p.m., Qian Zhang wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72759/
> -----------------------------------------------------------
>
> (Updated Aug. 18, 2020, 4:22 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
> -------
>
> Exposed Mesos agent ID to managed CSI plugins.
>
>
> Diffs
> -----
>
> src/csi/service_manager.hpp 76a80fb793d2293e56dec221da23290df6a4acc6
> src/csi/service_manager.cpp 7a8d8e5dc3c3bae5251284652d73b33ca554f783
> src/resource_provider/storage/provider.cpp 0a8dc26e66db0242474bcbbd0b2ff9cec81c58f5
> src/slave/csi_server.cpp b435d5db194ffad736838a5b98494944d3264045
>
>
> Diff: https://reviews.apache.org/r/72759/diff/2/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Qian Zhang
>
>
|