You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ch...@apache.org on 2019/04/12 22:22:24 UTC
[mesos] branch 1.8.x updated (950247d -> 2ec9762)
This is an automated email from the ASF dual-hosted git repository.
chhsiao pushed a change to branch 1.8.x
in repository https://gitbox.apache.org/repos/asf/mesos.git.
from 950247d Updated the 1.8.0 CHANGELOG with a new feature.
new 134eda9 Fixed crash when recovering a volume failed to publish with CSI v1.
new 2ec9762 Added MESOS-9729 to the 1.8.0 CHANGELOG.
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
CHANGELOG | 1 +
src/csi/v1_volume_manager.cpp | 16 ++++++++++++----
2 files changed, 13 insertions(+), 4 deletions(-)
[mesos] 02/02: Added MESOS-9729 to the 1.8.0 CHANGELOG.
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chhsiao pushed a commit to branch 1.8.x
in repository https://gitbox.apache.org/repos/asf/mesos.git
commit 2ec97620fe61589de6343960418361b49957948a
Author: Chun-Hung Hsiao <ch...@mesosphere.io>
AuthorDate: Fri Apr 12 15:19:10 2019 -0700
Added MESOS-9729 to the 1.8.0 CHANGELOG.
---
CHANGELOG | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG b/CHANGELOG
index c8d67ec..62d6462 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -221,6 +221,7 @@ All Resolved Issues:
* [MESOS-9711] - Avoid shutting down executors registering before a required resource provider.
* [MESOS-9712] - StorageLocalResourceProviderTest.CsiPluginRpcMetrics is flaky.
* [MESOS-9727] - Heartbeat calls from executor to agent are reported as errors.
+ * [MESOS-9729] - Unpublishing a volume that is failed to publish crashes the agent with CSI v1.
** Epic
* [MESOS-8054] - Feedback for operations
[mesos] 01/02: Fixed crash when recovering a volume failed to
publish with CSI v1.
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chhsiao pushed a commit to branch 1.8.x
in repository https://gitbox.apache.org/repos/asf/mesos.git
commit 134eda9b1d537683994fa87acac0a96fdca4c730
Author: Chun-Hung Hsiao <ch...@mesosphere.io>
AuthorDate: Fri Apr 12 14:43:09 2019 -0700
Fixed crash when recovering a volume failed to publish with CSI v1.
The CSI v1 volume manager falsely assumed that the target path always
exists when unpublishing a volume, which is not true if there is a
failure when publishing the volume.
Review: https://reviews.apache.org/r/70468
---
src/csi/v1_volume_manager.cpp | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/csi/v1_volume_manager.cpp b/src/csi/v1_volume_manager.cpp
index bf640f9..e7e0329 100644
--- a/src/csi/v1_volume_manager.cpp
+++ b/src/csi/v1_volume_manager.cpp
@@ -975,7 +975,12 @@ Future<Nothing> VolumeManagerProcess::_publishVolume(const string& volumeId)
}
return call(NODE_SERVICE, &Client::nodePublishVolume, std::move(request))
- .then(defer(self(), [this, volumeId, targetPath] {
+ .then(process::defer(self(), [this, volumeId, targetPath]()
+ -> Future<Nothing> {
+ if (!os::exists(targetPath)) {
+ return Failure("Target path '" + targetPath + "' not created");
+ }
+
CHECK(volumes.contains(volumeId));
VolumeState& volumeState = volumes.at(volumeId).state;
@@ -1158,8 +1163,6 @@ Future<Nothing> VolumeManagerProcess::__unpublishVolume(const string& volumeId)
const string targetPath = paths::getMountTargetPath(
paths::getMountRootDir(rootDir, info.type(), info.name()), volumeId);
- CHECK(os::exists(targetPath));
-
LOG(INFO) << "Calling '/csi.v1.Node/NodeUnpublishVolume' for volume '"
<< volumeId << "'";
@@ -1168,7 +1171,12 @@ Future<Nothing> VolumeManagerProcess::__unpublishVolume(const string& volumeId)
request.set_target_path(targetPath);
return call(NODE_SERVICE, &Client::nodeUnpublishVolume, std::move(request))
- .then(process::defer(self(), [this, volumeId] {
+ .then(process::defer(self(), [this, volumeId, targetPath]()
+ -> Future<Nothing> {
+ if (os::exists(targetPath)) {
+ return Failure("Target path '" + targetPath + "' not removed");
+ }
+
CHECK(volumes.contains(volumeId));
VolumeState& volumeState = volumes.at(volumeId).state;
volumeState.set_state(VolumeState::VOL_READY);