You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jp...@apache.org on 2018/11/27 19:58:54 UTC

[mesos] branch 1.6.x updated (4b5aa1c -> efbfc9d)

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

jpeach pushed a change to branch 1.6.x
in repository https://gitbox.apache.org/repos/asf/mesos.git.


    from 4b5aa1c  Added MESOS-9317 to the 1.6.2 CHANGELOG.
     new 9e327c9  Added the `DISCARD` blkio cgroup operation.
     new efbfc9d  Added MESOS-9418 to the 1.6.2 CHANGELOG.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG                                                            | 1 +
 include/mesos/mesos.proto                                            | 1 +
 include/mesos/v1/mesos.proto                                         | 1 +
 src/linux/cgroups.cpp                                                | 5 ++++-
 src/linux/cgroups.hpp                                                | 3 +++
 src/slave/containerizer/mesos/isolators/cgroups/subsystems/blkio.cpp | 3 +++
 6 files changed, 13 insertions(+), 1 deletion(-)


[mesos] 01/02: Added the `DISCARD` blkio cgroup operation.

Posted by jp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jpeach pushed a commit to branch 1.6.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 9e327c95dda04d12d876a5abdc60d71978a2e538
Author: James Peach <jp...@apache.org>
AuthorDate: Tue Nov 27 09:08:40 2018 -0800

    Added the `DISCARD` blkio cgroup operation.
    
    The Linux 4.19 kernel added a new `Discard` operation to the blkio
    cgroup statistics. Added this new operation so that the containerizer
    won't fail to parse blkio statistics on the latest kernels.
    
    Review: https://reviews.apache.org/r/69449/
    (cherry picked from commit 68cf4372721ca71741b6d836072f432d65d102f9)
---
 include/mesos/mesos.proto                                            | 1 +
 include/mesos/v1/mesos.proto                                         | 1 +
 src/linux/cgroups.cpp                                                | 5 ++++-
 src/linux/cgroups.hpp                                                | 3 +++
 src/slave/containerizer/mesos/isolators/cgroups/subsystems/blkio.cpp | 3 +++
 5 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto
index 463e6ad..4c66188 100644
--- a/include/mesos/mesos.proto
+++ b/include/mesos/mesos.proto
@@ -3284,6 +3284,7 @@ message CgroupInfo {
       WRITE = 3;
       SYNC = 4;
       ASYNC = 5;
+      DISCARD = 6;
     }
 
     // Describes a stat value without the device descriptor part.
diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto
index 8eaad9c..038892f 100644
--- a/include/mesos/v1/mesos.proto
+++ b/include/mesos/v1/mesos.proto
@@ -3276,6 +3276,7 @@ message CgroupInfo {
       WRITE = 3;
       SYNC = 4;
       ASYNC = 5;
+      DISCARD = 6;
     }
 
     // Describes a stat value without the device descriptor part.
diff --git a/src/linux/cgroups.cpp b/src/linux/cgroups.cpp
index dfbfc5a..aae719b 100644
--- a/src/linux/cgroups.cpp
+++ b/src/linux/cgroups.cpp
@@ -1982,7 +1982,8 @@ static bool isOperation(const string& s)
           s == "Read" ||
           s == "Write" ||
           s == "Sync" ||
-          s == "Async");
+          s == "Async" ||
+          s == "Discard");
 }
 
 
@@ -1998,6 +1999,8 @@ static Try<Operation> parseOperation(const string& s)
     return Operation::SYNC;
   } else if (s == "Async") {
     return Operation::ASYNC;
+  } else if (s == "Discard") {
+    return Operation::DISCARD;
   }
 
   return Error("Invalid Operation value: '" + s + "'");
diff --git a/src/linux/cgroups.hpp b/src/linux/cgroups.hpp
index 6a6f0e6..155797c 100644
--- a/src/linux/cgroups.hpp
+++ b/src/linux/cgroups.hpp
@@ -444,6 +444,7 @@ enum class Operation {
   WRITE,
   SYNC,
   ASYNC,
+  DISCARD,
 };
 
 
@@ -616,6 +617,8 @@ inline std::ostream& operator<<(std::ostream& stream, const Operation op)
       return stream << "Sync";
     case Operation::ASYNC:
       return stream << "Async";
+    case Operation::DISCARD:
+      return stream << "Discard";
   }
 
   UNREACHABLE();
diff --git a/src/slave/containerizer/mesos/isolators/cgroups/subsystems/blkio.cpp b/src/slave/containerizer/mesos/isolators/cgroups/subsystems/blkio.cpp
index fbf1fed..19afed9 100644
--- a/src/slave/containerizer/mesos/isolators/cgroups/subsystems/blkio.cpp
+++ b/src/slave/containerizer/mesos/isolators/cgroups/subsystems/blkio.cpp
@@ -85,6 +85,9 @@ static void setValue(
       case cgroups::blkio::Operation::ASYNC:
         value->set_op(CgroupInfo::Blkio::ASYNC);
         break;
+      case cgroups::blkio::Operation::DISCARD:
+        value->set_op(CgroupInfo::Blkio::DISCARD);
+        break;
     }
   }
 


[mesos] 02/02: Added MESOS-9418 to the 1.6.2 CHANGELOG.

Posted by jp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jpeach pushed a commit to branch 1.6.x
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit efbfc9d7f58b2a3926badff09db076a9ce642a2d
Author: James Peach <jp...@apache.org>
AuthorDate: Tue Nov 27 11:11:47 2018 -0800

    Added MESOS-9418 to the 1.6.2 CHANGELOG.
---
 CHANGELOG | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGELOG b/CHANGELOG
index d1112bf..d70e78f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -35,6 +35,7 @@ Release Notes - Mesos - Version 1.6.2 (WIP)
   * [MESOS-9317] - Some master endpoints do not handle failed authorization properly.
   * [MESOS-9332] - Nested container should run as the same user of its parent container by default.
   * [MESOS-9334] - Container stuck at ISOLATING state due to libevent poll never returns.
+  * [MESOS-9418] - Add support for the `Discard` blkio operation type.
 
 ** Improvement
   * [MESOS-9305] - Create cgoup recursively to workaround systemd deleting cgroups_root.