-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63377/#review189517
-----------------------------------------------------------
src/Makefile.am
Lines 1441-1442 (patched)
<https://reviews.apache.org/r/63377/#comment266627>
This change seems irrelevant?
src/resource_provider/storage/paths.hpp
Lines 32 (patched)
<https://reviews.apache.org/r/63377/#comment266628>
Any reason we need a top level `csi` directory?
In fact, I'd much prefer:
```
<root>/resource_providers/<type>/<name>/csi/plugins...
```
src/resource_provider/storage/paths.cpp
Lines 66 (patched)
<https://reviews.apache.org/r/63377/#comment266629>
See my comment below.
src/resource_provider/storage/paths.cpp
Lines 139-143 (patched)
<https://reviews.apache.org/r/63377/#comment266631>
This is not really a `create` method because it'll return the realpath if it exists.
I suggest we have a dead simple `createCsiPluginDirectory` method that just does the `mkdir`.
Or we don't even need that. I think doing `os::mkdir(getCsiPluginPath(workDIr))` in the caller
is probably better.
Then, move all symlink related logic to:
```
Try<string> getCsiEndpointPath()
```
src/resource_provider/storage/paths.cpp
Lines 145-148 (patched)
<https://reviews.apache.org/r/63377/#comment266630>
Let's factor this into a helper (`getCsiPluginPath`). You don't have to expose if other
files are not using it.
- Jie Yu
On Oct. 27, 2017, 10:15 p.m., Chun-Hung Hsiao wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63377/
> -----------------------------------------------------------
>
> (Updated Oct. 27, 2017, 10:15 p.m.)
>
>
> Review request for mesos, Jie Yu, Joseph Wu, and Jan Schlicht.
>
>
> Bugs: MESOS-8141
> https://issues.apache.org/jira/browse/MESOS-8141
>
>
> Repository: mesos
>
>
> Description
> -------
>
> A storage resource provider can now store the following persistent CSI
> data in `<work_dir>/csi/resource_providers/<type>/<name>`:
>
> 1. Mount points of CSI volumes: `volumes/<volume_id>`
> 2. States of CSI volumes: `states/<volume_id>/state`
> 3. Directory to place CSI endpoints: `/tmp/mesos-csi-XXXXXX`, which
> would be symlinked by `plugins/<plugin_name>/endpoint`.
>
>
> Diffs
> -----
>
> src/Makefile.am b60a54a031260de6f1fb43584ae5083df2dc7e31
> src/resource_provider/storage/paths.hpp PRE-CREATION
> src/resource_provider/storage/paths.cpp PRE-CREATION
> src/slave/paths.hpp f000508d414daf9f943561f89c7105503a8a98b3
>
>
> Diff: https://reviews.apache.org/r/63377/diff/1/
>
>
> Testing
> -------
>
> make
>
>
> Thanks,
>
> Chun-Hung Hsiao
>
>
|