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/04/25 23:32:12 UTC
[19/50] mesos git commit: Replaced deprecated Docker flag '-c' with
'--cpu-shares'.
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/bfe6110b
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/bfe6110b
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/bfe6110b
Branch: refs/heads/0.26.x
Commit: bfe6110bc5c6c8d17edc32f3948f568d5bdcf91d
Parents: 4d9dade
Author: Felix Abecassis <fa...@nvidia.com>
Authored: Thu Jan 14 14:17:28 2016 -0800
Committer: Michael Park <mp...@apache.org>
Committed: Fri Feb 26 20:59:05 2016 -0800
----------------------------------------------------------------------
src/docker/docker.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/bfe6110b/src/docker/docker.cpp
----------------------------------------------------------------------
diff --git a/src/docker/docker.cpp b/src/docker/docker.cpp
index 4ebca66..4a3790b 100755
--- a/src/docker/docker.cpp
+++ b/src/docker/docker.cpp
@@ -392,14 +392,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()));
}
}