Unify flags (#25)
* Unify flags implementation and change help text in backup.actor.cpp Description Testing * Keep LOG_GROUP unchanged Description Testing * Transfer the hyphens to underscores for internal options and user's input, EXCEPT leading hyphens Description Testing * Use a deep copy of the user's input flag to do the match Description Testing * Convert the _ to - in Option arrays of backup.actor.cpp Description Testing * Transter _ to - for files: TLSConfig.actor.h, fdbcli.actor.cpp, fdbserver.actor.cpp, FileConverter.h, FileConverter.cpp Description Testing * Change another way to unify flag: using SO_O_ICASE_HYPHEN_AND_UNDERSCORE to determine whether we do the conversion in function IsEqual Description Testing * Change the config command's name from SO_O_ICASE_HYPHEN_AND_UNDERSCORE to SO_O_HYPHEN_TO_UNDERSCORE Description Testing * Update the comment for the SO_O_HYPHEN_TO_UNDERSCORE Description Testing * Fix left underscore in SOption arrays Description Testing * Convert _ to - in several files for commands Description Testing * Make the FDBService and fdbmonitor backward compatible Description Testing * Fix bugs about pointers Description Testing * Check underscore and hyphen at the same time for --knob_, --localily_ and --test_ And fix bugs in fdbmonitor and FDBService Description Testing * Simplify the function in fdbmonitor and FDBService about retrieving arguments. And fix some documents in masterserver.actor.cpp Description Testing * Convert _ to - for knob in the setKnob functions Description Testing * Convert - to _ in the setKnob functions Description Since key in the knob related maps only contain _ Testing * Rename varialbe name in the fdbmonitor and FDBService for clarification Description Testing Co-authored-by: Chang Liu <chang.liu@snowflake.com>
This commit is contained in:
parent
5b079acd66
commit
f29f487823
|
@ -7,32 +7,32 @@
|
|||
[fdbmonitor]
|
||||
|
||||
[general]
|
||||
restart_delay = 10
|
||||
## by default, restart_backoff = restart_delay_reset_interval = restart_delay
|
||||
# initial_restart_delay = 0
|
||||
# restart_backoff = 60
|
||||
# restart_delay_reset_interval = 60
|
||||
cluster_file = ${CMAKE_BINARY_DIR}/fdb.cluster
|
||||
# delete_envvars =
|
||||
# kill_on_configuration_change = true
|
||||
restart-delay = 10
|
||||
## by default, restart-backoff = restart-delay-reset-interval = restart-delay
|
||||
# initial-restart-delay = 0
|
||||
# restart-backoff = 60
|
||||
# restart-delay-reset-interval = 60
|
||||
cluster-file = ${CMAKE_BINARY_DIR}/fdb.cluster
|
||||
# delete-envvars =
|
||||
# kill-on-configuration-change = true
|
||||
|
||||
## Default parameters for individual fdbserver processes
|
||||
[fdbserver]
|
||||
command = ${CMAKE_BINARY_DIR}/bin/fdbserver
|
||||
public_address = auto:$ID
|
||||
listen_address = public
|
||||
public-address = auto:$ID
|
||||
listen-address = public
|
||||
datadir = ${CMAKE_BINARY_DIR}/sandbox/data/$ID
|
||||
logdir = ${CMAKE_BINARY_DIR}/sandbox/logs
|
||||
# logsize = 10MiB
|
||||
# maxlogssize = 100MiB
|
||||
# machine_id =
|
||||
# datacenter_id =
|
||||
# machine-id =
|
||||
# datacenter-id =
|
||||
# class =
|
||||
# memory = 8GiB
|
||||
# storage_memory = 1GiB
|
||||
# cache_memory = 2GiB
|
||||
# metrics_cluster =
|
||||
# metrics_prefix =
|
||||
# storage-memory = 1GiB
|
||||
# cache-memory = 2GiB
|
||||
# metrics-cluster =
|
||||
# metrics-prefix =
|
||||
|
||||
## An individual fdbserver process with id 4000
|
||||
## Parameters set here override defaults from the [fdbserver] section
|
||||
|
|
|
@ -24,23 +24,23 @@ Options to Control Buggify
|
|||
There are four network options to control the buggify behavior. By default, buggify is disabled (as it will behave in a way
|
||||
that is not desirable in a production environment). The options to control buggify are:
|
||||
|
||||
- ``buggify_enable``
|
||||
- ``buggify-enable``
|
||||
This option takes no argument and will enable buggify.
|
||||
- ``buggify_disable``
|
||||
- ``buggify-disable``
|
||||
This can be used to disable buggify again.
|
||||
- ``client_buggify_section_activated_probability`` (default ``25``)
|
||||
- ``client-buggify-section-activated-probability`` (default ``25``)
|
||||
A number between 0 and 100.
|
||||
- ``client_buggify_section_fired_probability`` (default ``25``)
|
||||
- ``client-buggify-section-fired-probability`` (default ``25``)
|
||||
A number between 0 and 100.
|
||||
|
||||
The way buggify works is by enabling sections in the code first that get only executed with a certain probability. Generally
|
||||
these code sections will simply introduce a synthetic error.
|
||||
|
||||
When a section is passed for the first time, the client library will decide randomly whether that code section will be enabled
|
||||
or not. It will be enabled with a probability of ``client_buggify_section_activated_probability``.
|
||||
or not. It will be enabled with a probability of ``client-buggify-section-activated-probability``.
|
||||
|
||||
Whenever the client executes a buggify-enabled code-block, it will randomly execute it. This is to make sure that a certain
|
||||
exception doesn't always fire. The probably for executing such a section is ``client_buggify_section_fired_probability``.
|
||||
exception doesn't always fire. The probably for executing such a section is ``client-buggify-section-fired-probability``.
|
||||
|
||||
################################
|
||||
Simulation and Cluster Workloads
|
||||
|
@ -341,14 +341,14 @@ example this file would create a server with 8 processes of which 4 would act as
|
|||
group = foundationdb
|
||||
|
||||
[general]
|
||||
restart_delay = 60
|
||||
cluster_file = /etc/foundationdb/fdb.cluster
|
||||
restart-delay = 60
|
||||
cluster-file = /etc/foundationdb/fdb.cluster
|
||||
|
||||
## Default parameters for individual fdbserver processes
|
||||
[fdbserver]
|
||||
command = /usr/sbin/fdbserver
|
||||
public_address = auto:$ID
|
||||
listen_address = public
|
||||
public-address = auto:$ID
|
||||
listen-address = public
|
||||
datadir = /var/lib/foundationdb/data/$ID
|
||||
logdir = /var/log/foundationdb
|
||||
|
||||
|
|
|
@ -212,46 +212,46 @@ Contains basic configuration parameters of the ``fdbmonitor`` process. ``user``
|
|||
.. code-block:: ini
|
||||
|
||||
[general]
|
||||
cluster_file = /etc/foundationdb/fdb.cluster
|
||||
restart_delay = 60
|
||||
## restart_backoff and restart_delay_reset_interval default to the value that is used for restart_delay
|
||||
# initial_restart_delay = 0
|
||||
# restart_backoff = 60.0
|
||||
# restart_delay_reset_interval = 60
|
||||
# delete_envvars =
|
||||
# kill_on_configuration_change = true
|
||||
# disable_lifecycle_logging = false
|
||||
cluster-file = /etc/foundationdb/fdb.cluster
|
||||
restart-delay = 60
|
||||
## restart-backoff and restart-delay-reset-interval default to the value that is used for restart_delay
|
||||
# initial-restart-delay = 0
|
||||
# restart-backoff = 60.0
|
||||
# restart-delay-reset-interval = 60
|
||||
# delete-envvars =
|
||||
# kill-on-configuration-change = true
|
||||
# disable-lifecycle-logging = false
|
||||
|
||||
Contains settings applicable to all processes (e.g. fdbserver, backup_agent).
|
||||
|
||||
* ``cluster_file``: Specifies the location of the cluster file. This file and the directory that contains it must be writable by all processes (i.e. by the user or group set in the ``[fdbmonitor]`` section).
|
||||
* ``delete_envvars``: A space separated list of environment variables to remove from the environments of child processes. This can be used if the ``fdbmonitor`` process needs to be run with environment variables that are undesired in its children.
|
||||
* ``kill_on_configuration_change``: If ``true``, affected processes will be restarted whenever the configuration file changes. Defaults to ``true``.
|
||||
* ``disable_lifecycle_logging``: If ``true``, ``fdbmonitor`` will not write log events when processes start or terminate. Defaults to ``false``.
|
||||
* ``cluster-file``: Specifies the location of the cluster file. This file and the directory that contains it must be writable by all processes (i.e. by the user or group set in the ``[fdbmonitor]`` section).
|
||||
* ``delete-envvars``: A space separated list of environment variables to remove from the environments of child processes. This can be used if the ``fdbmonitor`` process needs to be run with environment variables that are undesired in its children.
|
||||
* ``kill-on-configuration_change``: If ``true``, affected processes will be restarted whenever the configuration file changes. Defaults to ``true``.
|
||||
* ``disable-lifecycle-logging``: If ``true``, ``fdbmonitor`` will not write log events when processes start or terminate. Defaults to ``false``.
|
||||
|
||||
.. _configuration-restarting:
|
||||
|
||||
The ``[general]`` section also contains some parameters to control how processes are restarted when they die. ``fdbmonitor`` uses backoff logic to prevent a process that dies repeatedly from cycling too quickly, and it also introduces up to +/-10% random jitter into the delay to avoid multiple processes all restarting simultaneously. ``fdbmonitor`` tracks separate backoff state for each process, so the restarting of one process will have no effect on the backoff behavior of another.
|
||||
|
||||
* ``restart_delay``: The maximum number of seconds (subject to jitter) that fdbmonitor will delay before restarting a failed process.
|
||||
* ``initial_restart_delay``: The number of seconds ``fdbmonitor`` waits to restart a process the first time it dies. Defaults to 0 (i.e. the process gets restarted immediately).
|
||||
* ``restart_backoff``: Controls how quickly ``fdbmonitor`` backs off when a process dies repeatedly. The previous delay (or 1, if the previous delay is 0) is multiplied by ``restart_backoff`` to get the next delay, maxing out at the value of ``restart_delay``. Defaults to the value of ``restart_delay``, meaning that the second and subsequent failures will all delay ``restart_delay`` between restarts.
|
||||
* ``restart_delay_reset_interval``: The number of seconds a process must be running before resetting the backoff back to the value of ``initial_restart_delay``. Defaults to the value of ``restart_delay``.
|
||||
* ``restart-delay``: The maximum number of seconds (subject to jitter) that fdbmonitor will delay before restarting a failed process.
|
||||
* ``initial-restart-delay``: The number of seconds ``fdbmonitor`` waits to restart a process the first time it dies. Defaults to 0 (i.e. the process gets restarted immediately).
|
||||
* ``restart-backoff``: Controls how quickly ``fdbmonitor`` backs off when a process dies repeatedly. The previous delay (or 1, if the previous delay is 0) is multiplied by ``restart_backoff`` to get the next delay, maxing out at the value of ``restart_delay``. Defaults to the value of ``restart_delay``, meaning that the second and subsequent failures will all delay ``restart_delay`` between restarts.
|
||||
* ``restart-delay-reset-interval``: The number of seconds a process must be running before resetting the backoff back to the value of ``initial_restart_delay``. Defaults to the value of ``restart_delay``.
|
||||
|
||||
These ``restart_`` parameters are not applicable to the ``fdbmonitor`` process itself. See :ref:`Configuring autorestart of fdbmonitor <configuration-restart-fdbmonitor>` for details.
|
||||
These ``restart-`` parameters are not applicable to the ``fdbmonitor`` process itself. See :ref:`Configuring autorestart of fdbmonitor <configuration-restart-fdbmonitor>` for details.
|
||||
|
||||
As an example, let's say the following parameters have been set:
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
restart_delay = 60
|
||||
initial_restart_delay = 0
|
||||
restart_backoff = 2.0
|
||||
restart_delay_reset_interval = 180
|
||||
restart-delay = 60
|
||||
initial-restart_delay = 0
|
||||
restart-backoff = 2.0
|
||||
restart-delay-reset-interval = 180
|
||||
|
||||
The progression of delays for a process that fails repeatedly would be ``0, 2, 4, 8, 16, 32, 60, 60, ...``, each subject to a 10% random jitter. After the process stays alive for 180 seconds, the backoff would reset and the next failure would restart the process immediately.
|
||||
|
||||
Using the default parameters, a process will restart immediately if it fails and then delay ``restart_delay`` seconds if it fails again within ``restart_delay`` seconds.
|
||||
Using the default parameters, a process will restart immediately if it fails and then delay ``restart-delay`` seconds if it fails again within ``restart-delay`` seconds.
|
||||
|
||||
.. _foundationdb-conf-fdbserver:
|
||||
|
||||
|
@ -263,21 +263,21 @@ Using the default parameters, a process will restart immediately if it fails and
|
|||
## Default parameters for individual fdbserver processes
|
||||
[fdbserver]
|
||||
command = /usr/sbin/fdbserver
|
||||
public_address = auto:$ID
|
||||
listen_address = public
|
||||
public-address = auto:$ID
|
||||
listen-address = public
|
||||
datadir = /var/lib/foundationdb/data/$ID
|
||||
logdir = /var/log/foundationdb
|
||||
# logsize = 10MiB
|
||||
# maxlogssize = 100MiB
|
||||
# class =
|
||||
# memory = 8GiB
|
||||
# storage_memory = 1GiB
|
||||
# cache_memory = 2GiB
|
||||
# locality_machineid =
|
||||
# locality_zoneid =
|
||||
# locality_data_hall =
|
||||
# locality_dcid =
|
||||
# io_trust_seconds = 20
|
||||
# storage-memory = 1GiB
|
||||
# cache-memory = 2GiB
|
||||
# locality-machineid =
|
||||
# locality-zoneid =
|
||||
# locality-data_hall =
|
||||
# locality-dcid =
|
||||
# io-trust-seconds = 20
|
||||
|
||||
Contains default parameters for all fdbserver processes on this machine. These same options can be overridden for individual processes in their respective ``[fdbserver.<ID>]`` sections. In this section, the ID of the individual fdbserver can be substituted by using the ``$ID`` variable in the value. For example, ``public_address = auto:$ID`` makes each fdbserver listen on a port equal to its ID.
|
||||
|
||||
|
@ -285,8 +285,8 @@ Contains default parameters for all fdbserver processes on this machine. These s
|
|||
.. note:: In general locality id's are used to specify the location of processes which in turn is used to determine fault and replication domains.
|
||||
|
||||
* ``command``: The location of the ``fdbserver`` binary.
|
||||
* ``public_address``: The publicly visible IP:Port of the process. If ``auto``, the address will be the one used to communicate with the coordination servers.
|
||||
* ``listen_address``: The IP:Port that the server socket should bind to. If ``public``, it will be the same as the public_address.
|
||||
* ``public-address``: The publicly visible IP:Port of the process. If ``auto``, the address will be the one used to communicate with the coordination servers.
|
||||
* ``listen-address``: The IP:Port that the server socket should bind to. If ``public``, it will be the same as the public_address.
|
||||
* ``datadir``: A writable directory (by root or by the user set in the [fdbmonitor] section) where persistent data files will be stored.
|
||||
* ``logdir``: A writable directory (by root or by the user set in the [fdbmonitor] section) where FoundationDB will store log files.
|
||||
* ``logsize``: Roll over to a new log file after the current log file reaches the specified size. The default value is 10MiB.
|
||||
|
@ -294,12 +294,12 @@ Contains default parameters for all fdbserver processes on this machine. These s
|
|||
* ``class``: Process class specifying the roles that will be taken in the cluster. Recommended options are ``storage``, ``transaction``, ``stateless``. See :ref:`guidelines-process-class-config` for process class config recommendations.
|
||||
* ``memory``: Maximum memory used by the process. The default value is 8GiB. When specified without a unit, MiB is assumed. This parameter does not change the memory allocation of the program. Rather, it sets a hard limit beyond which the process will kill itself and be restarted. The default value of 8GiB is double the intended memory usage in the default configuration (providing an emergency buffer to deal with memory leaks or similar problems). It is *not* recommended to decrease the value of this parameter below its default value. It may be *increased* if you wish to allocate a very large amount of storage engine memory or cache. In particular, when the ``storage_memory`` or ``cache_memory`` parameters are increased, the ``memory`` parameter should be increased by an equal amount.
|
||||
* ``storage_memory``: Maximum memory used for data storage. This parameter is used *only* with memory storage engine, not the ssd storage engine. The default value is 1GiB. When specified without a unit, MB is assumed. Clusters will be restricted to using this amount of memory per process for purposes of data storage. Memory overhead associated with storing the data is counted against this total. If you increase the ``storage_memory`` parameter, you should also increase the ``memory`` parameter by the same amount.
|
||||
* ``cache_memory``: Maximum memory used for caching pages from disk. The default value is 2GiB. When specified without a unit, MiB is assumed. If you increase the ``cache_memory`` parameter, you should also increase the ``memory`` parameter by the same amount.
|
||||
* ``locality_machineid``: Machine identifier key. All processes on a machine should share a unique id. By default, processes on a machine determine a unique id to share. This does not generally need to be set.
|
||||
* ``locality_zoneid``: Zone identifier key. Processes that share a zone id are considered non-unique for the purposes of data replication. If unset, defaults to machine id.
|
||||
* ``locality_dcid``: Datacenter identifier key. All processes physically located in a datacenter should share the id. No default value. If you are depending on datacenter based replication this must be set on all processes.
|
||||
* ``locality_data_hall``: Data hall identifier key. All processes physically located in a data hall should share the id. No default value. If you are depending on data hall based replication this must be set on all processes.
|
||||
* ``io_trust_seconds``: Time in seconds that a read or write operation is allowed to take before timing out with an error. If an operation times out, all future operations on that file will fail with an error as well. Only has an effect when using AsyncFileKAIO in Linux. If unset, defaults to 0 which means timeout is disabled.
|
||||
* ``cache-memory``: Maximum memory used for caching pages from disk. The default value is 2GiB. When specified without a unit, MiB is assumed. If you increase the ``cache_memory`` parameter, you should also increase the ``memory`` parameter by the same amount.
|
||||
* ``locality-machineid``: Machine identifier key. All processes on a machine should share a unique id. By default, processes on a machine determine a unique id to share. This does not generally need to be set.
|
||||
* ``locality-zoneid``: Zone identifier key. Processes that share a zone id are considered non-unique for the purposes of data replication. If unset, defaults to machine id.
|
||||
* ``locality-dcid``: Datacenter identifier key. All processes physically located in a datacenter should share the id. No default value. If you are depending on datacenter based replication this must be set on all processes.
|
||||
* ``locality-data-hall``: Data hall identifier key. All processes physically located in a data hall should share the id. No default value. If you are depending on data hall based replication this must be set on all processes.
|
||||
* ``io-trust-seconds``: Time in seconds that a read or write operation is allowed to take before timing out with an error. If an operation times out, all future operations on that file will fail with an error as well. Only has an effect when using AsyncFileKAIO in Linux. If unset, defaults to 0 which means timeout is disabled.
|
||||
|
||||
.. note:: In addition to the options above, TLS settings as described for the :ref:`TLS plugin <configuring-tls>` can be specified in the [fdbserver] section.
|
||||
|
||||
|
|
|
@ -49,10 +49,10 @@ void printConvertUsage() {
|
|||
<< " --loggroup LOG_GROUP\n"
|
||||
<< " Sets the LogGroup field with the specified value for all\n"
|
||||
<< " events in the trace output (defaults to `default').\n"
|
||||
<< " --trace_format FORMAT\n"
|
||||
<< " --trace-format FORMAT\n"
|
||||
<< " Select the format of the trace files. xml (the default) and json are supported.\n"
|
||||
<< " Has no effect unless --log is specified.\n"
|
||||
<< " --build_flags Print build information and exit.\n"
|
||||
<< " --build-flags Print build information and exit.\n"
|
||||
<< " -h, --help Display this help and exit.\n"
|
||||
<< "\n";
|
||||
|
||||
|
@ -571,7 +571,8 @@ int parseCommandLine(ConvertParams* param, CSimpleOpt* args) {
|
|||
|
||||
int main(int argc, char** argv) {
|
||||
try {
|
||||
CSimpleOpt* args = new CSimpleOpt(argc, argv, file_converter::gConverterOptions, SO_O_EXACT);
|
||||
CSimpleOpt* args =
|
||||
new CSimpleOpt(argc, argv, file_converter::gConverterOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
file_converter::ConvertParams param;
|
||||
int status = file_converter::parseCommandLine(¶m, args);
|
||||
std::cout << "Params: " << param.toString() << "\n";
|
||||
|
|
|
@ -58,20 +58,20 @@ CSimpleOpt::SOption gConverterOptions[] = { { OPT_CONTAINER, "-r", SO_REQ_SEP },
|
|||
{ OPT_END_VERSION, "--end", SO_REQ_SEP },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
{ OPT_TRACE_DIR, "--logdir", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_LOG_GROUP, "--loggroup", SO_REQ_SEP },
|
||||
{ OPT_INPUT_FILE, "-i", SO_REQ_SEP },
|
||||
{ OPT_INPUT_FILE, "--input", SO_REQ_SEP },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob_credentials", SO_REQ_SEP },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob-credentials", SO_REQ_SEP },
|
||||
#ifndef TLS_DISABLED
|
||||
TLS_OPTION_FLAGS
|
||||
#endif
|
||||
{ OPT_BUILD_FLAGS, "--build_flags", SO_NONE },
|
||||
{ OPT_LIST_ONLY, "--list_only", SO_NONE },
|
||||
{ OPT_BUILD_FLAGS, "--build-flags", SO_NONE },
|
||||
{ OPT_LIST_ONLY, "--list-only", SO_NONE },
|
||||
{ OPT_KEY_PREFIX, "-k", SO_REQ_SEP },
|
||||
{ OPT_HEX_KEY_PREFIX, "--hex_prefix", SO_REQ_SEP },
|
||||
{ OPT_BEGIN_VERSION_FILTER, "--begin_version_filter", SO_REQ_SEP },
|
||||
{ OPT_END_VERSION_FILTER, "--end_version_filter", SO_REQ_SEP },
|
||||
{ OPT_HEX_KEY_PREFIX, "--hex-prefix", SO_REQ_SEP },
|
||||
{ OPT_BEGIN_VERSION_FILTER, "--begin-version-filter", SO_REQ_SEP },
|
||||
{ OPT_END_VERSION_FILTER, "--end-version-filter", SO_REQ_SEP },
|
||||
{ OPT_HELP, "-?", SO_NONE },
|
||||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
|
|
|
@ -514,7 +514,8 @@ ACTOR Future<Void> decode_logs(DecodeParams params) {
|
|||
|
||||
int main(int argc, char** argv) {
|
||||
try {
|
||||
CSimpleOpt* args = new CSimpleOpt(argc, argv, file_converter::gConverterOptions, SO_O_EXACT);
|
||||
CSimpleOpt* args =
|
||||
new CSimpleOpt(argc, argv, file_converter::gConverterOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
file_converter::DecodeParams param;
|
||||
int status = file_converter::parseDecodeCommandLine(¶m, args);
|
||||
std::cout << "Params: " << param.toString() << "\n";
|
||||
|
|
|
@ -182,7 +182,7 @@ enum {
|
|||
// Top level binary commands.
|
||||
CSimpleOpt::SOption g_rgOptions[] = { { OPT_VERSION, "-v", SO_NONE },
|
||||
{ OPT_VERSION, "--version", SO_NONE },
|
||||
{ OPT_BUILD_FLAGS, "--build_flags", SO_NONE },
|
||||
{ OPT_BUILD_FLAGS, "--build-flags", SO_NONE },
|
||||
{ OPT_HELP, "-?", SO_NONE },
|
||||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
|
@ -194,26 +194,26 @@ CSimpleOpt::SOption g_rgAgentOptions[] = {
|
|||
{ OPT_PARENTPID, "--parentpid", SO_REQ_SEP },
|
||||
#endif
|
||||
{ OPT_CLUSTERFILE, "-C", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster_file", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster-file", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
{ OPT_VERSION, "--version", SO_NONE },
|
||||
{ OPT_VERSION, "-v", SO_NONE },
|
||||
{ OPT_BUILD_FLAGS, "--build_flags", SO_NONE },
|
||||
{ OPT_BUILD_FLAGS, "--build-flags", SO_NONE },
|
||||
{ OPT_QUIET, "-q", SO_NONE },
|
||||
{ OPT_QUIET, "--quiet", SO_NONE },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
{ OPT_TRACE_DIR, "--logdir", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_LOG_GROUP, "--loggroup", SO_REQ_SEP },
|
||||
{ OPT_CRASHONERROR, "--crash", SO_NONE },
|
||||
{ OPT_LOCALITY, "--locality_", SO_REQ_SEP },
|
||||
{ OPT_LOCALITY, "--locality-", SO_REQ_SEP },
|
||||
{ OPT_MEMLIMIT, "-m", SO_REQ_SEP },
|
||||
{ OPT_MEMLIMIT, "--memory", SO_REQ_SEP },
|
||||
{ OPT_HELP, "-?", SO_NONE },
|
||||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob_credentials", SO_REQ_SEP },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob-credentials", SO_REQ_SEP },
|
||||
#ifndef TLS_DISABLED
|
||||
TLS_OPTION_FLAGS
|
||||
#endif
|
||||
|
@ -225,7 +225,7 @@ CSimpleOpt::SOption g_rgBackupStartOptions[] = {
|
|||
{ OPT_PARENTPID, "--parentpid", SO_REQ_SEP },
|
||||
#endif
|
||||
{ OPT_CLUSTERFILE, "-C", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster_file", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster-file", SO_REQ_SEP },
|
||||
{ OPT_WAITFORDONE, "-w", SO_NONE },
|
||||
{ OPT_WAITFORDONE, "--waitfordone", SO_NONE },
|
||||
{ OPT_NOSTOPWHENDONE, "-z", SO_NONE },
|
||||
|
@ -234,10 +234,10 @@ CSimpleOpt::SOption g_rgBackupStartOptions[] = {
|
|||
{ OPT_DESTCONTAINER, "--destcontainer", SO_REQ_SEP },
|
||||
// Enable "-p" option after GA
|
||||
// { OPT_USE_PARTITIONED_LOG, "-p", SO_NONE },
|
||||
{ OPT_USE_PARTITIONED_LOG, "--partitioned_log_experimental", SO_NONE },
|
||||
{ OPT_USE_PARTITIONED_LOG, "--partitioned-log-experimental", SO_NONE },
|
||||
{ OPT_SNAPSHOTINTERVAL, "-s", SO_REQ_SEP },
|
||||
{ OPT_SNAPSHOTINTERVAL, "--snapshot_interval", SO_REQ_SEP },
|
||||
{ OPT_INITIAL_SNAPSHOT_INTERVAL, "--initial_snapshot_interval", SO_REQ_SEP },
|
||||
{ OPT_SNAPSHOTINTERVAL, "--snapshot-interval", SO_REQ_SEP },
|
||||
{ OPT_INITIAL_SNAPSHOT_INTERVAL, "--initial-snapshot-interval", SO_REQ_SEP },
|
||||
{ OPT_TAGNAME, "-t", SO_REQ_SEP },
|
||||
{ OPT_TAGNAME, "--tagname", SO_REQ_SEP },
|
||||
{ OPT_BACKUPKEYS, "-k", SO_REQ_SEP },
|
||||
|
@ -246,7 +246,7 @@ CSimpleOpt::SOption g_rgBackupStartOptions[] = {
|
|||
{ OPT_DRYRUN, "--dryrun", SO_NONE },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
{ OPT_TRACE_DIR, "--logdir", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_LOG_GROUP, "--loggroup", SO_REQ_SEP },
|
||||
{ OPT_QUIET, "-q", SO_NONE },
|
||||
{ OPT_QUIET, "--quiet", SO_NONE },
|
||||
|
@ -257,10 +257,10 @@ CSimpleOpt::SOption g_rgBackupStartOptions[] = {
|
|||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob_credentials", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob-credentials", SO_REQ_SEP },
|
||||
{ OPT_INCREMENTALONLY, "--incremental", SO_NONE },
|
||||
{ OPT_ENCRYPTION_KEY_FILE, "--encryption_key_file", SO_REQ_SEP },
|
||||
{ OPT_ENCRYPTION_KEY_FILE, "--encryption-key-file", SO_REQ_SEP },
|
||||
#ifndef TLS_DISABLED
|
||||
TLS_OPTION_FLAGS
|
||||
#endif
|
||||
|
@ -283,18 +283,18 @@ CSimpleOpt::SOption g_rgBackupModifyOptions[] = {
|
|||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob_credentials", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob-credentials", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "-C", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster_file", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster-file", SO_REQ_SEP },
|
||||
{ OPT_TAGNAME, "-t", SO_REQ_SEP },
|
||||
{ OPT_TAGNAME, "--tagname", SO_REQ_SEP },
|
||||
{ OPT_MOD_VERIFY_UID, "--verify_uid", SO_REQ_SEP },
|
||||
{ OPT_MOD_VERIFY_UID, "--verify-uid", SO_REQ_SEP },
|
||||
{ OPT_DESTCONTAINER, "-d", SO_REQ_SEP },
|
||||
{ OPT_DESTCONTAINER, "--destcontainer", SO_REQ_SEP },
|
||||
{ OPT_SNAPSHOTINTERVAL, "-s", SO_REQ_SEP },
|
||||
{ OPT_SNAPSHOTINTERVAL, "--snapshot_interval", SO_REQ_SEP },
|
||||
{ OPT_MOD_ACTIVE_INTERVAL, "--active_snapshot_interval", SO_REQ_SEP },
|
||||
{ OPT_SNAPSHOTINTERVAL, "--snapshot-interval", SO_REQ_SEP },
|
||||
{ OPT_MOD_ACTIVE_INTERVAL, "--active-snapshot-interval", SO_REQ_SEP },
|
||||
|
||||
SO_END_OF_OPTIONS
|
||||
};
|
||||
|
@ -304,14 +304,14 @@ CSimpleOpt::SOption g_rgBackupStatusOptions[] = {
|
|||
{ OPT_PARENTPID, "--parentpid", SO_REQ_SEP },
|
||||
#endif
|
||||
{ OPT_CLUSTERFILE, "-C", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster_file", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster-file", SO_REQ_SEP },
|
||||
{ OPT_ERRORLIMIT, "-e", SO_REQ_SEP },
|
||||
{ OPT_ERRORLIMIT, "--errorlimit", SO_REQ_SEP },
|
||||
{ OPT_TAGNAME, "-t", SO_REQ_SEP },
|
||||
{ OPT_TAGNAME, "--tagname", SO_REQ_SEP },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
{ OPT_TRACE_DIR, "--logdir", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_LOG_GROUP, "--loggroup", SO_REQ_SEP },
|
||||
{ OPT_QUIET, "-q", SO_NONE },
|
||||
{ OPT_QUIET, "--quiet", SO_NONE },
|
||||
|
@ -323,7 +323,7 @@ CSimpleOpt::SOption g_rgBackupStatusOptions[] = {
|
|||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_JSON, "--json", SO_NONE },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
#ifndef TLS_DISABLED
|
||||
TLS_OPTION_FLAGS
|
||||
#endif
|
||||
|
@ -335,12 +335,12 @@ CSimpleOpt::SOption g_rgBackupAbortOptions[] = {
|
|||
{ OPT_PARENTPID, "--parentpid", SO_REQ_SEP },
|
||||
#endif
|
||||
{ OPT_CLUSTERFILE, "-C", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster_file", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster-file", SO_REQ_SEP },
|
||||
{ OPT_TAGNAME, "-t", SO_REQ_SEP },
|
||||
{ OPT_TAGNAME, "--tagname", SO_REQ_SEP },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
{ OPT_TRACE_DIR, "--logdir", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_LOG_GROUP, "--loggroup", SO_REQ_SEP },
|
||||
{ OPT_QUIET, "-q", SO_NONE },
|
||||
{ OPT_QUIET, "--quiet", SO_NONE },
|
||||
|
@ -351,7 +351,7 @@ CSimpleOpt::SOption g_rgBackupAbortOptions[] = {
|
|||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
#ifndef TLS_DISABLED
|
||||
TLS_OPTION_FLAGS
|
||||
#endif
|
||||
|
@ -363,10 +363,10 @@ CSimpleOpt::SOption g_rgBackupCleanupOptions[] = {
|
|||
{ OPT_PARENTPID, "--parentpid", SO_REQ_SEP },
|
||||
#endif
|
||||
{ OPT_CLUSTERFILE, "-C", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster_file", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster-file", SO_REQ_SEP },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
{ OPT_TRACE_DIR, "--logdir", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_LOG_GROUP, "--loggroup", SO_REQ_SEP },
|
||||
{ OPT_QUIET, "-q", SO_NONE },
|
||||
{ OPT_QUIET, "--quiet", SO_NONE },
|
||||
|
@ -377,9 +377,9 @@ CSimpleOpt::SOption g_rgBackupCleanupOptions[] = {
|
|||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_DELETE_DATA, "--delete_data", SO_NONE },
|
||||
{ OPT_MIN_CLEANUP_SECONDS, "--min_cleanup_seconds", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
{ OPT_DELETE_DATA, "--delete-data", SO_NONE },
|
||||
{ OPT_MIN_CLEANUP_SECONDS, "--min-cleanup-seconds", SO_REQ_SEP },
|
||||
#ifndef TLS_DISABLED
|
||||
TLS_OPTION_FLAGS
|
||||
#endif
|
||||
|
@ -391,14 +391,14 @@ CSimpleOpt::SOption g_rgBackupDiscontinueOptions[] = {
|
|||
{ OPT_PARENTPID, "--parentpid", SO_REQ_SEP },
|
||||
#endif
|
||||
{ OPT_CLUSTERFILE, "-C", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster_file", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster-file", SO_REQ_SEP },
|
||||
{ OPT_TAGNAME, "-t", SO_REQ_SEP },
|
||||
{ OPT_TAGNAME, "--tagname", SO_REQ_SEP },
|
||||
{ OPT_WAITFORDONE, "-w", SO_NONE },
|
||||
{ OPT_WAITFORDONE, "--waitfordone", SO_NONE },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
{ OPT_TRACE_DIR, "--logdir", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_LOG_GROUP, "--loggroup", SO_REQ_SEP },
|
||||
{ OPT_QUIET, "-q", SO_NONE },
|
||||
{ OPT_QUIET, "--quiet", SO_NONE },
|
||||
|
@ -409,7 +409,7 @@ CSimpleOpt::SOption g_rgBackupDiscontinueOptions[] = {
|
|||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
#ifndef TLS_DISABLED
|
||||
TLS_OPTION_FLAGS
|
||||
#endif
|
||||
|
@ -421,7 +421,7 @@ CSimpleOpt::SOption g_rgBackupWaitOptions[] = {
|
|||
{ OPT_PARENTPID, "--parentpid", SO_REQ_SEP },
|
||||
#endif
|
||||
{ OPT_CLUSTERFILE, "-C", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster_file", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster-file", SO_REQ_SEP },
|
||||
{ OPT_TAGNAME, "-t", SO_REQ_SEP },
|
||||
{ OPT_TAGNAME, "--tagname", SO_REQ_SEP },
|
||||
{ OPT_NOSTOPWHENDONE, "-z", SO_NONE },
|
||||
|
@ -439,7 +439,7 @@ CSimpleOpt::SOption g_rgBackupWaitOptions[] = {
|
|||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
#ifndef TLS_DISABLED
|
||||
TLS_OPTION_FLAGS
|
||||
#endif
|
||||
|
@ -451,10 +451,10 @@ CSimpleOpt::SOption g_rgBackupPauseOptions[] = {
|
|||
{ OPT_PARENTPID, "--parentpid", SO_REQ_SEP },
|
||||
#endif
|
||||
{ OPT_CLUSTERFILE, "-C", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster_file", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster-file", SO_REQ_SEP },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
{ OPT_TRACE_DIR, "--logdir", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_LOG_GROUP, "--loggroup", SO_REQ_SEP },
|
||||
{ OPT_QUIET, "-q", SO_NONE },
|
||||
{ OPT_QUIET, "--quiet", SO_NONE },
|
||||
|
@ -465,7 +465,7 @@ CSimpleOpt::SOption g_rgBackupPauseOptions[] = {
|
|||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
#ifndef TLS_DISABLED
|
||||
TLS_OPTION_FLAGS
|
||||
#endif
|
||||
|
@ -477,12 +477,12 @@ CSimpleOpt::SOption g_rgBackupExpireOptions[] = {
|
|||
{ OPT_PARENTPID, "--parentpid", SO_REQ_SEP },
|
||||
#endif
|
||||
{ OPT_CLUSTERFILE, "-C", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster_file", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster-file", SO_REQ_SEP },
|
||||
{ OPT_DESTCONTAINER, "-d", SO_REQ_SEP },
|
||||
{ OPT_DESTCONTAINER, "--destcontainer", SO_REQ_SEP },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
{ OPT_TRACE_DIR, "--logdir", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_LOG_GROUP, "--loggroup", SO_REQ_SEP },
|
||||
{ OPT_QUIET, "-q", SO_NONE },
|
||||
{ OPT_QUIET, "--quiet", SO_NONE },
|
||||
|
@ -493,16 +493,16 @@ CSimpleOpt::SOption g_rgBackupExpireOptions[] = {
|
|||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob_credentials", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob-credentials", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
{ OPT_FORCE, "-f", SO_NONE },
|
||||
{ OPT_FORCE, "--force", SO_NONE },
|
||||
{ OPT_EXPIRE_RESTORABLE_AFTER_VERSION, "--restorable_after_version", SO_REQ_SEP },
|
||||
{ OPT_EXPIRE_RESTORABLE_AFTER_DATETIME, "--restorable_after_timestamp", SO_REQ_SEP },
|
||||
{ OPT_EXPIRE_BEFORE_VERSION, "--expire_before_version", SO_REQ_SEP },
|
||||
{ OPT_EXPIRE_BEFORE_DATETIME, "--expire_before_timestamp", SO_REQ_SEP },
|
||||
{ OPT_EXPIRE_MIN_RESTORABLE_DAYS, "--min_restorable_days", SO_REQ_SEP },
|
||||
{ OPT_EXPIRE_DELETE_BEFORE_DAYS, "--delete_before_days", SO_REQ_SEP },
|
||||
{ OPT_EXPIRE_RESTORABLE_AFTER_VERSION, "--restorable-after-version", SO_REQ_SEP },
|
||||
{ OPT_EXPIRE_RESTORABLE_AFTER_DATETIME, "--restorable-after-timestamp", SO_REQ_SEP },
|
||||
{ OPT_EXPIRE_BEFORE_VERSION, "--expire-before-version", SO_REQ_SEP },
|
||||
{ OPT_EXPIRE_BEFORE_DATETIME, "--expire-before-timestamp", SO_REQ_SEP },
|
||||
{ OPT_EXPIRE_MIN_RESTORABLE_DAYS, "--min-restorable-days", SO_REQ_SEP },
|
||||
{ OPT_EXPIRE_DELETE_BEFORE_DAYS, "--delete-before-days", SO_REQ_SEP },
|
||||
#ifndef TLS_DISABLED
|
||||
TLS_OPTION_FLAGS
|
||||
#endif
|
||||
|
@ -517,7 +517,7 @@ CSimpleOpt::SOption g_rgBackupDeleteOptions[] = {
|
|||
{ OPT_DESTCONTAINER, "--destcontainer", SO_REQ_SEP },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
{ OPT_TRACE_DIR, "--logdir", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_LOG_GROUP, "--loggroup", SO_REQ_SEP },
|
||||
{ OPT_QUIET, "-q", SO_NONE },
|
||||
{ OPT_QUIET, "--quiet", SO_NONE },
|
||||
|
@ -528,8 +528,8 @@ CSimpleOpt::SOption g_rgBackupDeleteOptions[] = {
|
|||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob_credentials", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob-credentials", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
#ifndef TLS_DISABLED
|
||||
TLS_OPTION_FLAGS
|
||||
#endif
|
||||
|
@ -541,12 +541,12 @@ CSimpleOpt::SOption g_rgBackupDescribeOptions[] = {
|
|||
{ OPT_PARENTPID, "--parentpid", SO_REQ_SEP },
|
||||
#endif
|
||||
{ OPT_CLUSTERFILE, "-C", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster_file", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster-file", SO_REQ_SEP },
|
||||
{ OPT_DESTCONTAINER, "-d", SO_REQ_SEP },
|
||||
{ OPT_DESTCONTAINER, "--destcontainer", SO_REQ_SEP },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
{ OPT_TRACE_DIR, "--logdir", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_LOG_GROUP, "--loggroup", SO_REQ_SEP },
|
||||
{ OPT_QUIET, "-q", SO_NONE },
|
||||
{ OPT_QUIET, "--quiet", SO_NONE },
|
||||
|
@ -557,10 +557,10 @@ CSimpleOpt::SOption g_rgBackupDescribeOptions[] = {
|
|||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob_credentials", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob-credentials", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
{ OPT_DESCRIBE_DEEP, "--deep", SO_NONE },
|
||||
{ OPT_DESCRIBE_TIMESTAMPS, "--version_timestamps", SO_NONE },
|
||||
{ OPT_DESCRIBE_TIMESTAMPS, "--version-timestamps", SO_NONE },
|
||||
{ OPT_JSON, "--json", SO_NONE },
|
||||
#ifndef TLS_DISABLED
|
||||
TLS_OPTION_FLAGS
|
||||
|
@ -573,7 +573,7 @@ CSimpleOpt::SOption g_rgBackupDumpOptions[] = {
|
|||
{ OPT_PARENTPID, "--parentpid", SO_REQ_SEP },
|
||||
#endif
|
||||
{ OPT_CLUSTERFILE, "-C", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster_file", SO_REQ_SEP },
|
||||
{ OPT_CLUSTERFILE, "--cluster-file", SO_REQ_SEP },
|
||||
{ OPT_DESTCONTAINER, "-d", SO_REQ_SEP },
|
||||
{ OPT_DESTCONTAINER, "--destcontainer", SO_REQ_SEP },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
|
@ -588,8 +588,8 @@ CSimpleOpt::SOption g_rgBackupDumpOptions[] = {
|
|||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob_credentials", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob-credentials", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
{ OPT_DUMP_BEGIN, "--begin", SO_REQ_SEP },
|
||||
{ OPT_DUMP_END, "--end", SO_REQ_SEP },
|
||||
#ifndef TLS_DISABLED
|
||||
|
@ -603,10 +603,10 @@ CSimpleOpt::SOption g_rgBackupListOptions[] = {
|
|||
{ OPT_PARENTPID, "--parentpid", SO_REQ_SEP },
|
||||
#endif
|
||||
{ OPT_BASEURL, "-b", SO_REQ_SEP },
|
||||
{ OPT_BASEURL, "--base_url", SO_REQ_SEP },
|
||||
{ OPT_BASEURL, "--base-url", SO_REQ_SEP },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
{ OPT_TRACE_DIR, "--logdir", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_LOG_GROUP, "--loggroup", SO_REQ_SEP },
|
||||
{ OPT_QUIET, "-q", SO_NONE },
|
||||
{ OPT_QUIET, "--quiet", SO_NONE },
|
||||
|
@ -617,8 +617,8 @@ CSimpleOpt::SOption g_rgBackupListOptions[] = {
|
|||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob_credentials", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob-credentials", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
#ifndef TLS_DISABLED
|
||||
TLS_OPTION_FLAGS
|
||||
#endif
|
||||
|
@ -629,16 +629,16 @@ CSimpleOpt::SOption g_rgBackupQueryOptions[] = {
|
|||
#ifdef _WIN32
|
||||
{ OPT_PARENTPID, "--parentpid", SO_REQ_SEP },
|
||||
#endif
|
||||
{ OPT_RESTORE_TIMESTAMP, "--query_restore_timestamp", SO_REQ_SEP },
|
||||
{ OPT_RESTORE_TIMESTAMP, "--query-restore-timestamp", SO_REQ_SEP },
|
||||
{ OPT_DESTCONTAINER, "-d", SO_REQ_SEP },
|
||||
{ OPT_DESTCONTAINER, "--destcontainer", SO_REQ_SEP },
|
||||
{ OPT_RESTORE_VERSION, "-qrv", SO_REQ_SEP },
|
||||
{ OPT_RESTORE_VERSION, "--query_restore_version", SO_REQ_SEP },
|
||||
{ OPT_RESTORE_VERSION, "--query-restore-version", SO_REQ_SEP },
|
||||
{ OPT_BACKUPKEYS_FILTER, "-k", SO_REQ_SEP },
|
||||
{ OPT_BACKUPKEYS_FILTER, "--keys", SO_REQ_SEP },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
{ OPT_TRACE_DIR, "--logdir", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_LOG_GROUP, "--loggroup", SO_REQ_SEP },
|
||||
{ OPT_QUIET, "-q", SO_NONE },
|
||||
{ OPT_QUIET, "--quiet", SO_NONE },
|
||||
|
@ -651,8 +651,8 @@ CSimpleOpt::SOption g_rgBackupQueryOptions[] = {
|
|||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob_credentials", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob-credentials", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
#ifndef TLS_DISABLED
|
||||
TLS_OPTION_FLAGS
|
||||
#endif
|
||||
|
@ -664,13 +664,13 @@ CSimpleOpt::SOption g_rgRestoreOptions[] = {
|
|||
#ifdef _WIN32
|
||||
{ OPT_PARENTPID, "--parentpid", SO_REQ_SEP },
|
||||
#endif
|
||||
{ OPT_RESTORE_CLUSTERFILE_DEST, "--dest_cluster_file", SO_REQ_SEP },
|
||||
{ OPT_RESTORE_CLUSTERFILE_ORIG, "--orig_cluster_file", SO_REQ_SEP },
|
||||
{ OPT_RESTORE_CLUSTERFILE_DEST, "--dest-cluster-file", SO_REQ_SEP },
|
||||
{ OPT_RESTORE_CLUSTERFILE_ORIG, "--orig-cluster-file", SO_REQ_SEP },
|
||||
{ OPT_RESTORE_TIMESTAMP, "--timestamp", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
{ OPT_RESTORECONTAINER, "-r", SO_REQ_SEP },
|
||||
{ OPT_PREFIX_ADD, "--add_prefix", SO_REQ_SEP },
|
||||
{ OPT_PREFIX_REMOVE, "--remove_prefix", SO_REQ_SEP },
|
||||
{ OPT_PREFIX_ADD, "--add-prefix", SO_REQ_SEP },
|
||||
{ OPT_PREFIX_REMOVE, "--remove-prefix", SO_REQ_SEP },
|
||||
{ OPT_TAGNAME, "-t", SO_REQ_SEP },
|
||||
{ OPT_TAGNAME, "--tagname", SO_REQ_SEP },
|
||||
{ OPT_BACKUPKEYS, "-k", SO_REQ_SEP },
|
||||
|
@ -681,7 +681,7 @@ CSimpleOpt::SOption g_rgRestoreOptions[] = {
|
|||
{ OPT_RESTORE_VERSION, "-v", SO_REQ_SEP },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
{ OPT_TRACE_DIR, "--logdir", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_LOG_GROUP, "--loggroup", SO_REQ_SEP },
|
||||
{ OPT_QUIET, "-q", SO_NONE },
|
||||
{ OPT_QUIET, "--quiet", SO_NONE },
|
||||
|
@ -695,11 +695,11 @@ CSimpleOpt::SOption g_rgRestoreOptions[] = {
|
|||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob_credentials", SO_REQ_SEP },
|
||||
{ OPT_BLOB_CREDENTIALS, "--blob-credentials", SO_REQ_SEP },
|
||||
{ OPT_INCREMENTALONLY, "--incremental", SO_NONE },
|
||||
{ OPT_RESTORE_BEGIN_VERSION, "--begin_version", SO_REQ_SEP },
|
||||
{ OPT_RESTORE_INCONSISTENT_SNAPSHOT_ONLY, "--inconsistent_snapshot_only", SO_NONE },
|
||||
{ OPT_ENCRYPTION_KEY_FILE, "--encryption_key_file", SO_REQ_SEP },
|
||||
{ OPT_RESTORE_BEGIN_VERSION, "--begin-version", SO_REQ_SEP },
|
||||
{ OPT_RESTORE_INCONSISTENT_SNAPSHOT_ONLY, "--inconsistent-snapshot-only", SO_NONE },
|
||||
{ OPT_ENCRYPTION_KEY_FILE, "--encryption-key-file", SO_REQ_SEP },
|
||||
#ifndef TLS_DISABLED
|
||||
TLS_OPTION_FLAGS
|
||||
#endif
|
||||
|
@ -714,18 +714,18 @@ CSimpleOpt::SOption g_rgDBAgentOptions[] = {
|
|||
{ OPT_SOURCE_CLUSTER, "--source", SO_REQ_SEP },
|
||||
{ OPT_DEST_CLUSTER, "-d", SO_REQ_SEP },
|
||||
{ OPT_DEST_CLUSTER, "--destination", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
{ OPT_VERSION, "--version", SO_NONE },
|
||||
{ OPT_VERSION, "-v", SO_NONE },
|
||||
{ OPT_BUILD_FLAGS, "--build_flags", SO_NONE },
|
||||
{ OPT_BUILD_FLAGS, "--build-flags", SO_NONE },
|
||||
{ OPT_QUIET, "-q", SO_NONE },
|
||||
{ OPT_QUIET, "--quiet", SO_NONE },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
{ OPT_TRACE_DIR, "--logdir", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_LOG_GROUP, "--loggroup", SO_REQ_SEP },
|
||||
{ OPT_CRASHONERROR, "--crash", SO_NONE },
|
||||
{ OPT_LOCALITY, "--locality_", SO_REQ_SEP },
|
||||
{ OPT_LOCALITY, "--locality-", SO_REQ_SEP },
|
||||
{ OPT_MEMLIMIT, "-m", SO_REQ_SEP },
|
||||
{ OPT_MEMLIMIT, "--memory", SO_REQ_SEP },
|
||||
{ OPT_HELP, "-?", SO_NONE },
|
||||
|
@ -752,7 +752,7 @@ CSimpleOpt::SOption g_rgDBStartOptions[] = {
|
|||
{ OPT_BACKUPKEYS, "--keys", SO_REQ_SEP },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
{ OPT_TRACE_DIR, "--logdir", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_LOG_GROUP, "--loggroup", SO_REQ_SEP },
|
||||
{ OPT_QUIET, "-q", SO_NONE },
|
||||
{ OPT_QUIET, "--quiet", SO_NONE },
|
||||
|
@ -763,7 +763,7 @@ CSimpleOpt::SOption g_rgDBStartOptions[] = {
|
|||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
#ifndef TLS_DISABLED
|
||||
TLS_OPTION_FLAGS
|
||||
#endif
|
||||
|
@ -784,7 +784,7 @@ CSimpleOpt::SOption g_rgDBStatusOptions[] = {
|
|||
{ OPT_TAGNAME, "--tagname", SO_REQ_SEP },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
{ OPT_TRACE_DIR, "--logdir", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_LOG_GROUP, "--loggroup", SO_REQ_SEP },
|
||||
{ OPT_QUIET, "-q", SO_NONE },
|
||||
{ OPT_QUIET, "--quiet", SO_NONE },
|
||||
|
@ -795,7 +795,7 @@ CSimpleOpt::SOption g_rgDBStatusOptions[] = {
|
|||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
#ifndef TLS_DISABLED
|
||||
TLS_OPTION_FLAGS
|
||||
#endif
|
||||
|
@ -814,7 +814,7 @@ CSimpleOpt::SOption g_rgDBSwitchOptions[] = {
|
|||
{ OPT_TAGNAME, "--tagname", SO_REQ_SEP },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
{ OPT_TRACE_DIR, "--logdir", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_LOG_GROUP, "--loggroup", SO_REQ_SEP },
|
||||
{ OPT_QUIET, "-q", SO_NONE },
|
||||
{ OPT_QUIET, "--quiet", SO_NONE },
|
||||
|
@ -826,7 +826,7 @@ CSimpleOpt::SOption g_rgDBSwitchOptions[] = {
|
|||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
#ifndef TLS_DISABLED
|
||||
TLS_OPTION_FLAGS
|
||||
#endif
|
||||
|
@ -847,7 +847,7 @@ CSimpleOpt::SOption g_rgDBAbortOptions[] = {
|
|||
{ OPT_TAGNAME, "--tagname", SO_REQ_SEP },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
{ OPT_TRACE_DIR, "--logdir", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_LOG_GROUP, "--loggroup", SO_REQ_SEP },
|
||||
{ OPT_QUIET, "-q", SO_NONE },
|
||||
{ OPT_QUIET, "--quiet", SO_NONE },
|
||||
|
@ -858,7 +858,7 @@ CSimpleOpt::SOption g_rgDBAbortOptions[] = {
|
|||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
#ifndef TLS_DISABLED
|
||||
TLS_OPTION_FLAGS
|
||||
#endif
|
||||
|
@ -875,7 +875,7 @@ CSimpleOpt::SOption g_rgDBPauseOptions[] = {
|
|||
{ OPT_DEST_CLUSTER, "--destination", SO_REQ_SEP },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
{ OPT_TRACE_DIR, "--logdir", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_TRACE_LOG_GROUP, "--loggroup", SO_REQ_SEP },
|
||||
{ OPT_QUIET, "-q", SO_NONE },
|
||||
{ OPT_QUIET, "--quiet", SO_NONE },
|
||||
|
@ -886,7 +886,7 @@ CSimpleOpt::SOption g_rgDBPauseOptions[] = {
|
|||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
#ifndef TLS_DISABLED
|
||||
TLS_OPTION_FLAGS
|
||||
#endif
|
||||
|
@ -958,7 +958,7 @@ static void printAgentUsage(bool devhelp) {
|
|||
printf(" --loggroup LOG_GROUP\n"
|
||||
" Sets the LogGroup field with the specified value for all\n"
|
||||
" events in the trace output (defaults to `default').\n");
|
||||
printf(" --trace_format FORMAT\n"
|
||||
printf(" --trace-format FORMAT\n"
|
||||
" Select the format of the trace files. xml (the default) and json are supported.\n"
|
||||
" Has no effect unless --log is specified.\n");
|
||||
printf(" -m SIZE, --memory SIZE\n"
|
||||
|
@ -967,7 +967,7 @@ static void printAgentUsage(bool devhelp) {
|
|||
#ifndef TLS_DISABLED
|
||||
printf(TLS_HELP);
|
||||
#endif
|
||||
printf(" --build_flags Print build information and exit.\n");
|
||||
printf(" --build-flags Print build information and exit.\n");
|
||||
printf(" -v, --version Print version information and exit.\n");
|
||||
printf(" -h, --help Display this help and exit.\n");
|
||||
|
||||
|
@ -1000,7 +1000,7 @@ static void printBackupUsage(bool devhelp) {
|
|||
"delete | describe | list | query | cleanup) [ACTION_OPTIONS]\n\n",
|
||||
exeBackup.toString().c_str());
|
||||
printf(" TOP LEVEL OPTIONS:\n");
|
||||
printf(" --build_flags Print build information and exit.\n");
|
||||
printf(" --build-flags Print build information and exit.\n");
|
||||
printf(" -v, --version Print version information and exit.\n");
|
||||
printf(" -h, --help Display this help and exit.\n");
|
||||
printf("\n");
|
||||
|
@ -1015,63 +1015,63 @@ static void printBackupUsage(bool devhelp) {
|
|||
" The Backup container URL for start, modify, describe, query, expire, and delete "
|
||||
"operations.\n");
|
||||
printBackupContainerInfo();
|
||||
printf(" -b, --base_url BASEURL\n"
|
||||
printf(" -b, --base-url BASEURL\n"
|
||||
" Base backup URL for list operations. This looks like a Backup URL but without a backup "
|
||||
"name.\n");
|
||||
printf(" --blob_credentials FILE\n"
|
||||
printf(" --blob-credentials FILE\n"
|
||||
" File containing blob credentials in JSON format. Can be specified multiple times for "
|
||||
"multiple files. See below for more details.\n");
|
||||
printf(" --expire_before_timestamp DATETIME\n"
|
||||
printf(" --expire-before-timestamp DATETIME\n"
|
||||
" Datetime cutoff for expire operations. Requires a cluster file and will use "
|
||||
"version/timestamp metadata\n"
|
||||
" in the database to obtain a cutoff version very close to the timestamp given in %s.\n",
|
||||
BackupAgentBase::timeFormat().c_str());
|
||||
printf(" --expire_before_version VERSION\n"
|
||||
printf(" --expire-before-version VERSION\n"
|
||||
" Version cutoff for expire operations. Deletes data files containing no data at or after "
|
||||
"VERSION.\n");
|
||||
printf(" --delete_before_days NUM_DAYS\n"
|
||||
printf(" --delete-before-days NUM_DAYS\n"
|
||||
" Another way to specify version cutoff for expire operations. Deletes data files "
|
||||
"containing no data at or after a\n"
|
||||
" version approximately NUM_DAYS days worth of versions prior to the latest log version in "
|
||||
"the backup.\n");
|
||||
printf(" -qrv --query_restore_version VERSION\n"
|
||||
printf(" -qrv --query-restore-version VERSION\n"
|
||||
" For query operations, set target version for restoring a backup. Set -1 for maximum\n"
|
||||
" restorable version (default) and -2 for minimum restorable version.\n");
|
||||
printf(
|
||||
" --query_restore_timestamp DATETIME\n"
|
||||
" --query-restore-timestamp DATETIME\n"
|
||||
" For query operations, instead of a numeric version, use this to specify a timestamp in %s\n",
|
||||
BackupAgentBase::timeFormat().c_str());
|
||||
printf(
|
||||
" and it will be converted to a version from that time using metadata in the cluster file.\n");
|
||||
printf(" --restorable_after_timestamp DATETIME\n"
|
||||
printf(" --restorable-after-timestamp DATETIME\n"
|
||||
" For expire operations, set minimum acceptable restorability to the version equivalent of "
|
||||
"DATETIME and later.\n");
|
||||
printf(" --restorable_after_version VERSION\n"
|
||||
printf(" --restorable-after-version VERSION\n"
|
||||
" For expire operations, set minimum acceptable restorability to the VERSION and later.\n");
|
||||
printf(" --min_restorable_days NUM_DAYS\n"
|
||||
printf(" --min-restorable-days NUM-DAYS\n"
|
||||
" For expire operations, set minimum acceptable restorability to approximately NUM_DAYS "
|
||||
"days worth of versions\n"
|
||||
" prior to the latest log version in the backup.\n");
|
||||
printf(" --version_timestamps\n");
|
||||
printf(" --version-timestamps\n");
|
||||
printf(" For describe operations, lookup versions in the database to obtain timestamps. A cluster "
|
||||
"file is required.\n");
|
||||
printf(
|
||||
" -f, --force For expire operations, force expiration even if minimum restorability would be violated.\n");
|
||||
printf(" -s, --snapshot_interval DURATION\n"
|
||||
printf(" -s, --snapshot-interval DURATION\n"
|
||||
" For start or modify operations, specifies the backup's default target snapshot interval "
|
||||
"as DURATION seconds. Defaults to %d for start operations.\n",
|
||||
CLIENT_KNOBS->BACKUP_DEFAULT_SNAPSHOT_INTERVAL_SEC);
|
||||
printf(" --active_snapshot_interval DURATION\n"
|
||||
printf(" --active-snapshot-interval DURATION\n"
|
||||
" For modify operations, sets the desired interval for the backup's currently active "
|
||||
"snapshot, relative to the start of the snapshot.\n");
|
||||
printf(" --verify_uid UID\n"
|
||||
printf(" --verify-uid UID\n"
|
||||
" Specifies a UID to verify against the BackupUID of the running backup. If provided, the "
|
||||
"UID is verified in the same transaction\n"
|
||||
" which sets the new backup parameters (if the UID matches).\n");
|
||||
printf(" -e ERRORLIMIT The maximum number of errors printed by status (default is 10).\n");
|
||||
printf(" -k KEYS List of key ranges to backup or to filter the backup in query operations.\n"
|
||||
" If not specified, the entire database will be backed up or no filter will be applied.\n");
|
||||
printf(" --partitioned_log_experimental Starts with new type of backup system using partitioned logs.\n");
|
||||
printf(" --partitioned-log-experimental Starts with new type of backup system using partitioned logs.\n");
|
||||
printf(" -n, --dryrun For backup start or restore start, performs a trial run with no actual changes made.\n");
|
||||
printf(" --log Enables trace file logging for the CLI session.\n"
|
||||
" --logdir PATH Specifes the output directory for trace files. If\n"
|
||||
|
@ -1080,19 +1080,19 @@ static void printBackupUsage(bool devhelp) {
|
|||
printf(" --loggroup LOG_GROUP\n"
|
||||
" Sets the LogGroup field with the specified value for all\n"
|
||||
" events in the trace output (defaults to `default').\n");
|
||||
printf(" --trace_format FORMAT\n"
|
||||
printf(" --trace-format FORMAT\n"
|
||||
" Select the format of the trace files. xml (the default) and json are supported.\n"
|
||||
" Has no effect unless --log is specified.\n");
|
||||
printf(" --max_cleanup_seconds SECONDS\n"
|
||||
printf(" --max-cleanup-seconds SECONDS\n"
|
||||
" Specifies the amount of time a backup or DR needs to be stale before cleanup will\n"
|
||||
" remove mutations for it. By default this is set to one hour.\n");
|
||||
printf(" --delete_data\n"
|
||||
printf(" --delete-data\n"
|
||||
" This flag will cause cleanup to remove mutations for the most stale backup or DR.\n");
|
||||
printf(" --incremental\n"
|
||||
" Performs incremental backup without the base backup.\n"
|
||||
" This option indicates to the backup agent that it will only need to record the log files, "
|
||||
"and ignore the range files.\n");
|
||||
printf(" --encryption_key_file"
|
||||
printf(" --encryption-key-file"
|
||||
" The AES-128-GCM key in the provided file is used for encrypting backup files.\n");
|
||||
#ifndef TLS_DISABLED
|
||||
printf(TLS_HELP);
|
||||
|
@ -1125,7 +1125,7 @@ static void printRestoreUsage(bool devhelp) {
|
|||
exeRestore.toString().c_str());
|
||||
|
||||
printf(" TOP LEVEL OPTIONS:\n");
|
||||
printf(" --build_flags Print build information and exit.\n");
|
||||
printf(" --build-flags Print build information and exit.\n");
|
||||
printf(" -v, --version Print version information and exit.\n");
|
||||
printf(" -h, --help Display this help and exit.\n");
|
||||
printf("\n");
|
||||
|
@ -1133,7 +1133,7 @@ static void printRestoreUsage(bool devhelp) {
|
|||
printf(" ACTION OPTIONS:\n");
|
||||
// printf(" FOLDERS Paths to folders containing the backup files.\n");
|
||||
printf(" Options for all commands:\n\n");
|
||||
printf(" --dest_cluster_file CONNFILE\n");
|
||||
printf(" --dest-cluster-file CONNFILE\n");
|
||||
printf(" The cluster file to restore data into.\n");
|
||||
printf(" -t, --tagname TAGNAME\n");
|
||||
printf(" The restore tag to act on. Default is 'default'\n");
|
||||
|
@ -1144,9 +1144,9 @@ static void printRestoreUsage(bool devhelp) {
|
|||
printf(" -w, --waitfordone\n");
|
||||
printf(" Wait for the restore to complete before exiting. Prints progress updates.\n");
|
||||
printf(" -k KEYS List of key ranges from the backup to restore.\n");
|
||||
printf(" --remove_prefix PREFIX\n");
|
||||
printf(" --remove-prefix PREFIX\n");
|
||||
printf(" Prefix to remove from the restored keys.\n");
|
||||
printf(" --add_prefix PREFIX\n");
|
||||
printf(" --add-prefix PREFIX\n");
|
||||
printf(" Prefix to add to the restored keys\n");
|
||||
printf(" -n, --dryrun Perform a trial run with no changes made.\n");
|
||||
printf(" --log Enables trace file logging for the CLI session.\n"
|
||||
|
@ -1156,18 +1156,18 @@ static void printRestoreUsage(bool devhelp) {
|
|||
printf(" --loggroup LOG_GROUP\n"
|
||||
" Sets the LogGroup field with the specified value for all\n"
|
||||
" events in the trace output (defaults to `default').\n");
|
||||
printf(" --trace_format FORMAT\n"
|
||||
printf(" --trace-format FORMAT\n"
|
||||
" Select the format of the trace files. xml (the default) and json are supported.\n"
|
||||
" Has no effect unless --log is specified.\n");
|
||||
printf(" --incremental\n"
|
||||
" Performs incremental restore without the base backup.\n"
|
||||
" This tells the backup agent to only replay the log files from the backup source.\n"
|
||||
" This also allows a restore to be performed into a non-empty destination database.\n");
|
||||
printf(" --begin_version\n"
|
||||
printf(" --begin-version\n"
|
||||
" To be used in conjunction with incremental restore.\n"
|
||||
" Indicates to the backup agent to only begin replaying log files from a certain version, "
|
||||
"instead of the entire set.\n");
|
||||
printf(" --encryption_key_file"
|
||||
printf(" --encryption-key-file"
|
||||
" The AES-128-GCM key in the provided file is used for decrypting backup files.\n");
|
||||
#ifndef TLS_DISABLED
|
||||
printf(TLS_HELP);
|
||||
|
@ -1177,7 +1177,7 @@ static void printRestoreUsage(bool devhelp) {
|
|||
BackupAgentBase::timeFormat().c_str());
|
||||
printf(
|
||||
" and it will be converted to a version from that time using metadata in orig_cluster_file.\n");
|
||||
printf(" --orig_cluster_file CONNFILE\n");
|
||||
printf(" --orig-cluster-file CONNFILE\n");
|
||||
printf(" The cluster file for the original database from which the backup was created. The "
|
||||
"original database\n");
|
||||
printf(" is only needed to convert a --timestamp argument to a database version.\n");
|
||||
|
@ -1222,7 +1222,7 @@ static void printDBAgentUsage(bool devhelp) {
|
|||
printf(" --loggroup LOG_GROUP\n"
|
||||
" Sets the LogGroup field with the specified value for all\n"
|
||||
" events in the trace output (defaults to `default').\n");
|
||||
printf(" --trace_format FORMAT\n"
|
||||
printf(" --trace-format FORMAT\n"
|
||||
" Select the format of the trace files. xml (the default) and json are supported.\n"
|
||||
" Has no effect unless --log is specified.\n");
|
||||
printf(" -m, --memory SIZE\n"
|
||||
|
@ -1231,7 +1231,7 @@ static void printDBAgentUsage(bool devhelp) {
|
|||
#ifndef TLS_DISABLED
|
||||
printf(TLS_HELP);
|
||||
#endif
|
||||
printf(" --build_flags Print build information and exit.\n");
|
||||
printf(" --build-flags Print build information and exit.\n");
|
||||
printf(" -v, --version Print version information and exit.\n");
|
||||
printf(" -h, --help Display this help and exit.\n");
|
||||
if (devhelp) {
|
||||
|
@ -1252,7 +1252,7 @@ static void printDBBackupUsage(bool devhelp) {
|
|||
exeDatabaseBackup.toString().c_str());
|
||||
|
||||
printf(" TOP LEVEL OPTIONS:\n");
|
||||
printf(" --build_flags Print build information and exit.\n");
|
||||
printf(" --build-flags Print build information and exit.\n");
|
||||
printf(" -v, --version Print version information and exit.\n");
|
||||
printf(" -h, --help Display this help and exit.\n");
|
||||
printf("\n");
|
||||
|
@ -1279,7 +1279,7 @@ static void printDBBackupUsage(bool devhelp) {
|
|||
printf(" --loggroup LOG_GROUP\n"
|
||||
" Sets the LogGroup field with the specified value for all\n"
|
||||
" events in the trace output (defaults to `default').\n");
|
||||
printf(" --trace_format FORMAT\n"
|
||||
printf(" --trace-format FORMAT\n"
|
||||
" Select the format of the trace files. xml (the default) and json are supported.\n"
|
||||
" Has no effect unless --log is specified.\n");
|
||||
printf(" -h, --help Display this help and exit.\n");
|
||||
|
@ -3137,10 +3137,10 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
switch (programExe) {
|
||||
case ProgramExe::AGENT:
|
||||
args = std::make_unique<CSimpleOpt>(argc, argv, g_rgAgentOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(argc, argv, g_rgAgentOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case ProgramExe::DR_AGENT:
|
||||
args = std::make_unique<CSimpleOpt>(argc, argv, g_rgDBAgentOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(argc, argv, g_rgDBAgentOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case ProgramExe::BACKUP:
|
||||
// Display backup help, if no arguments
|
||||
|
@ -3154,53 +3154,69 @@ int main(int argc, char* argv[]) {
|
|||
// Create the appropriate simple opt
|
||||
switch (backupType) {
|
||||
case BackupType::START:
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, &argv[1], g_rgBackupStartOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, &argv[1], g_rgBackupStartOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case BackupType::STATUS:
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, &argv[1], g_rgBackupStatusOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, &argv[1], g_rgBackupStatusOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case BackupType::ABORT:
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, &argv[1], g_rgBackupAbortOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, &argv[1], g_rgBackupAbortOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case BackupType::CLEANUP:
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, &argv[1], g_rgBackupCleanupOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, &argv[1], g_rgBackupCleanupOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case BackupType::WAIT:
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, &argv[1], g_rgBackupWaitOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, &argv[1], g_rgBackupWaitOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case BackupType::DISCONTINUE:
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, &argv[1], g_rgBackupDiscontinueOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, &argv[1], g_rgBackupDiscontinueOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case BackupType::PAUSE:
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, &argv[1], g_rgBackupPauseOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, &argv[1], g_rgBackupPauseOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case BackupType::RESUME:
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, &argv[1], g_rgBackupPauseOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, &argv[1], g_rgBackupPauseOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case BackupType::EXPIRE:
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, &argv[1], g_rgBackupExpireOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, &argv[1], g_rgBackupExpireOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case BackupType::DELETE_BACKUP:
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, &argv[1], g_rgBackupDeleteOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, &argv[1], g_rgBackupDeleteOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case BackupType::DESCRIBE:
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, &argv[1], g_rgBackupDescribeOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, &argv[1], g_rgBackupDescribeOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case BackupType::DUMP:
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, &argv[1], g_rgBackupDumpOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, &argv[1], g_rgBackupDumpOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case BackupType::LIST:
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, &argv[1], g_rgBackupListOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, &argv[1], g_rgBackupListOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case BackupType::QUERY:
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, &argv[1], g_rgBackupQueryOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, &argv[1], g_rgBackupQueryOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case BackupType::MODIFY:
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, &argv[1], g_rgBackupModifyOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, &argv[1], g_rgBackupModifyOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case BackupType::UNDEFINED:
|
||||
default:
|
||||
args = std::make_unique<CSimpleOpt>(argc, argv, g_rgOptions, SO_O_EXACT);
|
||||
args =
|
||||
std::make_unique<CSimpleOpt>(argc, argv, g_rgOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3217,26 +3233,33 @@ int main(int argc, char* argv[]) {
|
|||
// Create the appropriate simple opt
|
||||
switch (dbType) {
|
||||
case DBType::START:
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, &argv[1], g_rgDBStartOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, &argv[1], g_rgDBStartOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case DBType::STATUS:
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, &argv[1], g_rgDBStatusOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, &argv[1], g_rgDBStatusOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case DBType::SWITCH:
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, &argv[1], g_rgDBSwitchOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, &argv[1], g_rgDBSwitchOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case DBType::ABORT:
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, &argv[1], g_rgDBAbortOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, &argv[1], g_rgDBAbortOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case DBType::PAUSE:
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, &argv[1], g_rgDBPauseOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, &argv[1], g_rgDBPauseOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case DBType::RESUME:
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, &argv[1], g_rgDBPauseOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, &argv[1], g_rgDBPauseOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
case DBType::UNDEFINED:
|
||||
default:
|
||||
args = std::make_unique<CSimpleOpt>(argc, argv, g_rgOptions, SO_O_EXACT);
|
||||
args =
|
||||
std::make_unique<CSimpleOpt>(argc, argv, g_rgOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -3249,9 +3272,10 @@ int main(int argc, char* argv[]) {
|
|||
// Get the restore operation type
|
||||
restoreType = getRestoreType(argv[1]);
|
||||
if (restoreType == RestoreType::UNKNOWN) {
|
||||
args = std::make_unique<CSimpleOpt>(argc, argv, g_rgOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(argc, argv, g_rgOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
} else {
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, argv + 1, g_rgRestoreOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, argv + 1, g_rgRestoreOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
}
|
||||
break;
|
||||
case ProgramExe::FASTRESTORE_TOOL:
|
||||
|
@ -3262,9 +3286,10 @@ int main(int argc, char* argv[]) {
|
|||
// Get the restore operation type
|
||||
restoreType = getRestoreType(argv[1]);
|
||||
if (restoreType == RestoreType::UNKNOWN) {
|
||||
args = std::make_unique<CSimpleOpt>(argc, argv, g_rgOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(argc, argv, g_rgOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
} else {
|
||||
args = std::make_unique<CSimpleOpt>(argc - 1, argv + 1, g_rgRestoreOptions, SO_O_EXACT);
|
||||
args = std::make_unique<CSimpleOpt>(
|
||||
argc - 1, argv + 1, g_rgRestoreOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
}
|
||||
break;
|
||||
case ProgramExe::UNDEFINED:
|
||||
|
@ -3438,7 +3463,8 @@ int main(int argc, char* argv[]) {
|
|||
break;
|
||||
case OPT_LOCALITY: {
|
||||
std::string syn = args->OptionSyntax();
|
||||
if (!StringRef(syn).startsWith(LiteralStringRef("--locality_"))) {
|
||||
if (!StringRef(syn).startsWith(LiteralStringRef("--locality_")) &&
|
||||
!StringRef(syn).startsWith(LiteralStringRef("--locality-"))) {
|
||||
fprintf(stderr, "ERROR: unable to parse locality key '%s'\n", syn.c_str());
|
||||
return FDB_EXIT_ERROR;
|
||||
}
|
||||
|
@ -3505,7 +3531,8 @@ int main(int argc, char* argv[]) {
|
|||
break;
|
||||
case OPT_KNOB: {
|
||||
std::string syn = args->OptionSyntax();
|
||||
if (!StringRef(syn).startsWith(LiteralStringRef("--knob_"))) {
|
||||
if (!StringRef(syn).startsWith(LiteralStringRef("--knob_")) &&
|
||||
!!StringRef(syn).startsWith(LiteralStringRef("--knob-"))) {
|
||||
fprintf(stderr, "ERROR: unable to parse knob option '%s'\n", syn.c_str());
|
||||
return FDB_EXIT_ERROR;
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ enum {
|
|||
};
|
||||
|
||||
CSimpleOpt::SOption g_rgOptions[] = { { OPT_CONNFILE, "-C", SO_REQ_SEP },
|
||||
{ OPT_CONNFILE, "--cluster_file", SO_REQ_SEP },
|
||||
{ OPT_CONNFILE, "--cluster-file", SO_REQ_SEP },
|
||||
{ OPT_DATABASE, "-d", SO_REQ_SEP },
|
||||
{ OPT_TRACE, "--log", SO_NONE },
|
||||
{ OPT_TRACE_DIR, "--log-dir", SO_REQ_SEP },
|
||||
|
@ -112,9 +112,9 @@ CSimpleOpt::SOption g_rgOptions[] = { { OPT_CONNFILE, "-C", SO_REQ_SEP },
|
|||
{ OPT_STATUS_FROM_JSON, "--status-from-json", SO_REQ_SEP },
|
||||
{ OPT_VERSION, "--version", SO_NONE },
|
||||
{ OPT_VERSION, "-v", SO_NONE },
|
||||
{ OPT_BUILD_FLAGS, "--build_flags", SO_NONE },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_BUILD_FLAGS, "--build-flags", SO_NONE },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
{ OPT_DEBUG_TLS, "--debug-tls", SO_NONE },
|
||||
{ OPT_API_VERSION, "--api-version", SO_REQ_SEP },
|
||||
|
||||
|
@ -426,7 +426,7 @@ static void printProgramUsage(const char* name) {
|
|||
" --log-dir PATH Specifes the output directory for trace files. If\n"
|
||||
" unspecified, defaults to the current directory. Has\n"
|
||||
" no effect unless --log is specified.\n"
|
||||
" --trace_format FORMAT\n"
|
||||
" --trace-format FORMAT\n"
|
||||
" Select the format of the log files. xml (the default) and json\n"
|
||||
" are supported. Has no effect unless --log is specified.\n"
|
||||
" --exec CMDS Immediately executes the semicolon separated CLI commands\n"
|
||||
|
@ -438,11 +438,11 @@ static void printProgramUsage(const char* name) {
|
|||
#ifndef TLS_DISABLED
|
||||
TLS_HELP
|
||||
#endif
|
||||
" --knob_KNOBNAME KNOBVALUE\n"
|
||||
" --knob-KNOBNAME KNOBVALUE\n"
|
||||
" Changes a knob option. KNOBNAME should be lowercase.\n"
|
||||
" --debug-tls Prints the TLS configuration and certificate chain, then exits.\n"
|
||||
" Useful in reporting and diagnosing TLS issues.\n"
|
||||
" --build_flags Print build information and exit.\n"
|
||||
" --build-flags Print build information and exit.\n"
|
||||
" -v, --version Print FoundationDB CLI version information and exit.\n"
|
||||
" -h, --help Display this help and exit.\n");
|
||||
}
|
||||
|
@ -1389,7 +1389,7 @@ struct CLIOptions {
|
|||
commandLine += argv[a];
|
||||
}
|
||||
|
||||
CSimpleOpt args(argc, argv, g_rgOptions);
|
||||
CSimpleOpt args(argc, argv, g_rgOptions, SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
|
||||
while (args.Next()) {
|
||||
int ec = processArg(args);
|
||||
|
@ -1519,7 +1519,8 @@ struct CLIOptions {
|
|||
break;
|
||||
case OPT_KNOB: {
|
||||
std::string syn = args.OptionSyntax();
|
||||
if (!StringRef(syn).startsWith(LiteralStringRef("--knob_"))) {
|
||||
if (!StringRef(syn).startsWith(LiteralStringRef("--knob_")) &&
|
||||
!!StringRef(syn).startsWith(LiteralStringRef("--knob-"))) {
|
||||
fprintf(stderr, "ERROR: unable to parse knob option '%s'\n", syn.c_str());
|
||||
return FDB_EXIT_ERROR;
|
||||
}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
{
|
||||
"version": "6.3.15",
|
||||
"arguments": [
|
||||
{"value": "--cluster_file"},
|
||||
{"value": "--cluster-file"},
|
||||
{"value": ".testdata/fdb.cluster"},
|
||||
{"value": "--public_address"},
|
||||
{"value": "--public-address"},
|
||||
{"type": "Concatenate", "values": [
|
||||
{"type": "Environment", "source": "FDB_PUBLIC_IP"},
|
||||
{"value": ":"},
|
||||
{"type": "ProcessNumber", "offset": 4499, "multiplier": 2}
|
||||
]},
|
||||
{"value": "--listen_address"},
|
||||
{"value": "--listen-address"},
|
||||
{"type": "Concatenate", "values": [
|
||||
{"type": "Environment", "source": "FDB_POD_IP"},
|
||||
{"value": ":"},
|
||||
|
@ -22,11 +22,11 @@
|
|||
]},
|
||||
{"value": "--class"},
|
||||
{"value": "storage"},
|
||||
{"value": "--locality_zoneid"},
|
||||
{"value": "--locality-zoneid"},
|
||||
{"type": "Environment", "source": "FDB_ZONE_ID"},
|
||||
{"value": "--locality_instance-id"},
|
||||
{"value": "--locality-instance-id"},
|
||||
{"type": "Environment", "source": "FDB_INSTANCE_ID"},
|
||||
{"value": "--locality_process-id"},
|
||||
{"value": "--locality-process-id"},
|
||||
{"type": "Concatenate", "values": [
|
||||
{"type": "Environment", "source": "FDB_INSTANCE_ID"},
|
||||
{"value": "-"},
|
||||
|
|
|
@ -60,11 +60,11 @@ func TestGeneratingArgumentsForDefaultConfig(t *testing.T) {
|
|||
}
|
||||
|
||||
expectedArguments := []string{
|
||||
"--cluster_file", ".testdata/fdb.cluster",
|
||||
"--public_address", "10.0.0.1:4501", "--listen_address", "192.168.0.1:4501",
|
||||
"--cluster-file", ".testdata/fdb.cluster",
|
||||
"--public-address", "10.0.0.1:4501", "--listen-address", "192.168.0.1:4501",
|
||||
"--datadir", ".testdata/data/1", "--class", "storage",
|
||||
"--locality_zoneid", "zone1", "--locality_instance-id", "storage-1",
|
||||
"--locality_process-id", "storage-1-1",
|
||||
"--locality-zoneid", "zone1", "--locality-instance-id", "storage-1",
|
||||
"--locality-process-id", "storage-1-1",
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(arguments, expectedArguments) {
|
||||
|
@ -87,11 +87,11 @@ func TestGeneratingArgumentsForDefaultConfig(t *testing.T) {
|
|||
|
||||
expectedArguments = []string{
|
||||
"/usr/bin/fdbserver",
|
||||
"--cluster_file", ".testdata/fdb.cluster",
|
||||
"--public_address", "10.0.0.1:4501", "--listen_address", "192.168.0.1:4501",
|
||||
"--cluster-file", ".testdata/fdb.cluster",
|
||||
"--public-address", "10.0.0.1:4501", "--listen-address", "192.168.0.1:4501",
|
||||
"--datadir", ".testdata/data/1", "--class", "storage",
|
||||
"--locality_zoneid", "zone1", "--locality_instance-id", "storage-1",
|
||||
"--locality_process-id", "storage-1-1",
|
||||
"--locality-zoneid", "zone1", "--locality-instance-id", "storage-1",
|
||||
"--locality-process-id", "storage-1-1",
|
||||
}
|
||||
|
||||
if !reflect.DeepEqual(arguments, expectedArguments) {
|
||||
|
|
|
@ -197,17 +197,46 @@ const char* get_value_multi(const CSimpleIni& ini, const char* key, ...) {
|
|||
const char* ret = nullptr;
|
||||
const char* section = nullptr;
|
||||
|
||||
std::string keyWithUnderscores(key);
|
||||
for (int i = keyWithUnderscores.size() - 1; i >= 0; --i) {
|
||||
if (keyWithUnderscores[i] == '-') {
|
||||
keyWithUnderscores.at(i) = '_';
|
||||
}
|
||||
}
|
||||
|
||||
va_list ap;
|
||||
va_start(ap, key);
|
||||
|
||||
while (!ret && (section = va_arg(ap, const char*)))
|
||||
while (!ret && (section = va_arg(ap, const char*))) {
|
||||
ret = ini.GetValue(section, key, nullptr);
|
||||
|
||||
if (!ret) {
|
||||
ret = ini.GetValue(section, keyWithUnderscores.c_str(), nullptr);
|
||||
}
|
||||
}
|
||||
va_end(ap);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool isParameterNameEqual(const char* str, const char* target) {
|
||||
if (!str || !target) {
|
||||
return false;
|
||||
}
|
||||
while (*str && *target) {
|
||||
char curStr = *str, curTarget = *target;
|
||||
if (curStr == '-') {
|
||||
curStr = '_';
|
||||
}
|
||||
if (curTarget == '-') {
|
||||
curTarget = '_';
|
||||
}
|
||||
if (curStr != curTarget) {
|
||||
return false;
|
||||
}
|
||||
str++;
|
||||
target++;
|
||||
}
|
||||
return !(*str || *target);
|
||||
}
|
||||
|
||||
double timer() {
|
||||
#if defined(__linux__) || defined(__FreeBSD__)
|
||||
struct timespec ts;
|
||||
|
@ -426,7 +455,7 @@ public:
|
|||
|
||||
char* endptr;
|
||||
const char* rd =
|
||||
get_value_multi(ini, "restart_delay", ssection.c_str(), section.c_str(), "general", "fdbmonitor", nullptr);
|
||||
get_value_multi(ini, "restart-delay", ssection.c_str(), section.c_str(), "general", "fdbmonitor", nullptr);
|
||||
if (!rd) {
|
||||
log_msg(SevError, "Unable to resolve restart delay for %s\n", ssection.c_str());
|
||||
return;
|
||||
|
@ -439,7 +468,7 @@ public:
|
|||
}
|
||||
|
||||
const char* mrd = get_value_multi(
|
||||
ini, "initial_restart_delay", ssection.c_str(), section.c_str(), "general", "fdbmonitor", nullptr);
|
||||
ini, "initial-restart-delay", ssection.c_str(), section.c_str(), "general", "fdbmonitor", nullptr);
|
||||
if (!mrd) {
|
||||
initial_restart_delay = 0;
|
||||
} else {
|
||||
|
@ -453,7 +482,7 @@ public:
|
|||
current_restart_delay = initial_restart_delay;
|
||||
|
||||
const char* rbo = get_value_multi(
|
||||
ini, "restart_backoff", ssection.c_str(), section.c_str(), "general", "fdbmonitor", nullptr);
|
||||
ini, "restart-backoff", ssection.c_str(), section.c_str(), "general", "fdbmonitor", nullptr);
|
||||
if (!rbo) {
|
||||
restart_backoff = max_restart_delay;
|
||||
} else {
|
||||
|
@ -469,7 +498,7 @@ public:
|
|||
}
|
||||
|
||||
const char* rdri = get_value_multi(
|
||||
ini, "restart_delay_reset_interval", ssection.c_str(), section.c_str(), "general", "fdbmonitor", nullptr);
|
||||
ini, "restart-delay-reset-interval", ssection.c_str(), section.c_str(), "general", "fdbmonitor", nullptr);
|
||||
if (!rdri) {
|
||||
restart_delay_reset_interval = max_restart_delay;
|
||||
} else {
|
||||
|
@ -481,16 +510,16 @@ public:
|
|||
}
|
||||
|
||||
const char* q =
|
||||
get_value_multi(ini, "disable_lifecycle_logging", ssection.c_str(), section.c_str(), "general", nullptr);
|
||||
get_value_multi(ini, "disable-lifecycle-logging", ssection.c_str(), section.c_str(), "general", nullptr);
|
||||
if (q && !strcmp(q, "true"))
|
||||
quiet = true;
|
||||
|
||||
const char* del_env =
|
||||
get_value_multi(ini, "delete_envvars", ssection.c_str(), section.c_str(), "general", nullptr);
|
||||
get_value_multi(ini, "delete-envvars", ssection.c_str(), section.c_str(), "general", nullptr);
|
||||
delete_envvars = del_env;
|
||||
|
||||
const char* kocc =
|
||||
get_value_multi(ini, "kill_on_configuration_change", ssection.c_str(), section.c_str(), "general", nullptr);
|
||||
get_value_multi(ini, "kill-on-configuration-change", ssection.c_str(), section.c_str(), "general", nullptr);
|
||||
if (kocc && strcmp(kocc, "true")) {
|
||||
kill_on_configuration_change = false;
|
||||
}
|
||||
|
@ -508,10 +537,13 @@ public:
|
|||
const char* id_s = ssection.c_str() + strlen(section.c_str()) + 1;
|
||||
|
||||
for (auto i : keys) {
|
||||
if (!strcmp(i.pItem, "command") || !strcmp(i.pItem, "restart_delay") ||
|
||||
!strcmp(i.pItem, "initial_restart_delay") || !strcmp(i.pItem, "restart_backoff") ||
|
||||
!strcmp(i.pItem, "restart_delay_reset_interval") || !strcmp(i.pItem, "disable_lifecycle_logging") ||
|
||||
!strcmp(i.pItem, "delete_envvars") || !strcmp(i.pItem, "kill_on_configuration_change")) {
|
||||
if (isParameterNameEqual(i.pItem, "command") || isParameterNameEqual(i.pItem, "restart-delay") ||
|
||||
isParameterNameEqual(i.pItem, "initial-restart-delay") ||
|
||||
isParameterNameEqual(i.pItem, "restart-backoff") ||
|
||||
isParameterNameEqual(i.pItem, "restart-delay-reset-interval") ||
|
||||
isParameterNameEqual(i.pItem, "disable-lifecycle-logging") ||
|
||||
isParameterNameEqual(i.pItem, "delete-envvars") ||
|
||||
isParameterNameEqual(i.pItem, "kill-on-configuration-change")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -523,7 +555,7 @@ public:
|
|||
opt.replace(pos, 3, id_s, strlen(id_s));
|
||||
|
||||
const char* flagName = i.pItem + 5;
|
||||
if (strncmp("flag_", i.pItem, 5) == 0 && strlen(flagName) > 0) {
|
||||
if ((strncmp("flag_", i.pItem, 5) == 0 || strncmp("flag-", i.pItem, 5) == 0) && strlen(flagName) > 0) {
|
||||
if (opt == "true")
|
||||
commands.push_back(std::string("--") + flagName);
|
||||
else if (opt != "false") {
|
||||
|
@ -1227,7 +1259,7 @@ int main(int argc, char** argv) {
|
|||
|
||||
std::vector<const char*> additional_watch_paths;
|
||||
|
||||
CSimpleOpt args(argc, argv, g_rgOptions, SO_O_NOERR);
|
||||
CSimpleOpt args(argc, argv, g_rgOptions, SO_O_NOERR | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
|
||||
while (args.Next()) {
|
||||
if (args.LastError() == SO_SUCCESS) {
|
||||
|
|
|
@ -104,17 +104,17 @@ enum {
|
|||
|
||||
CSimpleOpt::SOption g_rgOptions[] = {
|
||||
{ OPT_CONNFILE, "-C", SO_REQ_SEP },
|
||||
{ OPT_CONNFILE, "--cluster_file", SO_REQ_SEP },
|
||||
{ OPT_SEEDCONNFILE, "--seed_cluster_file", SO_REQ_SEP },
|
||||
{ OPT_SEEDCONNSTRING, "--seed_connection_string", SO_REQ_SEP },
|
||||
{ OPT_CONNFILE, "--cluster-file", SO_REQ_SEP },
|
||||
{ OPT_SEEDCONNFILE, "--seed-cluster-file", SO_REQ_SEP },
|
||||
{ OPT_SEEDCONNSTRING, "--seed-connection-string", SO_REQ_SEP },
|
||||
{ OPT_ROLE, "-r", SO_REQ_SEP },
|
||||
{ OPT_ROLE, "--role", SO_REQ_SEP },
|
||||
{ OPT_PUBLICADDR, "-p", SO_REQ_SEP },
|
||||
{ OPT_PUBLICADDR, "--public_address", SO_REQ_SEP },
|
||||
{ OPT_PUBLICADDR, "--public-address", SO_REQ_SEP },
|
||||
{ OPT_LISTEN, "-l", SO_REQ_SEP },
|
||||
{ OPT_LISTEN, "--listen_address", SO_REQ_SEP },
|
||||
{ OPT_LISTEN, "--listen-address", SO_REQ_SEP },
|
||||
#ifdef __linux__
|
||||
{ OPT_FILESYSTEM, "--data_filesystem", SO_REQ_SEP },
|
||||
{ OPT_FILESYSTEM, "--data-filesystem", SO_REQ_SEP },
|
||||
{ OPT_PROFILER_RSS_SIZE, "--rsssize", SO_REQ_SEP },
|
||||
#endif
|
||||
{ OPT_DATAFOLDER, "-d", SO_REQ_SEP },
|
||||
|
@ -132,7 +132,7 @@ CSimpleOpt::SOption g_rgOptions[] = {
|
|||
{ OPT_NEWCONSOLE, "-n", SO_NONE },
|
||||
{ OPT_NEWCONSOLE, "--newconsole", SO_NONE },
|
||||
{ OPT_NOBOX, "-q", SO_NONE },
|
||||
{ OPT_NOBOX, "--no_dialog", SO_NONE },
|
||||
{ OPT_NOBOX, "--no-dialog", SO_NONE },
|
||||
#endif
|
||||
{ OPT_KVFILE, "--kvfile", SO_REQ_SEP },
|
||||
{ OPT_TESTFILE, "-f", SO_REQ_SEP },
|
||||
|
@ -146,48 +146,48 @@ CSimpleOpt::SOption g_rgOptions[] = {
|
|||
{ OPT_MEMLIMIT, "-m", SO_REQ_SEP },
|
||||
{ OPT_MEMLIMIT, "--memory", SO_REQ_SEP },
|
||||
{ OPT_STORAGEMEMLIMIT, "-M", SO_REQ_SEP },
|
||||
{ OPT_STORAGEMEMLIMIT, "--storage_memory", SO_REQ_SEP },
|
||||
{ OPT_CACHEMEMLIMIT, "--cache_memory", SO_REQ_SEP },
|
||||
{ OPT_STORAGEMEMLIMIT, "--storage-memory", SO_REQ_SEP },
|
||||
{ OPT_CACHEMEMLIMIT, "--cache-memory", SO_REQ_SEP },
|
||||
{ OPT_MACHINEID, "-i", SO_REQ_SEP },
|
||||
{ OPT_MACHINEID, "--machine_id", SO_REQ_SEP },
|
||||
{ OPT_MACHINEID, "--machine-id", SO_REQ_SEP },
|
||||
{ OPT_DCID, "-a", SO_REQ_SEP },
|
||||
{ OPT_DCID, "--datacenter_id", SO_REQ_SEP },
|
||||
{ OPT_DCID, "--datacenter-id", SO_REQ_SEP },
|
||||
{ OPT_MACHINE_CLASS, "-c", SO_REQ_SEP },
|
||||
{ OPT_MACHINE_CLASS, "--class", SO_REQ_SEP },
|
||||
{ OPT_BUGGIFY, "-b", SO_REQ_SEP },
|
||||
{ OPT_BUGGIFY, "--buggify", SO_REQ_SEP },
|
||||
{ OPT_VERSION, "-v", SO_NONE },
|
||||
{ OPT_VERSION, "--version", SO_NONE },
|
||||
{ OPT_BUILD_FLAGS, "--build_flags", SO_NONE },
|
||||
{ OPT_BUILD_FLAGS, "--build-flags", SO_NONE },
|
||||
{ OPT_CRASHONERROR, "--crash", SO_NONE },
|
||||
{ OPT_NETWORKIMPL, "-N", SO_REQ_SEP },
|
||||
{ OPT_NETWORKIMPL, "--network", SO_REQ_SEP },
|
||||
{ OPT_NOBUFSTDOUT, "--unbufferedout", SO_NONE },
|
||||
{ OPT_BUFSTDOUTERR, "--bufferedout", SO_NONE },
|
||||
{ OPT_TRACECLOCK, "--traceclock", SO_REQ_SEP },
|
||||
{ OPT_NUMTESTERS, "--num_testers", SO_REQ_SEP },
|
||||
{ OPT_NUMTESTERS, "--num-testers", SO_REQ_SEP },
|
||||
{ OPT_HELP, "-?", SO_NONE },
|
||||
{ OPT_HELP, "-h", SO_NONE },
|
||||
{ OPT_HELP, "--help", SO_NONE },
|
||||
{ OPT_DEVHELP, "--dev-help", SO_NONE },
|
||||
{ OPT_KNOB, "--knob_", SO_REQ_SEP },
|
||||
{ OPT_UNITTESTPARAM, "--test_", SO_REQ_SEP },
|
||||
{ OPT_LOCALITY, "--locality_", SO_REQ_SEP },
|
||||
{ OPT_KNOB, "--knob-", SO_REQ_SEP },
|
||||
{ OPT_UNITTESTPARAM, "--test-", SO_REQ_SEP },
|
||||
{ OPT_LOCALITY, "--locality-", SO_REQ_SEP },
|
||||
{ OPT_TESTSERVERS, "--testservers", SO_REQ_SEP },
|
||||
{ OPT_TEST_ON_SERVERS, "--testonservers", SO_NONE },
|
||||
{ OPT_METRICSCONNFILE, "--metrics_cluster", SO_REQ_SEP },
|
||||
{ OPT_METRICSPREFIX, "--metrics_prefix", SO_REQ_SEP },
|
||||
{ OPT_IO_TRUST_SECONDS, "--io_trust_seconds", SO_REQ_SEP },
|
||||
{ OPT_IO_TRUST_WARN_ONLY, "--io_trust_warn_only", SO_NONE },
|
||||
{ OPT_TRACE_FORMAT, "--trace_format", SO_REQ_SEP },
|
||||
{ OPT_WHITELIST_BINPATH, "--whitelist_binpath", SO_REQ_SEP },
|
||||
{ OPT_BLOB_CREDENTIAL_FILE, "--blob_credential_file", SO_REQ_SEP },
|
||||
{ OPT_CONFIG_PATH, "--config_path", SO_REQ_SEP },
|
||||
{ OPT_USE_TEST_CONFIG_DB, "--use_test_config_db", SO_NONE },
|
||||
{ OPT_METRICSCONNFILE, "--metrics-cluster", SO_REQ_SEP },
|
||||
{ OPT_METRICSPREFIX, "--metrics-prefix", SO_REQ_SEP },
|
||||
{ OPT_IO_TRUST_SECONDS, "--io-trust-seconds", SO_REQ_SEP },
|
||||
{ OPT_IO_TRUST_WARN_ONLY, "--io-trust-warn-only", SO_NONE },
|
||||
{ OPT_TRACE_FORMAT, "--trace-format", SO_REQ_SEP },
|
||||
{ OPT_WHITELIST_BINPATH, "--whitelist-binpath", SO_REQ_SEP },
|
||||
{ OPT_BLOB_CREDENTIAL_FILE, "--blob-credential-file", SO_REQ_SEP },
|
||||
{ OPT_CONFIG_PATH, "--config-path", SO_REQ_SEP },
|
||||
{ OPT_USE_TEST_CONFIG_DB, "--use-test-config-db", SO_NONE },
|
||||
{ OPT_FAULT_INJECTION, "-fi", SO_REQ_SEP },
|
||||
{ OPT_FAULT_INJECTION, "--fault_injection", SO_REQ_SEP },
|
||||
{ OPT_PROFILER, "--profiler_", SO_REQ_SEP},
|
||||
{ OPT_PRINT_SIMTIME, "--print_sim_time", SO_NONE },
|
||||
{ OPT_FAULT_INJECTION, "--fault-injection", SO_REQ_SEP },
|
||||
{ OPT_PROFILER, "--profiler-", SO_REQ_SEP},
|
||||
{ OPT_PRINT_SIMTIME, "--print-sim-time", SO_NONE },
|
||||
|
||||
#ifndef TLS_DISABLED
|
||||
TLS_OPTION_FLAGS
|
||||
|
@ -559,29 +559,29 @@ static void printOptionUsage(std::string option, std::string description) {
|
|||
static void printUsage(const char* name, bool devhelp) {
|
||||
printf("FoundationDB " FDB_VT_PACKAGE_NAME " (v" FDB_VT_VERSION ")\n");
|
||||
printf("Usage: %s -p ADDRESS [OPTIONS]\n\n", name);
|
||||
printOptionUsage("-p ADDRESS, --public_address ADDRESS",
|
||||
printOptionUsage("-p ADDRESS, --public-address ADDRESS",
|
||||
" Public address, specified as `IP_ADDRESS:PORT' or `auto:PORT'.");
|
||||
printOptionUsage("-l ADDRESS, --listen_address ADDRESS",
|
||||
printOptionUsage("-l ADDRESS, --listen-address ADDRESS",
|
||||
" Listen address, specified as `IP_ADDRESS:PORT' (defaults to"
|
||||
" public address).");
|
||||
printOptionUsage("-C CONNFILE, --cluster_file CONNFILE",
|
||||
printOptionUsage("-C CONNFILE, --cluster-file CONNFILE",
|
||||
" The path of a file containing the connection string for the"
|
||||
" FoundationDB cluster. The default is first the value of the"
|
||||
" FDB_CLUSTER_FILE environment variable, then `./fdb.cluster',"
|
||||
" then `" +
|
||||
platform::getDefaultClusterFilePath() + "'.");
|
||||
printOptionUsage("--seed_cluster_file SEEDCONNFILE",
|
||||
printOptionUsage("--seed-cluster-file SEEDCONNFILE",
|
||||
" The path of a seed cluster file which will be used to connect"
|
||||
" if the -C cluster file does not exist. If the server connects"
|
||||
" successfully using the seed file, then it copies the file to"
|
||||
" the -C file location.");
|
||||
printOptionUsage("--seed_connection_string SEEDCONNSTRING",
|
||||
printOptionUsage("--seed-connection-string SEEDCONNSTRING",
|
||||
" The path of a seed connection string which will be used to connect"
|
||||
" if the -C cluster file does not exist. If the server connects"
|
||||
" successfully using the seed string, then it copies the string to"
|
||||
" the -C file location.");
|
||||
#ifdef __linux__
|
||||
printOptionUsage("--data_filesystem PATH",
|
||||
printOptionUsage("--data-filesystem PATH",
|
||||
" Turns on validation that all data files are written to a drive"
|
||||
" mounted at the specified PATH. This checks that the device at PATH"
|
||||
" is currently mounted and that any data files get written to the"
|
||||
|
@ -601,28 +601,28 @@ static void printUsage(const char* name, bool devhelp) {
|
|||
printOptionUsage("--loggroup LOG_GROUP",
|
||||
" Sets the LogGroup field with the specified value for all"
|
||||
" events in the trace output (defaults to `default').");
|
||||
printOptionUsage("--trace_format FORMAT",
|
||||
printOptionUsage("--trace-format FORMAT",
|
||||
" Select the format of the log files. xml (the default) and json"
|
||||
" are supported.");
|
||||
printOptionUsage("--tracer TRACER",
|
||||
" Select a tracer for transaction tracing. Currently disabled"
|
||||
" (the default) and log_file are supported.");
|
||||
printOptionUsage("-i ID, --machine_id ID",
|
||||
printOptionUsage("-i ID, --machine-id ID",
|
||||
" Machine and zone identifier key (up to 16 hex characters)."
|
||||
" Defaults to a random value shared by all fdbserver processes"
|
||||
" on this machine.");
|
||||
printOptionUsage("-a ID, --datacenter_id ID", " Data center identifier key (up to 16 hex characters).");
|
||||
printOptionUsage("--locality_LOCALITYKEY LOCALITYVALUE",
|
||||
printOptionUsage("-a ID, --datacenter-id ID", " Data center identifier key (up to 16 hex characters).");
|
||||
printOptionUsage("--locality-LOCALITYKEY LOCALITYVALUE",
|
||||
" Define a locality key. LOCALITYKEY is case-insensitive though"
|
||||
" LOCALITYVALUE is not.");
|
||||
printOptionUsage("-m SIZE, --memory SIZE",
|
||||
" Memory limit. The default value is 8GiB. When specified"
|
||||
" without a unit, MiB is assumed.");
|
||||
printOptionUsage("-M SIZE, --storage_memory SIZE",
|
||||
printOptionUsage("-M SIZE, --storage-memory SIZE",
|
||||
" Maximum amount of memory used for storage. The default"
|
||||
" value is 1GiB. When specified without a unit, MB is"
|
||||
" assumed.");
|
||||
printOptionUsage("--cache_memory SIZE",
|
||||
printOptionUsage("--cache-memory SIZE",
|
||||
" The amount of memory to use for caching disk pages."
|
||||
" The default value is 2GiB. When specified without a unit,"
|
||||
" MiB is assumed.");
|
||||
|
@ -630,7 +630,7 @@ static void printUsage(const char* name, bool devhelp) {
|
|||
" Machine class (valid options are storage, transaction,"
|
||||
" resolution, grv_proxy, commit_proxy, master, test, unset, stateless, log, router,"
|
||||
" and cluster_controller).");
|
||||
printOptionUsage("--profiler_",
|
||||
printOptionUsage("--profiler-",
|
||||
"Set an actor profiler option. Supported options are:\n"
|
||||
" collector -- None or FluentD (FluentD requires collector_endpoint to be set)\n"
|
||||
" collector_endpoint -- IP:PORT of the fluentd server\n"
|
||||
|
@ -641,7 +641,7 @@ static void printUsage(const char* name, bool devhelp) {
|
|||
printOptionUsage("-v, --version", "Print version information and exit.");
|
||||
printOptionUsage("-h, -?, --help", "Display this help and exit.");
|
||||
if (devhelp) {
|
||||
printf(" --build_flags Print build information and exit.\n");
|
||||
printf(" --build-flags Print build information and exit.\n");
|
||||
printOptionUsage(
|
||||
"-r ROLE, --role ROLE",
|
||||
" Server role (valid options are fdbd, test, multitest,"
|
||||
|
@ -662,7 +662,7 @@ static void printUsage(const char* name, bool devhelp) {
|
|||
"--kvfile FILE",
|
||||
"Input file (SQLite database file) for use by the 'kvfilegeneratesums' and 'kvfileintegritycheck' roles.");
|
||||
printOptionUsage("-b [on,off], --buggify [on,off]", " Sets Buggify system state, defaults to `off'.");
|
||||
printOptionUsage("-fi [on,off], --fault_injection [on,off]", " Sets fault injection, defaults to `on'.");
|
||||
printOptionUsage("-fi [on,off], --fault-injection [on,off]", " Sets fault injection, defaults to `on'.");
|
||||
printOptionUsage("--crash", "Crash on serious errors instead of continuing.");
|
||||
printOptionUsage("-N NETWORKIMPL, --network NETWORKIMPL",
|
||||
" Select network implementation, `net2' (default),"
|
||||
|
@ -672,10 +672,10 @@ static void printUsage(const char* name, bool devhelp) {
|
|||
printOptionUsage("--traceclock CLOCKIMPL",
|
||||
" Select clock source for trace files, `now' (default) or"
|
||||
" `realtime'.");
|
||||
printOptionUsage("--num_testers NUM",
|
||||
printOptionUsage("--num-testers NUM",
|
||||
" A multitester will wait for NUM testers before starting"
|
||||
" (defaults to 1).");
|
||||
printOptionUsage("--test_PARAMNAME PARAMVALUE",
|
||||
printOptionUsage("--test-PARAMNAME PARAMVALUE",
|
||||
" Set a UnitTest named parameter to the given value. Names are case sensitive.");
|
||||
#ifdef __linux__
|
||||
printOptionUsage("--rsssize SIZE",
|
||||
|
@ -687,20 +687,20 @@ static void printUsage(const char* name, bool devhelp) {
|
|||
" The addresses of networktestservers"
|
||||
" specified as ADDRESS:PORT,ADDRESS:PORT...");
|
||||
printOptionUsage("--testonservers", " Testers are recruited on servers.");
|
||||
printOptionUsage("--metrics_cluster CONNFILE",
|
||||
printOptionUsage("--metrics-cluster CONNFILE",
|
||||
" The cluster file designating where this process will"
|
||||
" store its metric data. By default metrics will be stored"
|
||||
" in the same database the process is participating in.");
|
||||
printOptionUsage("--metrics_prefix PREFIX",
|
||||
printOptionUsage("--metrics-prefix PREFIX",
|
||||
" The prefix where this process will store its metric data."
|
||||
" Must be specified if using a different database for metrics.");
|
||||
printOptionUsage("--knob_KNOBNAME KNOBVALUE", " Changes a database knob. KNOBNAME should be lowercase.");
|
||||
printOptionUsage("--io_trust_seconds SECONDS",
|
||||
printOptionUsage("--knob-KNOBNAME KNOBVALUE", " Changes a database knob. KNOBNAME should be lowercase.");
|
||||
printOptionUsage("--io-trust-seconds SECONDS",
|
||||
" Sets the time in seconds that a read or write operation is allowed to take"
|
||||
" before timing out with an error. If an operation times out, all future"
|
||||
" operations on that file will fail with an error as well. Only has an effect"
|
||||
" when using AsyncFileKAIO in Linux.");
|
||||
printOptionUsage("--io_trust_warn_only",
|
||||
printOptionUsage("--io-trust-warn-only",
|
||||
" Instead of failing when an I/O operation exceeds io_trust_seconds, just"
|
||||
" log a warning to the trace log. Has no effect if io_trust_seconds is unspecified.");
|
||||
} else {
|
||||
|
@ -1023,7 +1023,7 @@ private:
|
|||
commandLine += argv[a];
|
||||
}
|
||||
|
||||
CSimpleOpt args(argc, argv, g_rgOptions, SO_O_EXACT);
|
||||
CSimpleOpt args(argc, argv, g_rgOptions, SO_O_EXACT | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
|
||||
if (argc == 1) {
|
||||
printUsage(argv[0], false);
|
||||
|
@ -1072,7 +1072,8 @@ private:
|
|||
break;
|
||||
case OPT_KNOB: {
|
||||
std::string syn = args.OptionSyntax();
|
||||
if (!StringRef(syn).startsWith(LiteralStringRef("--knob_"))) {
|
||||
if (!StringRef(syn).startsWith(LiteralStringRef("--knob_")) &&
|
||||
!StringRef(syn).startsWith(LiteralStringRef("--knob-"))) {
|
||||
fprintf(stderr, "ERROR: unable to parse knob option '%s'\n", syn.c_str());
|
||||
flushAndExit(FDB_EXIT_ERROR);
|
||||
}
|
||||
|
@ -1095,7 +1096,8 @@ private:
|
|||
};
|
||||
case OPT_UNITTESTPARAM: {
|
||||
std::string syn = args.OptionSyntax();
|
||||
if (!StringRef(syn).startsWith(LiteralStringRef("--test_"))) {
|
||||
if (!StringRef(syn).startsWith(LiteralStringRef("--test_")) &&
|
||||
!StringRef(syn).startsWith(LiteralStringRef("--test-"))) {
|
||||
fprintf(stderr, "ERROR: unable to parse knob option '%s'\n", syn.c_str());
|
||||
flushAndExit(FDB_EXIT_ERROR);
|
||||
}
|
||||
|
@ -1104,7 +1106,8 @@ private:
|
|||
}
|
||||
case OPT_LOCALITY: {
|
||||
std::string syn = args.OptionSyntax();
|
||||
if (!StringRef(syn).startsWith(LiteralStringRef("--locality_"))) {
|
||||
if (!StringRef(syn).startsWith(LiteralStringRef("--locality_")) &&
|
||||
!StringRef(syn).startsWith(LiteralStringRef("--locality-"))) {
|
||||
fprintf(stderr, "ERROR: unable to parse locality key '%s'\n", syn.c_str());
|
||||
flushAndExit(FDB_EXIT_ERROR);
|
||||
}
|
||||
|
|
|
@ -1746,7 +1746,7 @@ ACTOR Future<Void> masterCore(Reference<MasterData> self) {
|
|||
.detail("OldGenerations", self->cstate.myDBState.oldTLogData.size())
|
||||
.detail("Reason",
|
||||
"Recovery stopped because too many recoveries have happened since the last time the cluster "
|
||||
"was fully_recovered. Set --knob_max_generations_override on your server processes to a value "
|
||||
"was fully_recovered. Set --knob-max-generations-override on your server processes to a value "
|
||||
"larger than OldGenerations to resume recovery once the underlying problem has been fixed.");
|
||||
wait(Future<Void>(Never()));
|
||||
} else if (self->cstate.myDBState.oldTLogData.size() > CLIENT_KNOBS->RECOVERY_DELAY_START_GENERATION) {
|
||||
|
@ -1754,7 +1754,7 @@ ACTOR Future<Void> masterCore(Reference<MasterData> self) {
|
|||
.detail("OldGenerations", self->cstate.myDBState.oldTLogData.size())
|
||||
.detail("Reason",
|
||||
"Recovery is delayed because too many recoveries have happened since the last time the cluster "
|
||||
"was fully_recovered. Set --knob_max_generations_override on your server processes to a value "
|
||||
"was fully_recovered. Set --knob-max-generations-override on your server processes to a value "
|
||||
"larger than OldGenerations to resume recovery once the underlying problem has been fixed.");
|
||||
wait(delay(CLIENT_KNOBS->RECOVERY_DELAY_SECONDS_PER_GENERATION *
|
||||
(self->cstate.myDBState.oldTLogData.size() - CLIENT_KNOBS->RECOVERY_DELAY_START_GENERATION)));
|
||||
|
|
|
@ -325,7 +325,7 @@ protected:
|
|||
LogEvent(EVENTLOG_INFORMATION_TYPE, format("Default config file at %s", _confpath.c_str()));
|
||||
|
||||
// Parse "command line" options
|
||||
CSimpleOpt args(argc, argv, g_rgOptions, SO_O_NOERR);
|
||||
CSimpleOpt args(argc, argv, g_rgOptions, SO_O_NOERR | SO_O_HYPHEN_TO_UNDERSCORE);
|
||||
|
||||
while (args.Next()) {
|
||||
if (args.LastError() == SO_SUCCESS) {
|
||||
|
@ -646,15 +646,47 @@ private:
|
|||
const char* getValueMulti(const CSimpleIni& ini, const char* name, ...) {
|
||||
const char* ret = nullptr;
|
||||
const char* section = nullptr;
|
||||
|
||||
std::string nameWithUnderscores(name);
|
||||
for (int i = nameWithUnderscores.size() - 1; i >= 0; --i) {
|
||||
if (nameWithUnderscores[i] == '-') {
|
||||
nameWithUnderscores.at(i) = '_';
|
||||
}
|
||||
}
|
||||
|
||||
va_list ap;
|
||||
va_start(ap, name);
|
||||
while (!ret && (section = va_arg(ap, const char*))) {
|
||||
ret = ini.GetValue(section, name, nullptr);
|
||||
if (!ret) {
|
||||
ret = ini.GetValue(section, nameWithUnderscores.c_str(), nullptr);
|
||||
}
|
||||
}
|
||||
va_end(ap);
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool isParameterNameEqual(const char* str, const char* target) {
|
||||
if (!str || !target) {
|
||||
return false;
|
||||
}
|
||||
while (*str && *target) {
|
||||
char curStr = *str, curTarget = *target;
|
||||
if (curStr == '-') {
|
||||
curStr = '_';
|
||||
}
|
||||
if (curTarget == '-') {
|
||||
curTarget = '_';
|
||||
}
|
||||
if (curStr != curTarget) {
|
||||
return false;
|
||||
}
|
||||
str++;
|
||||
target++;
|
||||
}
|
||||
return !(*str || *target);
|
||||
}
|
||||
|
||||
Command makeCommand(const CSimpleIni& ini, std::string section, uint16_t id) {
|
||||
std::string ssection = format("%s.%d", section.c_str(), id);
|
||||
Command result;
|
||||
|
@ -673,7 +705,7 @@ private:
|
|||
});
|
||||
|
||||
const char* rd =
|
||||
getValueMulti(ini, "restart_delay", ssection.c_str(), section.c_str(), "general", "fdbmonitor", nullptr);
|
||||
getValueMulti(ini, "restart-delay", ssection.c_str(), section.c_str(), "general", "fdbmonitor", nullptr);
|
||||
if (!rd) {
|
||||
LogEvent(EVENTLOG_ERROR_TYPE, format("Unable to resolve restart delay for %s\n", ssection.c_str()));
|
||||
return result;
|
||||
|
@ -687,7 +719,7 @@ private:
|
|||
}
|
||||
|
||||
const char* q =
|
||||
getValueMulti(ini, "disable_lifecycle_logging", ssection.c_str(), section.c_str(), "general", nullptr);
|
||||
getValueMulti(ini, "disable-lifecycle-logging", ssection.c_str(), section.c_str(), "general", nullptr);
|
||||
if (q && !strcmp(q, "true"))
|
||||
result.quiet = true;
|
||||
|
||||
|
@ -702,8 +734,8 @@ private:
|
|||
const char* id_s = ssection.c_str() + strlen(section.c_str()) + 1;
|
||||
|
||||
for (auto i : keys) {
|
||||
if (!strcmp(i.pItem, "command") || !strcmp(i.pItem, "restart_delay") ||
|
||||
!strcmp(i.pItem, "disable_lifecycle_logging")) {
|
||||
if (isParameterNameEqual(i.pItem, "command") || isParameterNameEqual(i.pItem, "restart-delay") ||
|
||||
isParameterNameEqual(i.pItem, "disable-lifecycle-logging")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -298,48 +298,64 @@ ParsedKnobValue Knobs::parseKnobValue(std::string const& knob, std::string const
|
|||
}
|
||||
}
|
||||
|
||||
// Convert any hyphen in the given parameter into underscore, if any
|
||||
std::string toUnderscore(const std::string& knob) {
|
||||
std::string hyphenKnob(knob);
|
||||
for (auto ptr = hyphenKnob.begin(); ptr != hyphenKnob.end(); ++ptr) {
|
||||
if (*ptr == '-') {
|
||||
*ptr = '_';
|
||||
}
|
||||
}
|
||||
return hyphenKnob;
|
||||
}
|
||||
|
||||
bool Knobs::setKnob(std::string const& knob, int value) {
|
||||
if (!int_knobs.count(knob)) {
|
||||
std::string underscoreKnob = toUnderscore(knob);
|
||||
if (!int_knobs.count(underscoreKnob)) {
|
||||
return false;
|
||||
}
|
||||
*int_knobs[knob].value = value;
|
||||
explicitlySetKnobs.insert(toLower(knob));
|
||||
*int_knobs[underscoreKnob].value = value;
|
||||
explicitlySetKnobs.insert(toLower(underscoreKnob));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Knobs::setKnob(std::string const& knob, int64_t value) {
|
||||
if (!int64_knobs.count(knob)) {
|
||||
std::string underscoreKnob = toUnderscore(knob);
|
||||
if (!int64_knobs.count(underscoreKnob)) {
|
||||
return false;
|
||||
}
|
||||
*int64_knobs[knob].value = value;
|
||||
explicitlySetKnobs.insert(toLower(knob));
|
||||
*int64_knobs[underscoreKnob].value = value;
|
||||
explicitlySetKnobs.insert(toLower(underscoreKnob));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Knobs::setKnob(std::string const& knob, bool value) {
|
||||
if (!bool_knobs.count(knob)) {
|
||||
std::string underscoreKnob = toUnderscore(knob);
|
||||
if (!bool_knobs.count(underscoreKnob)) {
|
||||
return false;
|
||||
}
|
||||
*bool_knobs[knob].value = value;
|
||||
explicitlySetKnobs.insert(toLower(knob));
|
||||
*bool_knobs[underscoreKnob].value = value;
|
||||
explicitlySetKnobs.insert(toLower(underscoreKnob));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Knobs::setKnob(std::string const& knob, double value) {
|
||||
if (!double_knobs.count(knob)) {
|
||||
std::string underscoreKnob = toUnderscore(knob);
|
||||
if (!double_knobs.count(underscoreKnob)) {
|
||||
return false;
|
||||
}
|
||||
*double_knobs[knob].value = value;
|
||||
explicitlySetKnobs.insert(toLower(knob));
|
||||
*double_knobs[underscoreKnob].value = value;
|
||||
explicitlySetKnobs.insert(toLower(underscoreKnob));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Knobs::setKnob(std::string const& knob, std::string const& value) {
|
||||
if (!string_knobs.count(knob)) {
|
||||
std::string underscoreKnob = toUnderscore(knob);
|
||||
if (!string_knobs.count(underscoreKnob)) {
|
||||
return false;
|
||||
}
|
||||
*string_knobs[knob].value = value;
|
||||
explicitlySetKnobs.insert(toLower(knob));
|
||||
*string_knobs[underscoreKnob].value = value;
|
||||
explicitlySetKnobs.insert(toLower(underscoreKnob));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -280,7 +280,11 @@ enum _ESOFlags {
|
|||
SO_O_ICASE_WORD = 0x0400,
|
||||
|
||||
/*! Case-insensitive comparisons for all arg types */
|
||||
SO_O_ICASE = 0x0700
|
||||
SO_O_ICASE = 0x0700,
|
||||
|
||||
/*! Treat all hyphens from flag names as underscores except leading hyphens
|
||||
For example: --cluster-file ==> --cluster_file while comparing. */
|
||||
SO_O_HYPHEN_TO_UNDERSCORE = 0x1000
|
||||
};
|
||||
|
||||
/*! Types of arguments that options may have. Note that some of the _ESOFlags
|
||||
|
@ -912,8 +916,9 @@ int CSimpleOptTempl<SOCHAR>::CalcMatch(const SOCHAR* a_pszSource, const SOCHAR*
|
|||
return -1;
|
||||
}
|
||||
|
||||
// and the source is a "wildcard option", then it's a perfect match (e.g. "--knob_" matches "--knob_foo")
|
||||
if (a_pszSource[-1] == '_') {
|
||||
// and the source is a "wildcard option", then it's a perfect match (e.g. "--knob_" or "--knob-" matches
|
||||
// "--knob_foo" and "--knob-foo")
|
||||
if (a_pszSource[-1] == '_' || a_pszSource[-1] == '-') {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -941,6 +946,14 @@ bool CSimpleOptTempl<SOCHAR>::IsEqual(SOCHAR a_cLeft, SOCHAR a_cRight, int a_nAr
|
|||
if (a_cRight >= 'A' && a_cRight <= 'Z')
|
||||
a_cRight += 'a' - 'A';
|
||||
}
|
||||
if (m_nFlags & SO_O_HYPHEN_TO_UNDERSCORE) {
|
||||
if (a_cLeft == (SOCHAR)'-') {
|
||||
a_cLeft = (SOCHAR)'_';
|
||||
}
|
||||
if (a_cRight == (SOCHAR)'-') {
|
||||
a_cRight = (SOCHAR)'_';
|
||||
}
|
||||
}
|
||||
return a_cLeft == a_cRight;
|
||||
}
|
||||
|
||||
|
|
|
@ -265,12 +265,12 @@ public:
|
|||
bool is_client;
|
||||
};
|
||||
|
||||
#define TLS_PLUGIN_FLAG "--tls_plugin"
|
||||
#define TLS_CERTIFICATE_FILE_FLAG "--tls_certificate_file"
|
||||
#define TLS_KEY_FILE_FLAG "--tls_key_file"
|
||||
#define TLS_VERIFY_PEERS_FLAG "--tls_verify_peers"
|
||||
#define TLS_CA_FILE_FLAG "--tls_ca_file"
|
||||
#define TLS_PASSWORD_FLAG "--tls_password"
|
||||
#define TLS_PLUGIN_FLAG "--tls-plugin"
|
||||
#define TLS_CERTIFICATE_FILE_FLAG "--tls-certificate-file"
|
||||
#define TLS_KEY_FILE_FLAG "--tls-key-file"
|
||||
#define TLS_VERIFY_PEERS_FLAG "--tls-verify-peers"
|
||||
#define TLS_CA_FILE_FLAG "--tls-ca-file"
|
||||
#define TLS_PASSWORD_FLAG "--tls-password"
|
||||
|
||||
#define TLS_OPTION_FLAGS \
|
||||
{ TLSConfig::OPT_TLS_PLUGIN, TLS_PLUGIN_FLAG, SO_REQ_SEP }, \
|
||||
|
|
|
@ -141,17 +141,17 @@ data:
|
|||
"runProcesses": false,
|
||||
"version": "6.3.13",
|
||||
"arguments": [
|
||||
{"value": "--cluster_file"},
|
||||
{"value": "--cluster-file"},
|
||||
{"value": "/var/fdb/data/fdb.cluster"},
|
||||
{"value": "--seed_cluster_file"},
|
||||
{"value": "--seed-cluster-file"},
|
||||
{"value": "/var/fdb/dynamic-conf/fdb.cluster"},
|
||||
{"value": "--public_address"},
|
||||
{"value": "--public-address"},
|
||||
{"type": "Concatenate", "values": [
|
||||
{"type": "Environment", "source": "FDB_PUBLIC_IP"},
|
||||
{"value": ":"},
|
||||
{"type": "ProcessNumber", "offset": 4499, "multiplier": 2}
|
||||
]},
|
||||
{"value": "--listen_address"},
|
||||
{"value": "--listen-address"},
|
||||
{"type": "Concatenate", "values": [
|
||||
{"type": "Environment", "source": "FDB_POD_IP"},
|
||||
{"value": ":"},
|
||||
|
@ -164,11 +164,11 @@ data:
|
|||
]},
|
||||
{"value": "--class"},
|
||||
{"value": "storage"},
|
||||
{"value": "--locality_zoneid"},
|
||||
{"value": "--locality-zoneid"},
|
||||
{"type": "Environment", "source": "FDB_ZONE_ID"},
|
||||
{"value": "--locality_instance-id"},
|
||||
{"value": "--locality-instance-id"},
|
||||
{"type": "Environment", "source": "FDB_INSTANCE_ID"},
|
||||
{"value": "--locality_process-id"},
|
||||
{"value": "--locality-process-id"},
|
||||
{"type": "Concatenate", "values": [
|
||||
{"type": "Environment", "source": "FDB_INSTANCE_ID"},
|
||||
{"value": "-"},
|
||||
|
@ -176,7 +176,7 @@ data:
|
|||
]},
|
||||
{"value": "--logdir"},
|
||||
{"value": "/var/fdb/logs"},
|
||||
{"value": "--trace_format"},
|
||||
{"value": "--trace-format"},
|
||||
{"value": "json"}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -9,39 +9,39 @@ user = foundationdb
|
|||
group = foundationdb
|
||||
|
||||
[general]
|
||||
restart_delay = 60
|
||||
## by default, restart_backoff = restart_delay_reset_interval = restart_delay
|
||||
# initial_restart_delay = 0
|
||||
# restart_backoff = 60
|
||||
# restart_delay_reset_interval = 60
|
||||
cluster_file = /etc/foundationdb/fdb.cluster
|
||||
# delete_envvars =
|
||||
# kill_on_configuration_change = true
|
||||
restart-delay = 60
|
||||
## by default, restart-backoff = restart-delay-reset-interval = restart-delay
|
||||
# initial-restart-delay = 0
|
||||
# restart-backoff = 60
|
||||
# restart-delay-reset-interval = 60
|
||||
cluster-file = /etc/foundationdb/fdb.cluster
|
||||
# delete-envvars =
|
||||
# kill-on-configuration-change = true
|
||||
|
||||
## Default parameters for individual fdbserver processes
|
||||
[fdbserver]
|
||||
command = /usr/sbin/fdbserver
|
||||
public_address = auto:$ID
|
||||
listen_address = public
|
||||
public-address = auto:$ID
|
||||
listen-address = public
|
||||
datadir = /var/lib/foundationdb/data/$ID
|
||||
logdir = /var/log/foundationdb
|
||||
# logsize = 10MiB
|
||||
# maxlogssize = 100MiB
|
||||
# machine_id =
|
||||
# datacenter_id =
|
||||
# machine-id =
|
||||
# datacenter-id =
|
||||
# class =
|
||||
# memory = 8GiB
|
||||
# storage_memory = 1GiB
|
||||
# cache_memory = 2GiB
|
||||
# metrics_cluster =
|
||||
# metrics_prefix =
|
||||
# storage-memory = 1GiB
|
||||
# cache-memory = 2GiB
|
||||
# metrics-cluster =
|
||||
# metrics-prefix =
|
||||
|
||||
## An individual fdbserver process with id 4500
|
||||
## Parameters set here override defaults from the [fdbserver] section
|
||||
[fdbserver.4500]
|
||||
|
||||
[backup_agent]
|
||||
command = /usr/lib/foundationdb/backup_agent/backup_agent
|
||||
command = /usr/lib/foundationdb/backup-agent/backup-agent
|
||||
logdir = /var/log/foundationdb
|
||||
|
||||
[backup_agent.1]
|
||||
|
|
|
@ -5,38 +5,38 @@
|
|||
## https://apple.github.io/foundationdb/configuration.html#the-configuration-file
|
||||
|
||||
[general]
|
||||
restart_delay = 60
|
||||
## by default, restart_backoff = restart_delay_reset_interval = restart_delay
|
||||
# initial_restart_delay = 0
|
||||
# restart_backoff = 60
|
||||
# restart_delay_reset_interval = 60
|
||||
cluster_file = /usr/local/etc/foundationdb/fdb.cluster
|
||||
# kill_on_configuration_change = true
|
||||
restart-delay = 60
|
||||
## by default, restart-backoff = restart-delay-reset-interval = restart-delay
|
||||
# initial-restart-delay = 0
|
||||
# restart-backoff = 60
|
||||
# restart-delay-reset-interval = 60
|
||||
cluster-file = /usr/local/etc/foundationdb/fdb.cluster
|
||||
# kill-on-configuration-change = true
|
||||
|
||||
## Default parameters for individual fdbserver processes
|
||||
[fdbserver]
|
||||
command = /usr/local/libexec/fdbserver
|
||||
public_address = auto:$ID
|
||||
listen_address = public
|
||||
public-address = auto:$ID
|
||||
listen-address = public
|
||||
datadir = /usr/local/foundationdb/data/$ID
|
||||
logdir = /usr/local/foundationdb/logs
|
||||
# logsize = 10MiB
|
||||
# maxlogssize = 100MiB
|
||||
# machine_id =
|
||||
# datacenter_id =
|
||||
# machine-id =
|
||||
# datacenter-id =
|
||||
# class =
|
||||
# memory = 8GiB
|
||||
# storage_memory = 1GiB
|
||||
# cache_memory = 2GiB
|
||||
# metrics_cluster =
|
||||
# metrics_prefix =
|
||||
# storage-memory = 1GiB
|
||||
# cache-memory = 2GiB
|
||||
# metrics-cluster =
|
||||
# metrics-prefix =
|
||||
|
||||
## An individual fdbserver process with id 4689
|
||||
## Parameters set here override defaults from the [fdbserver] section
|
||||
[fdbserver.4689]
|
||||
|
||||
[backup_agent]
|
||||
command = /usr/local/foundationdb/backup_agent/backup_agent
|
||||
command = /usr/local/foundationdb/backup-agent/backup-agent
|
||||
logdir = /usr/local/foundationdb/logs
|
||||
|
||||
[backup_agent.1]
|
||||
|
|
|
@ -24,32 +24,32 @@ class LocalCluster:
|
|||
[fdbmonitor]
|
||||
|
||||
[general]
|
||||
restart_delay = 10
|
||||
## by default, restart_backoff = restart_delay_reset_interval = restart_delay
|
||||
# initial_restart_delay = 0
|
||||
# restart_backoff = 60
|
||||
# restart_delay_reset_interval = 60
|
||||
cluster_file = {etcdir}/fdb.cluster
|
||||
# delete_envvars =
|
||||
# kill_on_configuration_change = true
|
||||
restart-delay = 10
|
||||
## by default, restart-backoff = restart-delay-reset-interval = restart-delay
|
||||
# initial-restart-delay = 0
|
||||
# restart-backoff = 60
|
||||
# restart-delay-reset-interval = 60
|
||||
cluster-file = {etcdir}/fdb.cluster
|
||||
# delete-envvars =
|
||||
# kill-on-configuration-change = true
|
||||
|
||||
## Default parameters for individual fdbserver processes
|
||||
[fdbserver]
|
||||
command = {fdbserver_bin}
|
||||
public_address = auto:$ID
|
||||
listen_address = public
|
||||
public-address = auto:$ID
|
||||
listen-address = public
|
||||
datadir = {datadir}/$ID
|
||||
logdir = {logdir}
|
||||
# logsize = 10MiB
|
||||
# maxlogssize = 100MiB
|
||||
# machine_id =
|
||||
# datacenter_id =
|
||||
# machine-id =
|
||||
# datacenter-id =
|
||||
# class =
|
||||
# memory = 8GiB
|
||||
# storage_memory = 1GiB
|
||||
# cache_memory = 2GiB
|
||||
# metrics_cluster =
|
||||
# metrics_prefix =
|
||||
# storage-memory = 1GiB
|
||||
# cache-memory = 2GiB
|
||||
# metrics-cluster =
|
||||
# metrics-prefix =
|
||||
|
||||
## An individual fdbserver process with id 4000
|
||||
## Parameters set here override defaults from the [fdbserver] section
|
||||
|
|
Loading…
Reference in New Issue