Repository: aurora
Updated Branches:
  refs/heads/master c99f2fb68 -> 64a3e051e


Enable -zk_use_curator by default and deprecate.

The flag is noted as deprecated for removal n a future release.

Bugs closed: AURORA-1669

Reviewed at https://reviews.apache.org/r/51506/


Project: http://git-wip-us.apache.org/repos/asf/aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/64a3e051
Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/64a3e051
Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/64a3e051

Branch: refs/heads/master
Commit: 64a3e051e74b4eb3cf035c3f1e611847cd4b0c1f
Parents: c99f2fb
Author: John Sirois <[email protected]>
Authored: Tue Aug 30 14:40:55 2016 -0600
Committer: John Sirois <[email protected]>
Committed: Tue Aug 30 14:40:55 2016 -0600

----------------------------------------------------------------------
 RELEASE-NOTES.md                                         |  8 +++++++-
 docs/reference/scheduler-configuration.md                |  4 ++--
 examples/vagrant/upstart/aurora-scheduler.conf           |  1 -
 .../scheduler/discovery/FlaggedZooKeeperConfig.java      | 11 +++++++++--
 4 files changed, 18 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/64a3e051/RELEASE-NOTES.md
----------------------------------------------------------------------
diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md
index f6b609f..d79aaad 100644
--- a/RELEASE-NOTES.md
+++ b/RELEASE-NOTES.md
@@ -29,6 +29,11 @@
   documentation.
 - Add rollback API to the scheduler and new client command to support rolling 
back
   active update jobs to their initial state.
+- <a name="zk_use_curator_upgrade"></a> The scheduler flag `-zk_use_curator` 
now defaults to `true`
+  and care should be taken when upgrading from a configuration that does not 
pass the flag. The
+  scheduler upgrade should be performed by bringing all schedulers down, and 
then bringing upgraded
+  schedulers up. A rolling upgrade would result in no leading scheduler for 
the duration of the
+  roll which could be confusing to monitor and debug.
 
 ### Deprecations and removals:
 
@@ -38,7 +43,8 @@
   configuration file (`tiers.json`) matches the above criteria.
 - The `ExecutorInfo.source` field is deprecated and has been replaced with a 
label named `source`.
   It will be removed from Mesos in a future release.
-
+- The scheduler flag `-zk_use_curator` has been deprecated. If you have never 
set the flag and are
+  upgrading you should take care as described in the 
[note](#zk_use_curator_upgrade) above.
 
 0.15.0
 ======

http://git-wip-us.apache.org/repos/asf/aurora/blob/64a3e051/docs/reference/scheduler-configuration.md
----------------------------------------------------------------------
diff --git a/docs/reference/scheduler-configuration.md 
b/docs/reference/scheduler-configuration.md
index c0c3944..87d2cde 100644
--- a/docs/reference/scheduler-configuration.md
+++ b/docs/reference/scheduler-configuration.md
@@ -228,7 +228,7 @@ Optional flags:
        Launches an embedded zookeeper server for local testing causing 
-zk_endpoints to be ignored if specified.
 -zk_session_timeout (default (4, secs))
        The ZooKeeper session timeout.
--zk_use_curator (default false)
-       Uses Apache Curator as the zookeeper client; otherwise a copy of 
Twitter commons/zookeeper (the legacy library) is used.
+-zk_use_curator (default true)
+       DEPRECATED: Uses Apache Curator as the zookeeper client; otherwise a 
copy of Twitter commons/zookeeper (the legacy library) is used.
 -------------------------------------------------------------------------
 ```

http://git-wip-us.apache.org/repos/asf/aurora/blob/64a3e051/examples/vagrant/upstart/aurora-scheduler.conf
----------------------------------------------------------------------
diff --git a/examples/vagrant/upstart/aurora-scheduler.conf 
b/examples/vagrant/upstart/aurora-scheduler.conf
index dd60981..91b27d7 100644
--- a/examples/vagrant/upstart/aurora-scheduler.conf
+++ b/examples/vagrant/upstart/aurora-scheduler.conf
@@ -33,7 +33,6 @@ exec bin/aurora-scheduler \
   -hostname=aurora.local \
   -http_port=8081 \
   -native_log_quorum_size=1 \
-  -zk_use_curator \
   -zk_endpoints=localhost:2181 \
   -mesos_master_address=zk://localhost:2181/mesos \
   -serverset_path=/aurora/scheduler \

http://git-wip-us.apache.org/repos/asf/aurora/blob/64a3e051/src/main/java/org/apache/aurora/scheduler/discovery/FlaggedZooKeeperConfig.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/aurora/scheduler/discovery/FlaggedZooKeeperConfig.java
 
b/src/main/java/org/apache/aurora/scheduler/discovery/FlaggedZooKeeperConfig.java
index 36ad18c..e8aafe4 100644
--- 
a/src/main/java/org/apache/aurora/scheduler/discovery/FlaggedZooKeeperConfig.java
+++ 
b/src/main/java/org/apache/aurora/scheduler/discovery/FlaggedZooKeeperConfig.java
@@ -29,16 +29,20 @@ import org.apache.aurora.common.quantity.Amount;
 import org.apache.aurora.common.quantity.Time;
 import org.apache.aurora.common.zookeeper.Credentials;
 import org.apache.aurora.common.zookeeper.ZooKeeperUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * A factory that creates a {@link ZooKeeperConfig} instance based on command 
line argument
  * values.
  */
 public final class FlaggedZooKeeperConfig {
+  private static final Logger LOG = 
LoggerFactory.getLogger(FlaggedZooKeeperConfig.class);
+
   @CmdLine(name = "zk_use_curator",
-      help = "Uses Apache Curator as the zookeeper client; otherwise a copy of 
Twitter "
+      help = "DEPRECATED: Uses Apache Curator as the zookeeper client; 
otherwise a copy of Twitter "
           + "commons/zookeeper (the legacy library) is used.")
-  private static final Arg<Boolean> USE_CURATOR = Arg.create(false);
+  private static final Arg<Boolean> USE_CURATOR = Arg.create(true);
 
   @CmdLine(name = "zk_in_proc",
       help = "Launches an embedded zookeeper server for local testing causing 
-zk_endpoints "
@@ -70,6 +74,9 @@ public final class FlaggedZooKeeperConfig {
    * @return Configuration instance.
    */
   public static ZooKeeperConfig create() {
+    if (USE_CURATOR.hasAppliedValue()) {
+      LOG.warn("The -zk_use_curator flag is deprecated and will be removed in 
a future release.");
+    }
     return new ZooKeeperConfig(
         USE_CURATOR.get(),
         ZK_ENDPOINTS.get(),

Reply via email to