This is an automated email from the ASF dual-hosted git repository.
qianzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
The following commit(s) were added to refs/heads/master by this push:
new a16f343 Moved the `volume/csi` isolator's root dir under work dir.
a16f343 is described below
commit a16f3439dca13982bb4a2b9190c24aaf4eb73b0e
Author: Qian Zhang <[email protected]>
AuthorDate: Tue Sep 1 20:58:35 2020 +0800
Moved the `volume/csi` isolator's root dir under work dir.
The `volume/csi` isolator needs to checkpoint CSI volume state under
work dir rather than runtime dir to be consistent with what volume
manager does. Otherwise after agent host is rebooted, volume manager
may publish some volumes during recovery, and those volumes will never
get chance to be unpublished since the `volume/csi` isolator does not
know those volumes at all (the contents in runtime dir will be gone
after reboot).
Review: https://reviews.apache.org/r/72829
---
src/slave/containerizer/mesos/isolators/volume/csi/isolator.cpp | 2 +-
src/slave/containerizer/mesos/isolators/volume/csi/paths.hpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/slave/containerizer/mesos/isolators/volume/csi/isolator.cpp
b/src/slave/containerizer/mesos/isolators/volume/csi/isolator.cpp
index d5d8835..79a6860 100644
--- a/src/slave/containerizer/mesos/isolators/volume/csi/isolator.cpp
+++ b/src/slave/containerizer/mesos/isolators/volume/csi/isolator.cpp
@@ -69,7 +69,7 @@ Try<Isolator*> VolumeCSIIsolatorProcess::create(
return Error("No CSI server is provided");
}
- const string csiRootDir = path::join(flags.runtime_dir, csi::paths::CSI_DIR);
+ const string csiRootDir = path::join(flags.work_dir, csi::paths::CSI_DIR);
// Create the CSI volume information root directory if it does not exist.
Try<Nothing> mkdir = os::mkdir(csiRootDir);
diff --git a/src/slave/containerizer/mesos/isolators/volume/csi/paths.hpp
b/src/slave/containerizer/mesos/isolators/volume/csi/paths.hpp
index 5b4a4ee..d551809 100644
--- a/src/slave/containerizer/mesos/isolators/volume/csi/paths.hpp
+++ b/src/slave/containerizer/mesos/isolators/volume/csi/paths.hpp
@@ -29,7 +29,7 @@ namespace paths {
// The root directory where we keep the information of CSI volumes that each
// container uses. The layout is as follows:
-// /<runtime_dir>/isolators/volume/csi/
+// /<work_dir>/isolators/volume/csi/
// |-- <ID of Container1>/
// | |-- volumes
// |-- <ID of Container2>/