You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by vi...@apache.org on 2016/07/22 18:19:15 UTC
mesos git commit: Disabled the `--registry_strict` master flag.
Repository: mesos
Updated Branches:
refs/heads/master 6f6b4a4c2 -> c2419e417
Disabled the `--registry_strict` master flag.
This flag was always marked as experimental. This flag controlled
whether the master will behave the same, regardless of whether the
master has failed over. Notably, in Mesos 1.0, enabling this flag would
mean that a partitioned agent would always be refused reregistration,
regardless of whether the master has failed over (by default, the agent
would be allowed to reregister iff the master failed over in the
interim).
For Mesos 1.1, we'd like to change the behavior so that partitioned
agents are always allowed to reregister (regardless of master
failover). To prevent developers from writing frameworks that depend on
the old, "strict" behavior (partitioned agents are always rerefused
reregistration), we'd like to disable the "--registry_strict" flag.
The code that implements the strict registry remains, as do the test
cases that depend on this behavior. However, `mesos-master` will refuse
to start if the flag has been specified.
Review: https://reviews.apache.org/r/49955/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/c2419e41
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/c2419e41
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/c2419e41
Branch: refs/heads/master
Commit: c2419e417da6944d4f909d486a1652a130027408
Parents: 6f6b4a4
Author: Neil Conway <ne...@gmail.com>
Authored: Fri Jul 22 09:24:13 2016 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Fri Jul 22 11:18:59 2016 -0700
----------------------------------------------------------------------
CHANGELOG | 2 ++
docs/configuration.md | 14 --------------
docs/high-availability-framework-guide.md | 3 +--
docs/upgrades.md | 5 +++++
src/local/local.cpp | 5 -----
src/master/flags.cpp | 17 +++++++++++++----
src/master/main.cpp | 5 -----
7 files changed, 21 insertions(+), 30 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/c2419e41/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 6aeec05..0b49ba9 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -195,6 +195,8 @@ Additional API Changes:
`--authenticate_http_readonly`, which enables authentication for those
authenticatable endpoints that cannot be used to modify the cluster state.
+ * [MESOS-5833] - Disable the experimental `registry_strict` master flag.
+
3rd Party Upgrades:
* [MESOS-4805] - Upgraded vendored ry-http-parser-1c3624a to nodejs/http-parser 2.6.1.
* [MESOS-4678] - Upgraded vendored protobuf 2.5.0 to 2.6.1.
http://git-wip-us.apache.org/repos/asf/mesos/blob/c2419e41/docs/configuration.md
----------------------------------------------------------------------
diff --git a/docs/configuration.md b/docs/configuration.md
index d40aa7f..d6a7eb0 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -802,20 +802,6 @@ after which the operation is considered a failure. (default: 20secs)
</tr>
<tr>
<td>
- --[no-]registry_strict
- </td>
- <td>
-Whether the master will take actions based on the persistent
-information stored in the Registry. Setting this to false means
-that the Registrar will never reject the admission, readmission,
-or removal of a agent. Consequently, <code>false</code> can be used to
-bootstrap the persistent state on a running cluster.
-<b>NOTE</b>: This flag is *experimental* and should not be used in
-production yet. (default: false)
- </td>
-</tr>
-<tr>
- <td>
--roles=VALUE
</td>
<td>
http://git-wip-us.apache.org/repos/asf/mesos/blob/c2419e41/docs/high-availability-framework-guide.md
----------------------------------------------------------------------
diff --git a/docs/high-availability-framework-guide.md b/docs/high-availability-framework-guide.md
index ae5617b..73743ab 100644
--- a/docs/high-availability-framework-guide.md
+++ b/docs/high-availability-framework-guide.md
@@ -349,5 +349,4 @@ one difference: by default, agents are _allowed to reconnect_ following master
failover, even after the `agent_reregister_timeout` has fired. This means that
frameworks might see a `TASK_LOST` update for a task but then later discover
that the task is running (because the agent where it was running was allowed to
-reconnect). This behavior can be avoided by enabling the `--registry_strict`
-configuration flag, which will be the default in a future version of Mesos.
+reconnect).
http://git-wip-us.apache.org/repos/asf/mesos/blob/c2419e41/docs/upgrades.md
----------------------------------------------------------------------
diff --git a/docs/upgrades.md b/docs/upgrades.md
index 82b9e26..d3e7cdd 100644
--- a/docs/upgrades.md
+++ b/docs/upgrades.md
@@ -65,6 +65,7 @@ We categorize the changes as follows:
<li>R <a href="#1-0-x-workdir">work_dir default value</a></li>
<li>D <a href="#1-0-x-deprecated-ssl-env-variables">SSL environment variables</a></li>
<li>ACD <a href="#1-0-x-http-authentication-flags">HTTP authentication</a></li>
+ <li>R <a href="#1-0-x-registry-strict">registry_strict</a></li>
</ul>
</td>
<td style="word-wrap: break-word; overflow-wrap: break-word;"><!--Framework API-->
@@ -220,6 +221,10 @@ We categorize the changes as follows:
* Mesos 1.0 removes the default value for the agent's `work_dir` command-line flag. This flag is now required; the agent will exit immediately if it is not provided.
+<a name="1-0-x-registry-strict"></a>
+
+* Mesos 1.0 disables support for the master's `registry_strict` command-line flag. If this flag is specified, the master will exit immediately. Note that this flag was previously marked as experimental and not recommended for production use.
+
<a name="1-0-x-credentials-file"></a>
* Mesos 1.0 deprecates the use of plain text credential files in favor of JSON-formatted credential files.
http://git-wip-us.apache.org/repos/asf/mesos/blob/c2419e41/src/local/local.cpp
----------------------------------------------------------------------
diff --git a/src/local/local.cpp b/src/local/local.cpp
index a1a9a6b..d6fe4d0 100644
--- a/src/local/local.cpp
+++ b/src/local/local.cpp
@@ -192,11 +192,6 @@ PID<Master> launch(const Flags& flags, Allocator* _allocator)
}
if (flags.registry == "in_memory") {
- if (flags.registry_strict) {
- EXIT(EXIT_FAILURE)
- << "Cannot use '--registry_strict' when using in-memory storage"
- << " based registry";
- }
storage = new mesos::state::InMemoryStorage();
} else if (flags.registry == "replicated_log") {
// For local runs, we use a temporary work directory.
http://git-wip-us.apache.org/repos/asf/mesos/blob/c2419e41/src/master/flags.cpp
----------------------------------------------------------------------
diff --git a/src/master/flags.cpp b/src/master/flags.cpp
index 176133f..19ae6c1 100644
--- a/src/master/flags.cpp
+++ b/src/master/flags.cpp
@@ -84,7 +84,8 @@ mesos::internal::master::Flags::Flags()
"ZooKeeper session timeout.",
ZOOKEEPER_SESSION_TIMEOUT);
- // TODO(bmahler): Set the default to true in 0.20.0.
+ // TODO(neilc): This flag is deprecated in 1.0 and will be removed 6
+ // months later.
add(&Flags::registry_strict,
"registry_strict",
"Whether the master will take actions based on the persistent\n"
@@ -92,9 +93,17 @@ mesos::internal::master::Flags::Flags()
"that the Registrar will never reject the admission, readmission,\n"
"or removal of an agent. Consequently, `false` can be used to\n"
"bootstrap the persistent state on a running cluster.\n"
- "NOTE: This flag is *experimental* and should not be used in\n"
- "production yet.",
- false);
+ "NOTE: This flag is *disabled* and will be removed in a future\n"
+ "version of Mesos.",
+ false,
+ [](bool value) -> Option<Error> {
+ if (value) {
+ return Error("Support for '--registry_strict' has been "
+ "disabled and will be removed in a future "
+ "version of Mesos");
+ }
+ return None();
+ });
add(&Flags::registry_fetch_timeout,
"registry_fetch_timeout",
http://git-wip-us.apache.org/repos/asf/mesos/blob/c2419e41/src/master/main.cpp
----------------------------------------------------------------------
diff --git a/src/master/main.cpp b/src/master/main.cpp
index 6146c31..e202973 100644
--- a/src/master/main.cpp
+++ b/src/master/main.cpp
@@ -373,11 +373,6 @@ int main(int argc, char** argv)
Log* log = nullptr;
if (flags.registry == "in_memory") {
- if (flags.registry_strict) {
- EXIT(EXIT_FAILURE)
- << "Cannot use '--registry_strict' when using in-memory storage"
- << " based registry";
- }
storage = new InMemoryStorage();
} else if (flags.registry == "replicated_log" ||
flags.registry == "log_storage") {