You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by gi...@apache.org on 2019/02/21 00:53:34 UTC
[mesos] 03/07: Fixed an inaccurate comment in agent code.
This is an automated email from the ASF dual-hosted git repository.
gilbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
commit 04feecafab62671c332b3ef8a50a7473a13278c2
Author: Qian Zhang <zh...@gmail.com>
AuthorDate: Wed Feb 20 13:41:54 2019 -0800
Fixed an inaccurate comment in agent code.
Given that `state::checkpoint` is atomic, an empty file could occur
in case of slave host is hard rebooted after the file is created but
before the data is synced on disk rather than slave process died.
Review: https://reviews.apache.org/r/70001/
---
.../mesos/provisioner/docker/metadata_manager.cpp | 4 ++--
src/slave/state.cpp | 28 +++++++++++-----------
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/slave/containerizer/mesos/provisioner/docker/metadata_manager.cpp b/src/slave/containerizer/mesos/provisioner/docker/metadata_manager.cpp
index 7b8030a..847eb9a 100644
--- a/src/slave/containerizer/mesos/provisioner/docker/metadata_manager.cpp
+++ b/src/slave/containerizer/mesos/provisioner/docker/metadata_manager.cpp
@@ -263,8 +263,8 @@ Future<Nothing> MetadataManagerProcess::recover()
}
if (images.isNone()) {
- // This could happen if the slave died after opening the file for
- // writing but before persisted on disk.
+ // This could happen if the slave is hard rebooted after the file is created
+ // but before the data is synced on disk.
LOG(WARNING) << "The images file '" << storedImagesPath << "' is empty";
return Nothing();
diff --git a/src/slave/state.cpp b/src/slave/state.cpp
index 92f7775..b4bf629 100644
--- a/src/slave/state.cpp
+++ b/src/slave/state.cpp
@@ -170,8 +170,8 @@ Try<SlaveState> SlaveState::recover(
}
if (slaveInfo.isNone()) {
- // This could happen if the slave died after opening the file for
- // writing but before it checkpointed anything.
+ // This could happen if the slave is hard rebooted after the file is created
+ // but before the data is synced on disk.
LOG(WARNING) << "Found empty agent info file '" << path << "'";
return state;
}
@@ -269,8 +269,8 @@ Try<FrameworkState> FrameworkState::recover(
}
if (frameworkInfo.isNone()) {
- // This could happen if the slave died after opening the file for
- // writing but before it checkpointed anything.
+ // This could happen if the slave is hard rebooted after the file is created
+ // but before the data is synced on disk.
LOG(WARNING) << "Found empty framework info file '" << path << "'";
return state;
}
@@ -302,8 +302,8 @@ Try<FrameworkState> FrameworkState::recover(
}
if (pid->empty()) {
- // This could happen if the slave died after opening the file for
- // writing but before it checkpointed anything.
+ // This could happen if the slave is hard rebooted after the file is created
+ // but before the data is synced on disk.
LOG(WARNING) << "Found empty framework pid file '" << path << "'";
return state;
}
@@ -442,8 +442,8 @@ Try<ExecutorState> ExecutorState::recover(
}
if (executorInfo.isNone()) {
- // This could happen if the slave died after opening the file for
- // writing but before it checkpointed anything.
+ // This could happen if the slave is hard rebooted after the file is created
+ // but before the data is synced on disk.
LOG(WARNING) << "Found empty executor info file '" << path << "'";
return state;
}
@@ -552,8 +552,8 @@ Try<RunState> RunState::recover(
}
if (pid->empty()) {
- // This could happen if the slave died after opening the file for
- // writing but before it checkpointed anything.
+ // This could happen if the slave is hard rebooted after the file is created
+ // but before the data is synced on disk.
LOG(WARNING) << "Found empty executor forked pid file '" << path << "'";
return state;
}
@@ -588,8 +588,8 @@ Try<RunState> RunState::recover(
}
if (pid->empty()) {
- // This could happen if the slave died after opening the file for
- // writing but before it checkpointed anything.
+ // This could happen if the slave is hard rebooted after the file is
+ // created but before the data is synced on disk.
LOG(WARNING) << "Found empty executor libprocess pid file '" << path
<< "'";
return state;
@@ -658,8 +658,8 @@ Try<TaskState> TaskState::recover(
}
if (task.isNone()) {
- // This could happen if the slave died after opening the file for
- // writing but before it checkpointed anything.
+ // This could happen if the slave is hard rebooted after the file is created
+ // but before the data is synced on disk.
LOG(WARNING) << "Found empty task info file '" << path << "'";
return state;
}