You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by gi...@apache.org on 2019/06/19 17:59:25 UTC
[mesos] 02/02: Added `--default_shm_size` agent flag.
This is an automated email from the ASF dual-hosted git repository.
gilbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
commit 1e647b95010edffe95376df83f8555e0d9a9beb2
Author: Qian Zhang <zh...@gmail.com>
AuthorDate: Wed Jun 19 10:55:01 2019 -0700
Added `--default_shm_size` agent flag.
Review: https://reviews.apache.org/r/70774/
---
docs/configuration/agent.md | 14 ++++++++++++++
src/slave/flags.cpp | 10 ++++++++++
src/slave/flags.hpp | 1 +
3 files changed, 25 insertions(+)
diff --git a/docs/configuration/agent.md b/docs/configuration/agent.md
index 322c228..2046bf2 100644
--- a/docs/configuration/agent.md
+++ b/docs/configuration/agent.md
@@ -577,6 +577,20 @@ this role. (default: *)
</td>
</tr>
+<tr id="default_shm_size">
+ <td>
+ --default_shm_size
+ </td>
+ <td>
+The default size of the /dev/shm for the container which has its own
+/dev/shm but does not specify the <code>shm_size</code> field in its
+<code>LinuxInfo</code>. The format is [number][unit], number must be
+a positive integer and unit can be B (bytes), KB (kilobytes), MB
+(megabytes), GB (gigabytes) or TB (terabytes). This flag will be
+ignored if the <code>namespaces/ipc</code> isolator is not enabled.
+ </td>
+</tr>
+
<tr id="disallow_sharing_agent_ipc_namespace">
<td>
--[no-]disallow_sharing_agent_ipc_namespace
diff --git a/src/slave/flags.cpp b/src/slave/flags.cpp
index 9cc88fd..9e26db0 100644
--- a/src/slave/flags.cpp
+++ b/src/slave/flags.cpp
@@ -763,6 +763,16 @@ mesos::internal::slave::Flags::Flags()
"This flag has the same syntax as `--effective_capabilities`."
);
+ add(&Flags::default_shm_size,
+ "default_shm_size",
+ "The default size of the /dev/shm for the container which has its own\n"
+ "/dev/shm but does not specify the `shm_size` field in its `LinuxInfo`.\n"
+ "The format is [number][unit], number must be a positive integer and\n"
+ "unit can be B (bytes), KB (kilobytes), MB (megabytes), GB (gigabytes)\n"
+ "or TB (terabytes). This flag will be ignored if the `namespaces/ipc`\n"
+ "isolator is not enabled."
+ );
+
add(&Flags::disallow_sharing_agent_ipc_namespace,
"disallow_sharing_agent_ipc_namespace",
"If set to `true`, each top-level container will have its own IPC\n"
diff --git a/src/slave/flags.hpp b/src/slave/flags.hpp
index f15f5f9..a10bf69 100644
--- a/src/slave/flags.hpp
+++ b/src/slave/flags.hpp
@@ -124,6 +124,7 @@ public:
std::string systemd_runtime_directory;
Option<CapabilityInfo> effective_capabilities;
Option<CapabilityInfo> bounding_capabilities;
+ Option<Bytes> default_shm_size;
bool disallow_sharing_agent_ipc_namespace;
bool disallow_sharing_agent_pid_namespace;
#endif