You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2016/01/14 23:19:26 UTC
mesos git commit: Replaced deprecated Docker flag '-c' with
'--cpu-shares'.
Repository: mesos
Updated Branches:
refs/heads/master 1fbb8e28b -> 5a5af2189
Replaced deprecated Docker flag '-c' with '--cpu-shares'.
Also replaced '-m' with '--memory' for consistency, despite '-m' not
being deprecated like '-c'.
The '-c' flag is targeted for removal in version 1.11 of Docker:
https://github.com/docker/docker/blob/851fe00c64ff/docs/misc/deprecated.md#command-line-short-variant-options
The long options are available since Docker 0.8.0:
https://github.com/docker/docker/commit/e71dbf4ee5add5736f595948fc20bd01af56a744
Review: https://reviews.apache.org/r/42320/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/5a5af218
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/5a5af218
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/5a5af218
Branch: refs/heads/master
Commit: 5a5af21893d0be6efc780f077b855943e1211417
Parents: 1fbb8e2
Author: Felix Abecassis <fa...@nvidia.com>
Authored: Thu Jan 14 14:17:28 2016 -0800
Committer: Benjamin Mahler <be...@gmail.com>
Committed: Thu Jan 14 14:17:28 2016 -0800
----------------------------------------------------------------------
src/docker/docker.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/5a5af218/src/docker/docker.cpp
----------------------------------------------------------------------
diff --git a/src/docker/docker.cpp b/src/docker/docker.cpp
index e932807..037cd40 100755
--- a/src/docker/docker.cpp
+++ b/src/docker/docker.cpp
@@ -436,14 +436,14 @@ Future<Nothing> Docker::run(
if (cpus.isSome()) {
uint64_t cpuShare =
std::max((uint64_t) (CPU_SHARES_PER_CPU * cpus.get()), MIN_CPU_SHARES);
- argv.push_back("-c");
+ argv.push_back("--cpu-shares");
argv.push_back(stringify(cpuShare));
}
Option<Bytes> mem = resources.get().mem();
if (mem.isSome()) {
Bytes memLimit = std::max(mem.get(), MIN_MEMORY);
- argv.push_back("-m");
+ argv.push_back("--memory");
argv.push_back(stringify(memLimit.bytes()));
}
}