This is an automated email from the ASF dual-hosted git repository.

mzhu pushed a commit to branch 1.7.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 725e81aa7e371ed96f9b4f9e88233a8ff7e1d3db
Author: Meng Zhu <[email protected]>
AuthorDate: Wed Mar 6 11:02:22 2019 -0800

    Added a new registry field `minimum_capabilities`.
    
    This patch adds a new registry field `minimum_capabilities`
    to faciliatate safe downgrade of masters.  This is a list of strings
    which will be written whenever the master uses a feature that may
    be backwards incompatible.  If an older master sees an unknown feature
    in the list, the older master will refuse to recover and try to provide
    remediation steps instead.
    
    Also see: MESOS-8878.
    
    Review: https://reviews.apache.org/r/67761/
---
 src/master/registry.proto | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/master/registry.proto b/src/master/registry.proto
index cac0c31..2397893 100644
--- a/src/master/registry.proto
+++ b/src/master/registry.proto
@@ -85,6 +85,20 @@ message Registry {
     required WeightInfo info = 1;
   }
 
+  // The minimum set of `MasterInfo::Capability` that the master reading
+  // this registry should be capable of.  If the master is upgraded
+  // or downgraded and no longer satisfies these capabilities, the
+  // master is expected to exit upon recovery.
+  //
+  // We do not use `MasterInfo::Capability` in this field directly
+  // because the enumeration may be extended in later Mesos versions.
+  // If an earlier version is given an enum value from a later version,
+  // the protobuf parser will interpret this as an `UNKNOWN` capability,
+  // and we will be unable to provide remediation text to the operator.
+  message MinimumCapability {
+    required string capability = 1;
+  }
+
   // Most recent leading master.
   optional Master master = 1;
 
@@ -130,4 +144,6 @@ message Registry {
 
   // All known resource providers.
   optional resource_provider.registry.Registry resource_provider_registry = 9;
+
+  repeated MinimumCapability minimum_capabilities = 10;
 }

Reply via email to