You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by al...@apache.org on 2018/08/21 16:08:32 UTC

[mesos] branch 1.7.x updated: Revert "Removed long ago deprecated endpoints.".

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

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


The following commit(s) were added to refs/heads/1.7.x by this push:
     new 764b849  Revert "Removed long ago deprecated endpoints.".
764b849 is described below

commit 764b849e026667357c9269d224e950b0087cb9b5
Author: Alexander Rukletsov <al...@apache.org>
AuthorDate: Tue Aug 21 17:59:27 2018 +0200

    Revert "Removed long ago deprecated endpoints.".
    
    This reverts commit 42551cb5290b7b04101f7d800b4b8fd573e47b91.
    
    Even though the endpoints have been deprecated long ago and should
    have already been removed, doing this so close to the release might
    prevent people from adjusting their tooling on time.
    
    The deprecated endpoints are restored in 1.7.x only, Mesos master
    aka 1.8.0-dev will not have deprecated endpoints.
---
 src/files/files.cpp   | 19 +++++++++++++++++++
 src/master/master.cpp | 30 ++++++++++++++++++++++++++++++
 src/slave/slave.cpp   | 21 +++++++++++++++++++++
 3 files changed, 70 insertions(+)

diff --git a/src/files/files.cpp b/src/files/files.cpp
index f200d5e..a64613c 100644
--- a/src/files/files.cpp
+++ b/src/files/files.cpp
@@ -222,6 +222,25 @@ FilesProcess::FilesProcess(
 
 void FilesProcess::initialize()
 {
+    // TODO(ijimenez): Remove these endpoints at the end of the
+    // deprecation cycle on 0.26.
+    route("/browse.json",
+          authenticationRealm,
+          FilesProcess::BROWSE_HELP,
+          &FilesProcess::loggedBrowse);
+    route("/read.json",
+          authenticationRealm,
+          FilesProcess::READ_HELP,
+          &FilesProcess::loggedRead);
+    route("/download.json",
+          authenticationRealm,
+          FilesProcess::DOWNLOAD_HELP,
+          &FilesProcess::loggedDownload);
+    route("/debug.json",
+          authenticationRealm,
+          FilesProcess::DEBUG_HELP,
+          &FilesProcess::loggedDebug);
+
     route("/browse",
           authenticationRealm,
           FilesProcess::BROWSE_HELP,
diff --git a/src/master/master.cpp b/src/master/master.cpp
index 5825837..6237d92 100644
--- a/src/master/master.cpp
+++ b/src/master/master.cpp
@@ -937,6 +937,16 @@ void Master::initialize()
           logRequest(request);
           return http.reserve(request, principal);
         });
+  // TODO(ijimenez): Remove this endpoint at the end of the
+  // deprecation cycle on 0.26.
+  route("/roles.json",
+        READONLY_HTTP_AUTHENTICATION_REALM,
+        Http::ROLES_HELP(),
+        [this](const process::http::Request& request,
+               const Option<Principal>& principal) {
+          logRequest(request);
+          return http.roles(request, principal);
+        });
   route("/roles",
         READONLY_HTTP_AUTHENTICATION_REALM,
         Http::ROLES_HELP(),
@@ -961,6 +971,16 @@ void Master::initialize()
           logRequest(request);
           return http.slaves(request, principal);
         });
+  // TODO(ijimenez): Remove this endpoint at the end of the
+  // deprecation cycle on 0.26.
+  route("/state.json",
+        READONLY_HTTP_AUTHENTICATION_REALM,
+        Http::STATE_HELP(),
+        [this](const process::http::Request& request,
+               const Option<Principal>& principal) {
+          logRequest(request);
+          return http.state(request, principal);
+        });
   route("/state",
         READONLY_HTTP_AUTHENTICATION_REALM,
         Http::STATE_HELP(),
@@ -977,6 +997,16 @@ void Master::initialize()
           logRequest(request);
           return http.stateSummary(request, principal);
         });
+  // TODO(ijimenez): Remove this endpoint at the end of the
+  // deprecation cycle.
+  route("/tasks.json",
+        READONLY_HTTP_AUTHENTICATION_REALM,
+        Http::TASKS_HELP(),
+        [this](const process::http::Request& request,
+               const Option<Principal>& principal) {
+          logRequest(request);
+          return http.tasks(request, principal);
+        });
   route("/tasks",
         READONLY_HTTP_AUTHENTICATION_REALM,
         Http::TASKS_HELP(),
diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 679394a..8255f0a 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -792,6 +792,17 @@ void Slave::initialize()
 
         return resourceProviderManager->api(request, principal);
       });
+
+  // TODO(ijimenez): Remove this endpoint at the end of the
+  // deprecation cycle on 0.26.
+  route("/state.json",
+        READONLY_HTTP_AUTHENTICATION_REALM,
+        Http::STATE_HELP(),
+        [this](const http::Request& request,
+               const Option<Principal>& principal) {
+          logRequest(request);
+          return http.state(request, principal);
+        });
   route("/state",
         READONLY_HTTP_AUTHENTICATION_REALM,
         Http::STATE_HELP(),
@@ -821,6 +832,16 @@ void Slave::initialize()
           logRequest(request);
           return http.statistics(request, principal);
         });
+  // TODO(ijimenez): Remove this endpoint at the end of the
+  // deprecation cycle on 0.26.
+  route("/monitor/statistics.json",
+        READONLY_HTTP_AUTHENTICATION_REALM,
+        Http::STATISTICS_HELP(),
+        [this](const http::Request& request,
+               const Option<Principal>& principal) {
+          logRequest(request);
+          return http.statistics(request, principal);
+        });
   route("/containers",
         READONLY_HTTP_AUTHENTICATION_REALM,
         Http::CONTAINERS_HELP(),