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