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