Apache Mesos
flags.hpp
Go to the documentation of this file.
1 // Licensed to the Apache Software Foundation (ASF) under one
2 // or more contributor license agreements. See the NOTICE file
3 // distributed with this work for additional information
4 // regarding copyright ownership. The ASF licenses this file
5 // to you under the Apache License, Version 2.0 (the
6 // "License"); you may not use this file except in compliance
7 // with the License. You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 
17 #ifndef __SLAVE_FLAGS_HPP__
18 #define __SLAVE_FLAGS_HPP__
19 
20 #include <cstdint>
21 #include <string>
22 
23 #include <stout/bytes.hpp>
24 #include <stout/duration.hpp>
25 #include <stout/json.hpp>
26 #include <stout/option.hpp>
27 #include <stout/path.hpp>
28 
29 #include <mesos/module/module.hpp>
30 
31 #include "logging/flags.hpp"
32 
33 #include "messages/flags.hpp"
34 
35 namespace mesos {
36 namespace internal {
37 namespace slave {
38 
39 class Flags : public virtual logging::Flags
40 {
41 public:
42  Flags();
43 
44  bool version;
51  std::string isolation;
52  std::string launcher;
53 
57 
59  std::string appc_store_dir;
60 
61  std::string docker_registry;
62  std::string docker_store_dir;
66 
67  std::string default_role;
70  std::string fetcher_cache_dir;
72  std::string work_dir;
73  std::string runtime_dir;
74  std::string launcher_dir;
77 
78 #ifndef __WINDOWS__
81 #endif // __WINDOWS__
83  std::string frameworks_home; // TODO(benh): Make an Option.
93 #ifdef USE_SSL_SOCKET
94  Option<Path> jwt_secret_key;
95 #endif // USE_SSL_SOCKET
100 
102 
104  std::string recover;
106  bool strict;
108 #ifdef __linux__
109  Duration cgroups_destroy_timeout;
110  std::string cgroups_hierarchy;
111  std::string cgroups_root;
112  bool cgroups_enable_cfs;
113  bool cgroups_limit_swap;
114  bool cgroups_cpu_enable_pids_and_tids_count;
115  Option<std::string> cgroups_net_cls_primary_handle;
116  Option<std::string> cgroups_net_cls_secondary_handles;
117  Option<DeviceWhitelist> allowed_devices;
118  Option<std::string> agent_subsystems;
119  Option<std::string> host_path_volume_force_creation;
120  Option<std::vector<unsigned int>> nvidia_gpu_devices;
121  Option<std::string> perf_events;
122  Duration perf_interval;
123  Duration perf_duration;
124  bool revocable_cpu_low_priority;
125  bool systemd_enable_support;
126  std::string systemd_runtime_directory;
127  Option<CapabilityInfo> effective_capabilities;
128  Option<CapabilityInfo> bounding_capabilities;
129  Option<Bytes> default_container_shm_size;
130  bool disallow_sharing_agent_ipc_namespace;
131  bool disallow_sharing_agent_pid_namespace;
132 #endif
136  std::string containerizers;
137  std::string docker;
140  std::string sandbox_directory;
143 
144  // TODO(alexr): Remove this after the deprecation cycle (started in 1.0).
146 
148  std::string docker_socket;
150 
151 #ifdef ENABLE_PORT_MAPPING_ISOLATOR
152  uint16_t ephemeral_ports_per_container;
153  Option<std::string> eth0_name;
154  Option<std::string> lo_name;
155  Option<Bytes> egress_rate_limit_per_container;
156  bool egress_unique_flow_per_container;
157  std::string egress_flow_classifier_parent;
158  bool network_enable_socket_statistics_summary;
159  bool network_enable_socket_statistics_details;
160  bool network_enable_snmp_statistics;
161 #endif // ENABLE_PORT_MAPPING_ISOLATOR
162 
163 #ifdef ENABLE_NETWORK_PORTS_ISOLATOR
164  Duration container_ports_watch_interval;
165  bool check_agent_port_range_only;
166  bool enforce_container_ports;
167  Option<std::string> container_ports_isolated_range;
168 #endif // ENABLE_NETWORK_PORTS_ISOLATOR
169 
178  std::string authenticatee;
179  std::string authorizer;
183 #ifdef USE_SSL_SOCKET
184  bool authenticate_http_executors;
185 #endif // USE_SSL_SOCKET
186 #ifndef __WINDOWS__
189 #endif // __WINDOWS__
198 #if ENABLE_XFS_DISK_ISOLATOR
199  std::string xfs_project_range;
200  bool xfs_kill_containers;
201 #endif
202 #if ENABLE_SECCOMP_ISOLATOR
203  Option<std::string> seccomp_config_dir;
204  Option<std::string> seccomp_profile_name;
205 #endif
209 
210  // The following flags are executable specific (e.g., since we only
211  // have one instance of libprocess per execution, we only want to
212  // advertise the IP and port option once, here).
213 
215  uint16_t port;
220 
222 
223  // Optional IP discover script that will set the slave's IP.
224  // If set, its output is expected to be a valid parseable IP string.
226 
227  // IPv6 flags.
228  //
229  // NOTE: These IPv6 flags are currently input mechanisms
230  // for the operator to specify v6 addresses on which containers
231  // running on host network can listen. Mesos itself doesn't listen
232  // or communicate over v6 addresses at this point.
234 
235  // Similar to the `ip_discovery_command` this optional discover
236  // script is expected to output a valid IPv6 string. Only one of the
237  // two options `ip6` or `ip6_discovery_command` can be set at any
238  // given point of time.
240 };
241 
242 } // namespace slave {
243 } // namespace internal {
244 } // namespace mesos {
245 
246 #endif // __SLAVE_FLAGS_HPP__
Option< std::string > hadoop_home
Definition: flags.hpp:75
Option< std::string > modulesDir
Definition: flags.hpp:177
bool hostname_lookup
Definition: flags.hpp:46
Option< std::string > ip6
Definition: flags.hpp:233
std::string docker_store_dir
Definition: flags.hpp:62
Duration executor_registration_timeout
Definition: flags.hpp:89
size_t max_completed_executors_per_framework
Definition: flags.hpp:76
Definition: flags.hpp:29
Duration authentication_timeout_max
Definition: flags.hpp:87
Option< Firewall > firewall_rules
Definition: flags.hpp:133
Option< std::string > resource_estimator
Definition: flags.hpp:193
std::string docker_volume_checkpoint_dir
Definition: flags.hpp:63
Option< std::string > master_detector
Definition: flags.hpp:197
bool authenticate_http_readwrite
Definition: flags.hpp:182
Option< std::string > http_authenticators
Definition: flags.hpp:180
Option< std::string > ip6_discovery_command
Definition: flags.hpp:239
bool switch_user
Definition: flags.hpp:79
Duration zk_session_timeout
Definition: flags.hpp:221
Duration executor_reregistration_timeout
Definition: flags.hpp:90
Option< std::string > network_cni_config_dir
Definition: flags.hpp:171
Option< SlaveCapabilities > agent_features
Definition: flags.hpp:207
Option< std::string > attributes
Definition: flags.hpp:68
Option< std::string > qos_controller
Definition: flags.hpp:194
std::string appc_store_dir
Definition: flags.hpp:59
Option< Path > credential
Definition: flags.hpp:134
std::string authorizer
Definition: flags.hpp:179
Option< Modules > modules
Definition: flags.hpp:176
Duration gc_delay
Definition: flags.hpp:96
std::string isolation
Definition: flags.hpp:51
double gc_disk_headroom
Definition: flags.hpp:97
Definition: flags.hpp:39
Definition: duration.hpp:32
std::string runtime_dir
Definition: flags.hpp:73
std::string authenticatee
Definition: flags.hpp:178
Duration authentication_backoff_factor
Definition: flags.hpp:85
Option< JSON::Object > docker_config
Definition: flags.hpp:149
Duration docker_remove_delay
Definition: flags.hpp:139
Option< std::string > hostname
Definition: flags.hpp:45
Duration fetcher_stall_timeout
Definition: flags.hpp:71
Option< Duration > executor_reregistration_retry_interval
Definition: flags.hpp:91
bool network_cni_metrics
Definition: flags.hpp:173
bool gc_non_executor_container_sandboxes
Definition: flags.hpp:98
Option< std::string > docker_mesos_image
Definition: flags.hpp:138
Option< std::string > resources
Definition: flags.hpp:47
Option< flags::SecurePathOrValue > master
Definition: flags.hpp:218
Option< std::string > ip_discovery_command
Definition: flags.hpp:225
std::string recover
Definition: flags.hpp:104
bool memory_profiling
Definition: flags.hpp:219
Duration qos_correction_interval_min
Definition: flags.hpp:195
Duration disk_watch_interval
Definition: flags.hpp:99
Option< std::string > disk_profile_adaptor
Definition: flags.hpp:50
bool network_cni_root_dir_persist
Definition: flags.hpp:172
Duration executor_shutdown_grace_period
Definition: flags.hpp:92
std::string launcher_dir
Definition: flags.hpp:74
Definition: agent.hpp:25
Option< ContainerDNSInfo > default_container_dns
Definition: flags.hpp:141
Duration oversubscribed_resources_interval
Definition: flags.hpp:196
Duration recovery_timeout
Definition: flags.hpp:105
Option< JSON::Object > executor_environment_variables
Definition: flags.hpp:88
std::string docker
Definition: flags.hpp:137
std::string docker_registry
Definition: flags.hpp:61
uint16_t port
Definition: flags.hpp:215
Bytes fetcher_cache_size
Definition: flags.hpp:69
Option< std::string > advertise_port
Definition: flags.hpp:217
bool authenticate_http_readonly
Definition: flags.hpp:181
Option< std::string > network_cni_plugins_dir
Definition: flags.hpp:170
Option< std::string > domain_socket_location
Definition: flags.hpp:188
Option< DomainInfo > domain
Definition: flags.hpp:208
std::string fetcher_cache_dir
Definition: flags.hpp:70
std::string frameworks_home
Definition: flags.hpp:83
std::string docker_socket
Definition: flags.hpp:148
Option< std::string > resource_provider_config_dir
Definition: flags.hpp:48
Duration container_disk_watch_interval
Definition: flags.hpp:174
bool strict
Definition: flags.hpp:106
Option< std::string > secret_resolver
Definition: flags.hpp:192
Option< ImageGcConfig > image_gc_config
Definition: flags.hpp:56
std::string launcher
Definition: flags.hpp:52
bool http_executor_domain_sockets
Definition: flags.hpp:187
Option< std::string > container_logger
Definition: flags.hpp:101
Option< std::string > advertise_ip
Definition: flags.hpp:216
std::string containerizers
Definition: flags.hpp:136
Definition: attributes.hpp:24
bool docker_volume_chown
Definition: flags.hpp:64
Option< std::string > ip
Definition: flags.hpp:214
Duration http_heartbeat_interval
Definition: flags.hpp:82
Option< Path > http_credentials
Definition: flags.hpp:190
bool http_command_executor
Definition: flags.hpp:206
Option< std::string > image_providers
Definition: flags.hpp:54
std::string appc_simple_discovery_uri_prefix
Definition: flags.hpp:58
bool version
Definition: flags.hpp:44
Option< std::string > csi_plugin_config_dir
Definition: flags.hpp:49
Option< ContainerInfo > default_container_info
Definition: flags.hpp:142
std::string work_dir
Definition: flags.hpp:72
std::string default_role
Definition: flags.hpp:67
bool docker_kill_orphans
Definition: flags.hpp:147
Definition: bytes.hpp:30
std::string sandbox_directory
Definition: flags.hpp:140
Duration docker_stop_timeout
Definition: flags.hpp:145
Option< std::string > volume_gid_range
Definition: flags.hpp:80
Duration register_retry_interval_min
Definition: flags.hpp:107
Option< ACLs > acls
Definition: flags.hpp:135
Duration authentication_timeout_min
Definition: flags.hpp:86
std::string reconfiguration_policy
Definition: flags.hpp:103
Option< std::string > hooks
Definition: flags.hpp:191
Option< std::string > image_provisioner_backend
Definition: flags.hpp:55
bool docker_ignore_runtime
Definition: flags.hpp:65
Duration registration_backoff_factor
Definition: flags.hpp:84
bool enforce_container_disk_quota
Definition: flags.hpp:175