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

jieyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git


The following commit(s) were added to refs/heads/master by this push:
     new 030c550  Fixed the example for image_gc_config.
030c550 is described below

commit 030c5507191edd51fdce0e68c66acea2d4302138
Author: Jie Yu <[email protected]>
AuthorDate: Tue Aug 21 09:43:31 2018 -0700

    Fixed the example for image_gc_config.
    
    Since the unit is nanoseconds, setting it to 3600 is way too small, and
    misleading. This patch fixed the example to use 1 hour instead.
    
    Review: https://reviews.apache.org/r/68443
---
 docs/configuration/agent.md | 6 ++++--
 src/slave/flags.cpp         | 9 ++++++---
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/docs/configuration/agent.md b/docs/configuration/agent.md
index bcddea2..2127460 100644
--- a/docs/configuration/agent.md
+++ b/docs/configuration/agent.md
@@ -1016,11 +1016,13 @@ Containerizer for now.
 See the ImageGcConfig message in `flags.proto` for the expected
 format.
 <p/>
-Example:
+In the following example, image garbage collection is configured to
+sample disk usage every hour, and will attempt to maintain at least
+10% of free space on the container image filesystem:
 <pre><code>{
   "image_disk_headroom": 0.1,
   "image_disk_watch_interval": {
-    "nanoseconds": 3600
+    "nanoseconds": 3600000000000
   },
   "excluded_images": []
 }</code></pre>
diff --git a/src/slave/flags.cpp b/src/slave/flags.cpp
index fd208f6..8758f78 100644
--- a/src/slave/flags.cpp
+++ b/src/slave/flags.cpp
@@ -175,15 +175,18 @@ mesos::internal::slave::Flags::Flags()
       "auto image gc is enabled. This image gc config can be provided either\n"
       "as a path pointing to a local file, or as a JSON-formatted string.\n"
       "Please note that the image garbage collection only work with Mesos\n"
-      "Containerizer for now."
+      "Containerizer for now.\n"
       "\n"
       "See the ImageGcConfig message in `flags.proto` for the expected\n"
       "format.\n"
-      "Example:\n"
+      "\n"
+      "In the following example, image garbage collection is configured to\n"
+      "sample disk usage every hour, and will attempt to maintain at least\n"
+      "10 percent of free space on the container image filesystem:\n"
       "{\n"
       "  \"image_disk_headroom\": 0.1,\n"
       "  \"image_disk_watch_interval\": {\n"
-      "    \"nanoseconds\": 3600\n"
+      "    \"nanoseconds\": 3600000000000\n"
       "  },\n"
       "  \"excluded_images\": []\n"
       "}");

Reply via email to