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