mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ji...@apache.org
Subject mesos git commit: Added capabilities support in ContanerInfo protobuf.
Date Mon, 18 Jul 2016 18:33:11 GMT
Repository: mesos
Updated Branches:
  refs/heads/master 3ce09f6e9 -> cbfd35754


Added capabilities support in ContanerInfo protobuf.

Review: https://reviews.apache.org/r/46369/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/cbfd3575
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/cbfd3575
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/cbfd3575

Branch: refs/heads/master
Commit: cbfd3575414eef6f2faf249b4b0a2a8de015cc42
Parents: 3ce09f6
Author: Jojy Varghese <jojy.varghese@gmail.com>
Authored: Mon Jul 18 11:08:03 2016 -0700
Committer: Jie Yu <yujie.jay@gmail.com>
Committed: Mon Jul 18 11:33:01 2016 -0700

----------------------------------------------------------------------
 include/mesos/mesos.proto    | 69 +++++++++++++++++++++++++++++++++++++++
 include/mesos/v1/mesos.proto | 69 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 138 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/cbfd3575/include/mesos/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/mesos.proto b/include/mesos/mesos.proto
index 7796c72..3f99641 100644
--- a/include/mesos/mesos.proto
+++ b/include/mesos/mesos.proto
@@ -1801,6 +1801,72 @@ message NetworkInfo {
 
 
 /**
+ * Encapsulation of `Capabilities` supported by Linux.
+ * Reference: http://linux.die.net/man/7/capabilities.
+ */
+message CapabilityInfo {
+  // We start the actual values at an offset(1000) because Protobuf 2
+  // uses the first value as the default one. Separating the default
+  // value from the real first value helps to disambiguate them. This
+  // is especially valuable for backward compatibility.
+  // See: MESOS-4997.
+  enum Capability {
+    UNKNOWN = 0;
+    CHOWN = 1000;
+    DAC_OVERRIDE = 1001;
+    DAC_READ_SEARCH = 1002;
+    FOWNER = 1003;
+    FSETID = 1004;
+    KILL = 1005;
+    SETGID = 1006;
+    SETUID = 1007;
+    SETPCAP = 1008;
+    LINUX_IMMUTABLE = 1009;
+    NET_BIND_SERVICE = 1010;
+    NET_BROADCAST = 1011;
+    NET_ADMIN = 1012;
+    NET_RAW = 1013;
+    IPC_LOCK = 1014;
+    IPC_OWNER = 1015;
+    SYS_MODULE = 1016;
+    SYS_RAWIO = 1017;
+    SYS_CHROOT = 1018;
+    SYS_PTRACE = 1019;
+    SYS_PACCT = 1020;
+    SYS_ADMIN = 1021;
+    SYS_BOOT = 1022;
+    SYS_NICE = 1023;
+    SYS_RESOURCE = 1024;
+    SYS_TIME = 1025;
+    SYS_TTY_CONFIG = 1026;
+    MKNOD = 1027;
+    LEASE = 1028;
+    AUDIT_WRITE = 1029;
+    AUDIT_CONTROL = 1030;
+    SETFCAP = 1031;
+    MAC_OVERRIDE = 1032;
+    MAC_ADMIN = 1033;
+    SYSLOG = 1034;
+    WAKE_ALARM = 1035;
+    BLOCK_SUSPEND = 1036;
+    AUDIT_READ = 1037;
+  }
+
+  repeated Capability capabilities = 1;
+}
+
+
+/**
+ * Encapsulation for Linux specific configuration.
+ * E.g, capabilities, limits etc.
+ */
+message LinuxInfo {
+  // Represents the capability whitelist.
+  optional CapabilityInfo capability_info = 1;
+}
+
+
+/**
  * Describes a container configuration and allows extensible
  * configurations for different container implementations.
  */
@@ -1867,6 +1933,9 @@ message ContainerInfo {
   // A list of network requests. A framework can request multiple IP addresses
   // for the container.
   repeated NetworkInfo network_infos = 7;
+
+  // Linux specific information for the container.
+  optional LinuxInfo linux_info = 8;
 }
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/cbfd3575/include/mesos/v1/mesos.proto
----------------------------------------------------------------------
diff --git a/include/mesos/v1/mesos.proto b/include/mesos/v1/mesos.proto
index fd03c54..cbc1d01 100644
--- a/include/mesos/v1/mesos.proto
+++ b/include/mesos/v1/mesos.proto
@@ -1800,6 +1800,72 @@ message NetworkInfo {
 
 
 /**
+ *  Encapsulation of `Capabilities` supported by Linux.
+ *  Reference: http://linux.die.net/man/7/capabilities.
+ */
+message CapabilityInfo {
+  // We start the actual values at an offset(1000) because Protobuf 2
+  // uses the first value as the default one. Separating the default
+  // value from the real first value helps to disambiguate them. This
+  // is especially valuable for backward compatibility.
+  // See: MESOS-4997.
+  enum Capability {
+    UNKNOWN = 0;
+    CHOWN = 1000;
+    DAC_OVERRIDE = 1001;
+    DAC_READ_SEARCH = 1002;
+    FOWNER = 1003;
+    FSETID = 1004;
+    KILL = 1005;
+    SETGID = 1006;
+    SETUID = 1007;
+    SETPCAP = 1008;
+    LINUX_IMMUTABLE = 1009;
+    NET_BIND_SERVICE = 1010;
+    NET_BROADCAST = 1011;
+    NET_ADMIN = 1012;
+    NET_RAW = 1013;
+    IPC_LOCK = 1014;
+    IPC_OWNER = 1015;
+    SYS_MODULE = 1016;
+    SYS_RAWIO = 1017;
+    SYS_CHROOT = 1018;
+    SYS_PTRACE = 1019;
+    SYS_PACCT = 1020;
+    SYS_ADMIN = 1021;
+    SYS_BOOT = 1022;
+    SYS_NICE = 1023;
+    SYS_RESOURCE = 1024;
+    SYS_TIME = 1025;
+    SYS_TTY_CONFIG = 1026;
+    MKNOD = 1027;
+    LEASE = 1028;
+    AUDIT_WRITE = 1029;
+    AUDIT_CONTROL = 1030;
+    SETFCAP = 1031;
+    MAC_OVERRIDE = 1032;
+    MAC_ADMIN = 1033;
+    SYSLOG = 1034;
+    WAKE_ALARM = 1035;
+    BLOCK_SUSPEND = 1036;
+    AUDIT_READ = 1037;
+  }
+
+  repeated Capability capabilities = 1;
+}
+
+
+/**
+ * Encapsulation for Linux specific configuration.
+ * E.g, capabilities, limits etc.
+ */
+message LinuxInfo {
+  // Represents the capability whitelist.
+  optional CapabilityInfo capability_info = 1;
+}
+
+
+/**
  * Describes a container configuration and allows extensible
  * configurations for different container implementations.
  */
@@ -1866,6 +1932,9 @@ message ContainerInfo {
   // A list of network requests. A framework can request multiple IP addresses
   // for the container.
   repeated NetworkInfo network_infos = 7;
+
+  // Linux specific information for the container.
+  optional LinuxInfo linux_info = 8;
 }
 
 


Mime
View raw message