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