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/05/12 16:16:26 UTC

mesos git commit: Deprecated 'slave' in CLI.

Repository: mesos
Updated Branches:
  refs/heads/master 48fcbcdde -> e3ec91a10


Deprecated 'slave' in CLI.

Hid 'slave' in help message and produced deprecation warning
when command is invoked with 'slave' subcommand.

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


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

Branch: refs/heads/master
Commit: e3ec91a104d735b6fa072d9e0ce37ed3aa9f998e
Parents: 48fcbcd
Author: Jay Guo <gu...@cn.ibm.com>
Authored: Thu May 12 09:15:53 2016 -0700
Committer: Vinod Kone <vi...@gmail.com>
Committed: Thu May 12 09:15:53 2016 -0700

----------------------------------------------------------------------
 src/cli/mesos.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/e3ec91a1/src/cli/mesos.cpp
----------------------------------------------------------------------
diff --git a/src/cli/mesos.cpp b/src/cli/mesos.cpp
index f76d3ed..d5274c2 100644
--- a/src/cli/mesos.cpp
+++ b/src/cli/mesos.cpp
@@ -48,7 +48,9 @@ void usage(const char* argv0)
           Try<bool> access = os::access(match, X_OK);
           if (access.isSome() && access.get()) {
             string basename = Path(match).basename();
-            commands.push_back(basename.substr(6));
+            if (basename != "mesos-slave") {
+              commands.push_back(basename.substr(6));
+            }
           }
         }
       }
@@ -118,6 +120,11 @@ int main(int argc, char** argv)
     return EXIT_FAILURE;
   } else {
     string command = argv[1];
+    if (command == "slave") {
+      cerr << "WARNING: subcommand 'slave' is deprecated in flavor of 'agent'."
+           << endl
+           << endl;
+    }
     string executable = "mesos-" + command;
     argv[1] = (char*) executable.c_str();
     execvp(executable.c_str(), argv + 1);