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/03/01 22:37:05 UTC

[1/3] mesos git commit: Updated flag examples to use /metrics/snapshot instead of stats.json.

Repository: mesos
Updated Branches:
  refs/heads/master 55f9c9d57 -> 546555eb3


Updated flag examples to use /metrics/snapshot instead of stats.json.

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


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

Branch: refs/heads/master
Commit: 38b4469ddc40b5fd4e461dc56ecb177b3911c10e
Parents: 55f9c9d
Author: Joerg Schad <jo...@mesosphere.io>
Authored: Tue Mar 1 13:34:24 2016 -0800
Committer: Vinod Kone <vi...@gmail.com>
Committed: Tue Mar 1 13:34:24 2016 -0800

----------------------------------------------------------------------
 docs/configuration.md | 2 +-
 src/master/flags.cpp  | 2 +-
 src/slave/flags.cpp   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/38b4469d/docs/configuration.md
----------------------------------------------------------------------
diff --git a/docs/configuration.md b/docs/configuration.md
index 43185fa..4ecc461 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -84,7 +84,7 @@ Example:
   "disabled_endpoints" : {
     "paths" : [
       "/files/browse",
-      "/slave(0)/stats.json"
+      "/metrics/snapshot"
     ]
   }
 }</code></pre>

http://git-wip-us.apache.org/repos/asf/mesos/blob/38b4469d/src/master/flags.cpp
----------------------------------------------------------------------
diff --git a/src/master/flags.cpp b/src/master/flags.cpp
index ccf7422..be981ed 100644
--- a/src/master/flags.cpp
+++ b/src/master/flags.cpp
@@ -297,7 +297,7 @@ mesos::internal::master::Flags::Flags()
       "  \"disabled_endpoints\" : {\n"
       "    \"paths\" : [\n"
       "      \"/files/browse\",\n"
-      "      \"/slave(0)/stats.json\"\n"
+      "      \"/metrics/snapshot\"\n"
       "    ]\n"
       "  }\n"
       "}");

http://git-wip-us.apache.org/repos/asf/mesos/blob/38b4469d/src/slave/flags.cpp
----------------------------------------------------------------------
diff --git a/src/slave/flags.cpp b/src/slave/flags.cpp
index 7f139e9..b0bf3d5 100644
--- a/src/slave/flags.cpp
+++ b/src/slave/flags.cpp
@@ -413,7 +413,7 @@ mesos::internal::slave::Flags::Flags()
       "  \"disabled_endpoints\": {\n"
       "    \"paths\": [\n"
       "      \"/files/browse\",\n"
-      "      \"/slave(0)/stats.json\"\n"
+      "      \"/metrics/snapshot\"\n"
       "    ]\n"
       "  }\n"
       "}");


[3/3] mesos git commit: Updated tests to use /state endpoint.

Posted by vi...@apache.org.
Updated tests to use /state endpoint.

Updated tests to use /state endpoint instead of deprecated state.json endpoint.

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


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

Branch: refs/heads/master
Commit: 546555eb3df8edf7902e437eecddd5c678b3f39e
Parents: 1915697
Author: Joerg Schad <jo...@mesosphere.io>
Authored: Tue Mar 1 13:36:32 2016 -0800
Committer: Vinod Kone <vi...@gmail.com>
Committed: Tue Mar 1 13:36:32 2016 -0800

----------------------------------------------------------------------
 src/tests/fault_tolerance_tests.cpp |  2 +-
 src/tests/master_tests.cpp          |  8 ++++----
 src/tests/slave_tests.cpp           | 13 +++++++------
 3 files changed, 12 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/546555eb/src/tests/fault_tolerance_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/fault_tolerance_tests.cpp b/src/tests/fault_tolerance_tests.cpp
index 982468f..f2b8dba 100644
--- a/src/tests/fault_tolerance_tests.cpp
+++ b/src/tests/fault_tolerance_tests.cpp
@@ -1904,7 +1904,7 @@ TEST_F(FaultToleranceTest, UpdateFrameworkInfoOnSchedulerFailover)
 
   AWAIT_READY(sched1Error);
 
-  Future<Response> response = process::http::get(master.get(), "state.json");
+  Future<Response> response = process::http::get(master.get(), "state");
   AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
 
   Try<JSON::Object> parse =

http://git-wip-us.apache.org/repos/asf/mesos/blob/546555eb/src/tests/master_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/master_tests.cpp b/src/tests/master_tests.cpp
index 0bd8c0e..3659577 100644
--- a/src/tests/master_tests.cpp
+++ b/src/tests/master_tests.cpp
@@ -3253,8 +3253,8 @@ TEST_F(MasterTest, TaskStatusLabels)
 
   AWAIT_READY(status);
 
-  // Verify label key and value in master state.json.
-  Future<Response> response = process::http::get(master.get(), "state.json");
+  // Verify label key and value in master state endpoint.
+  Future<Response> response = process::http::get(master.get(), "state");
 
   AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   AWAIT_EXPECT_RESPONSE_HEADER_EQ(APPLICATION_JSON, "Content-Type", response);
@@ -3346,7 +3346,7 @@ TEST_F(MasterTest, TaskStatusContainerStatus)
   EXPECT_EQ(slaveIPAddress, containerStatus.network_infos(0).ip_address());
 
   // Now do the same validation with state endpoint.
-  Future<Response> response = process::http::get(master.get(), "state.json");
+  Future<Response> response = process::http::get(master.get(), "state");
 
   AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   AWAIT_EXPECT_RESPONSE_HEADER_EQ(APPLICATION_JSON, "Content-Type", response);
@@ -3832,7 +3832,7 @@ TEST_F(MasterTest, FrameworkInfoLabels)
 
   AWAIT_READY(registered);
 
-  Future<Response> response = process::http::get(master.get(), "state.json");
+  Future<Response> response = process::http::get(master.get(), "state");
 
   AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   AWAIT_EXPECT_RESPONSE_HEADER_EQ(APPLICATION_JSON, "Content-Type", response);

http://git-wip-us.apache.org/repos/asf/mesos/blob/546555eb/src/tests/slave_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_tests.cpp b/src/tests/slave_tests.cpp
index c45f2f0..124e958 100644
--- a/src/tests/slave_tests.cpp
+++ b/src/tests/slave_tests.cpp
@@ -2327,8 +2327,8 @@ TEST_F(SlaveTest, DiscoveryInfoAndPorts)
 
   AWAIT_READY(launchTask);
 
-  // Verify label key and value in slave state.json.
-  Future<Response> response = process::http::get(slave.get(), "state.json");
+  // Verify label key and value in slave state endpoint.
+  Future<Response> response = process::http::get(slave.get(), "state");
 
   AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   AWAIT_EXPECT_RESPONSE_HEADER_EQ(APPLICATION_JSON, "Content-Type", response);
@@ -2352,7 +2352,8 @@ TEST_F(SlaveTest, DiscoveryInfoAndPorts)
   EXPECT_SOME(portResult1);
   EXPECT_SOME(portResult2);
 
-  // Verify that the ports retrieved from state.json are the ones that were set.
+  // Verify that the ports retrieved from state endpoint are the ones
+  // that were set.
   EXPECT_EQ(JSON::Object(JSON::protobuf(*port1)), portResult1.get());
   EXPECT_EQ(JSON::Object(JSON::protobuf(*port2)), portResult2.get());
 
@@ -2533,8 +2534,8 @@ TEST_F(SlaveTest, TaskStatusLabels)
 
   AWAIT_READY(status);
 
-  // Verify label key and value in master state.json.
-  Future<Response> response = process::http::get(slave.get(), "state.json");
+  // Verify label key and value in master state endpoint.
+  Future<Response> response = process::http::get(slave.get(), "state");
 
   AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   AWAIT_EXPECT_RESPONSE_HEADER_EQ(APPLICATION_JSON, "Content-Type", response);
@@ -2628,7 +2629,7 @@ TEST_F(SlaveTest, TaskStatusContainerStatus)
       status.get().container_status().network_infos(0).ip_address());
 
   // Now do the same validation with state endpoint.
-  Future<Response> response = process::http::get(slave.get(), "state.json");
+  Future<Response> response = process::http::get(slave.get(), "state");
 
   AWAIT_EXPECT_RESPONSE_STATUS_EQ(OK().status, response);
   AWAIT_EXPECT_RESPONSE_HEADER_EQ(APPLICATION_JSON, "Content-Type", response);


[2/3] mesos git commit: Updated UI controller to use master/state endpoint.

Posted by vi...@apache.org.
Updated UI controller to use master/state endpoint.

Updated UI controller to use master/state endpoint instead of deprecated
state.json endpoint.

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


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

Branch: refs/heads/master
Commit: 1915697cb8e33cf3b77717f33b8e5edc7f7f565a
Parents: 38b4469
Author: Joerg Schad <jo...@mesosphere.io>
Authored: Tue Mar 1 13:36:21 2016 -0800
Committer: Vinod Kone <vi...@gmail.com>
Committed: Tue Mar 1 13:36:21 2016 -0800

----------------------------------------------------------------------
 src/webui/master/static/js/controllers.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/1915697c/src/webui/master/static/js/controllers.js
----------------------------------------------------------------------
diff --git a/src/webui/master/static/js/controllers.js b/src/webui/master/static/js/controllers.js
index 56a44fc..4c1e57e 100644
--- a/src/webui/master/static/js/controllers.js
+++ b/src/webui/master/static/js/controllers.js
@@ -359,7 +359,7 @@
     };
 
     var pollState = function() {
-      $http.get('master/state.json',
+      $http.get('master/state',
                 {transformResponse: function(data) { return data; }})
         .success(function(data) {
           if (updateState($scope, $timeout, data)) {