You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ne...@apache.org on 2017/05/16 20:49:06 UTC

[1/2] mesos git commit: Disabled support for hierarchical roles.

Repository: mesos
Updated Branches:
  refs/heads/master 7ba21774b -> 91bd4d923


Disabled support for hierarchical roles.

The previous plan was to include support for hierarchical roles in Mesos
1.3.0 but to mark it as experimental. Upon reflection, it seems safer to
disable hierarchical roles in Mesos 1.3.0, and address the open issues
during the 1.4 development process.

Review: https://reviews.apache.org/r/59285


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

Branch: refs/heads/master
Commit: e0d8cc7c4ef7a0905044159ca47f64b0923e9788
Parents: 7ba2177
Author: Neil Conway <ne...@gmail.com>
Authored: Mon May 15 11:16:31 2017 -0700
Committer: Neil Conway <ne...@gmail.com>
Committed: Tue May 16 13:48:48 2017 -0700

----------------------------------------------------------------------
 src/common/roles.cpp                 |  5 +++++
 src/tests/master_allocator_tests.cpp |  4 +++-
 src/tests/role_tests.cpp             | 15 ++++++++++-----
 3 files changed, 18 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e0d8cc7c/src/common/roles.cpp
----------------------------------------------------------------------
diff --git a/src/common/roles.cpp b/src/common/roles.cpp
index 123e990..139ae87 100644
--- a/src/common/roles.cpp
+++ b/src/common/roles.cpp
@@ -68,6 +68,11 @@ Option<Error> validate(const string& role)
     return None();
   }
 
+  // TODO(neilc): Remove this restriction when MESOS-7505 is fixed.
+  if (role.find_first_of('/') != string::npos) {
+    return Error("Role '" + role + "' cannot contain a slash");
+  }
+
   if (strings::startsWith(role, '/')) {
     return Error("Role '" + role + "' cannot start with a slash");
   }

http://git-wip-us.apache.org/repos/asf/mesos/blob/e0d8cc7c/src/tests/master_allocator_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_allocator_tests.cpp b/src/tests/master_allocator_tests.cpp
index 3b072b2..d05ee44 100644
--- a/src/tests/master_allocator_tests.cpp
+++ b/src/tests/master_allocator_tests.cpp
@@ -1783,7 +1783,9 @@ TYPED_TEST(MasterAllocatorTest, RebalancedForUpdatedWeights)
 
 // Checks that accepting offers and launching tasks works as expected
 // with nested roles.
-TYPED_TEST(MasterAllocatorTest, NestedRoles)
+//
+// TODO(neilc): Re-enable this when MESOS-7505 is fixed.
+TYPED_TEST(MasterAllocatorTest, DISABLED_NestedRoles)
 {
   Clock::pause();
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/e0d8cc7c/src/tests/role_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/role_tests.cpp b/src/tests/role_tests.cpp
index 56422b5..03b6f7b 100644
--- a/src/tests/role_tests.cpp
+++ b/src/tests/role_tests.cpp
@@ -810,10 +810,12 @@ TEST_F(RoleTest, Validate)
   EXPECT_NONE(roles::validate("foo.bar"));
   EXPECT_NONE(roles::validate("foo..bar"));
   EXPECT_NONE(roles::validate("..."));
-  EXPECT_NONE(roles::validate("foo/bar"));
-  EXPECT_NONE(roles::validate("foo/.bar"));
-  EXPECT_NONE(roles::validate("foo/bar/baz"));
-  EXPECT_NONE(roles::validate("a/b/c/d/e/f/g/h"));
+
+  // TODO(neilc): These expectations will change when MESOS-7505 is fixed.
+  EXPECT_SOME(roles::validate("foo/bar"));
+  EXPECT_SOME(roles::validate("foo/.bar"));
+  EXPECT_SOME(roles::validate("foo/bar/baz"));
+  EXPECT_SOME(roles::validate("a/b/c/d/e/f/g/h"));
 
   EXPECT_SOME(roles::validate(""));
   EXPECT_SOME(roles::validate("."));
@@ -898,7 +900,10 @@ TEST_F(RoleTest, EndpointBadAuthentication)
 // subdirectory).
 //
 // TODO(bbannier): Figure out a way to run the test command on Windows.
-TEST_F_TEMP_DISABLED_ON_WINDOWS(RoleTest, VolumesInOverlappingHierarchies)
+//
+// TODO(neilc): Re-enable this when MESOS-7505 is fixed.
+TEST_F_TEMP_DISABLED_ON_WINDOWS(
+    RoleTest, DISABLED_VolumesInOverlappingHierarchies)
 {
   constexpr char PATH[] = "path";
   constexpr Megabytes DISK_SIZE(1);


[2/2] mesos git commit: Updated Mesos 1.3.0 CHANGELOG for removal of hierarchical roles.

Posted by ne...@apache.org.
Updated Mesos 1.3.0 CHANGELOG for removal of hierarchical roles.

Review: https://reviews.apache.org/r/59286


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/91bd4d92
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/91bd4d92
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/91bd4d92

Branch: refs/heads/master
Commit: 91bd4d9232e9881f9adecd5eb42457ed97b81f59
Parents: e0d8cc7
Author: Neil Conway <ne...@gmail.com>
Authored: Mon May 15 12:11:03 2017 -0700
Committer: Neil Conway <ne...@gmail.com>
Committed: Tue May 16 13:48:54 2017 -0700

----------------------------------------------------------------------
 CHANGELOG | 11 -----------
 1 file changed, 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/91bd4d92/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 57bb926..0318370 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -31,16 +31,6 @@ This release contains the following new features:
     container. See 'docs/authorization.md' for more information on these
     implicit authorization rules.
 
-  * [MESOS-6375] - **Experimental** Support for hierarchical roles. A
-    role can now have one or more "child" roles. This makes it easier to
-    use roles to represent the hierarchical structure commonly found in
-    organizations. Support for hierarchical roles is experimental:
-    currently, quota cannot be set on a nested (child) role, and the
-    behavior of resource reservations for role hierarchies is expected
-    to change (presently, making a reservation to a role reserves the
-    resource for that exact role; in a future Mesos release, this will
-    instead reserve the resource for the sub-tree rooted at the role).
-
   * [MESOS-6627] - Support for frameworks to modify the role(s) they are
     subscribed to. This is essential to supporting "multi-user" frameworks
     (see MESOS-1763) in that roles are expected to come and go over time
@@ -122,7 +112,6 @@ All Experimental Features:
   * [MESOS-5931] - Support auto backend in Mesos Containerizer.
   * [MESOS-6014] - Added port mapping CNI plugin.
   * [MESOS-6077] - Added a default (task group) executor.
-  * [MESOS-6375] - **NEW** Support hierarchical resource allocation roles.
   * [MESOS-6402] - rlimit support for Mesos containerizer.
   * [MESOS-6460] - Container Attach/Exec.
   * [MESOS-6758] - Support docker registry that requires basic auth.