From 5e45cc7325f9c885a877ca33a07a35dea7085a4c Mon Sep 17 00:00:00 2001 From: Andrew Mason Date: Thu, 14 Sep 2023 16:15:29 -0400 Subject: [PATCH] consolidate docs (#1583) * regen consolidated docs Signed-off-by: Andrew Mason * remove handwritten vtctld/vtorc docs Signed-off-by: Andrew Mason * no need to manage checkouts if ref is HEAD Signed-off-by: Andrew Mason * add ability to generate all docs with one target Signed-off-by: Andrew Mason * fix sidebar expanders this makes it so we only expand if there are actual "regular pages" (i.e. not just `_index.md`) in a section Signed-off-by: Andrew Mason --------- Signed-off-by: Andrew Mason --- Makefile | 2 + .../en/docs/18.0/reference/programs/vtctld.md | 181 ------------------ .../18.0/reference/programs/vtctld/_index.md | 24 +++ .../en/docs/18.0/reference/programs/vtorc.md | 106 ---------- .../18.0/reference/programs/vtorc/_index.md | 16 ++ layouts/partials/docs/sidebar.html | 1 + tools/cobradocs/version.go | 28 +-- 7 files changed, 58 insertions(+), 300 deletions(-) delete mode 100644 content/en/docs/18.0/reference/programs/vtctld.md delete mode 100644 content/en/docs/18.0/reference/programs/vtorc.md diff --git a/Makefile b/Makefile index 7d7dcdcc9..f22cd0105 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,8 @@ ifndef COBRADOC_VERSION_PAIRS export COBRADOC_VERSION_PAIRS="main:16.0,v15.0.2:15.0" endif +generated-docs: vtctld-docs vtctldclient-docs vtgate-docs vtorc-docs vttablet-docs + # Usage: VITESS_DIR=/full/path/to/vitess.io/vitess make vtctld-docs vtctld-docs: go run ./tools/cobradocs/ --vitess-dir "${VITESS_DIR}" --version-pairs "${COBRADOC_VERSION_PAIRS}" vtctld diff --git a/content/en/docs/18.0/reference/programs/vtctld.md b/content/en/docs/18.0/reference/programs/vtctld.md deleted file mode 100644 index d10daa22f..000000000 --- a/content/en/docs/18.0/reference/programs/vtctld.md +++ /dev/null @@ -1,181 +0,0 @@ ---- -title: vtctld -description: The Vitess Cluster Management Daemon ---- - -`vtctld` provides web and gRPC interfaces to manage a single Vitess cluster. -It is usually the first Vitess component to be started after a valid [global topology service](../../../user-guides/configuration-basic/global-topo/) has been created. - -## `grpc-vtctld` — New as of v14 - -For the last several releases, `vtctld` has been transitioning to a newer gRPC service for well-typed cluster management requests. -To enable this newer service, include `"grpc-vtctld"` in the `--service_map` argument. - -This is **required** to use programs such as [`vtadmin`](../vtadmin/) and [`vtctldclient`](../vtctldclient/). -While the old API and service are deprecated and will be removed in a future release, they are still required for certain cluster management commands (e.g. `OnlineDDL` and `Reshard`) as well as the vtctld web UI, so most users will want to include both in their `--service_map`. -This is demonstrated in the example usage below: - -## Example Usage - -The following example launches the `vtctld` daemon on port 15000: - -```bash -export TOPOLOGY_FLAGS="--topo_implementation etcd2 --topo_global_server_address localhost:2379 --topo_global_root /vitess/global" -export VTDATAROOT="/tmp" - -vtctld \ - $TOPOLOGY_FLAGS \ - --service_map 'grpc-vtctl,grpc-vtctld' \ - --backup_storage_implementation file \ - --file_backup_storage_root $VTDATAROOT/backups \ - --log_dir $VTDATAROOT/tmp \ - --port 15000 \ - --grpc_port 15999 -``` - -## Options - -| Name | Type | Definition | -| :------------------------------------ | :--------- | :----------------------------------------------------------------------------------------- | -| --action_timeout | duration | time to wait for an action before resorting to force (default 2m0s) | -| --alsologtostderr | | log to standard error as well as files | -| --azblob_backup_account_key_file | string | Path to a file containing the Azure Storage account key; if this flag is unset, the environment variable VT_AZBLOB_ACCOUNT_KEY will be used as the key itself (NOT a file path) | -| --azblob_backup_account_name | string | Azure Storage Account name for backups; if this flag is unset, the environment variable VT_AZBLOB_ACCOUNT_NAME will be used | -| --azblob_backup_buffer_size | int | The memory buffer size to use in bytes, per file or stripe, when streaming to Azure Blob Service. (default 104857600) | -| --azblob_backup_container_name | string | Azure Blob Container Name | -| --azblob_backup_parallelism | int | Azure Blob operation parallelism (requires extra memory when increased -- a multiple of azblob_backup_buffer_size). (default 1) | -| --azblob_backup_storage_root | string | Root prefix for all backup-related Azure Blobs; this should exclude both initial and trailing '/' (e.g. just 'a/b' not '/a/b/') | -| --backup_engine_implementation | string | Specifies which implementation to use for creating new backups (builtin or xtrabackup). Restores will always be done with whichever engine created a given backup. (default "builtin") | -| --backup_storage_block_size | int | if backup_storage_compress is true, backup_storage_block_size sets the byte size for each block while compressing (default is 250000). (default 250000) | -| --backup_storage_compress | boolean | if set, the backup files will be compressed (default is true). | -| --backup_storage_implementation | string | which implementation to use for the backup storage feature | -| --backup_storage_number_blocks | int | if backup_storage_compress is true, backup_storage_number_blocks sets the number of blocks that can be processed, at once, before the writer blocks, during compression (default is 2). It should be equal to the number of CPUs available for compression (default 2) | -| --builtinbackup-file-read-buffer-size | uint | read files using an IO buffer of this many bytes. Golang defaults are used when set to 0. | -| --builtinbackup-file-write-buffer-size | uint | write files using an IO buffer of this many bytes. Golang defaults are used when set to 0. (default 2097152) | -| --builtinbackup_mysqld_timeout | duration | how long to wait for mysqld to shutdown at the start of the backup. (default 10m0s) | -| --builtinbackup_progress | duration | how often to send progress updates when backing up large files. (default 5s) | -| --catch-sigpipe | | catch and ignore SIGPIPE on stdout and stderr if specified | -| --cell | string | cell to use | -| --ceph_backup_storage_config | string | Path to JSON config file for ceph backup storage (default "ceph_backup_config.json") | -| --consul_auth_static_file | string | JSON File to read the topos/tokens from. | -| --datadog-agent-host | string | host to send spans to. if empty, no tracing will be done | -| --datadog-agent-port | string | port to send spans to. if empty, no tracing will be done | -| --disable_active_reparents | boolean | if set, do not allow active reparents. Use this to protect a cluster using external reparents. | -| --emit_stats | boolean | true iff we should emit stats to push-based monitoring/stats backends | -| --file_backup_storage_root | string | root directory for the file backup storage -- this path must be on shared storage to provide a global view of backups to all vitess components | -| --gcs_backup_storage_bucket | string | Google Cloud Storage bucket to use for backups | -| --gcs_backup_storage_root | string | root prefix for all backup-related object names | -| --grpc_auth_mode | string | Which auth plugin implementation to use (eg: static) | -| --grpc_auth_mtls_allowed_substrings | string | List of substrings of at least one of the client certificate names (separated by colon). | -| --grpc_auth_static_client_creds | string | when using grpc_static_auth in the server, this file provides the credentials to use to authenticate with server | -| --grpc_auth_static_password_file | string | JSON File to read the users/passwords from. | -| --grpc_ca | string | ca to use, requires TLS, and enforces client cert check | -| --grpc_cert | string | certificate to use, requires grpc_key, enables TLS | -| --grpc_compression | string | how to compress gRPC, default: nothing, supported: snappy | -| --grpc_crl | string | path to a certificate revocation list in PEM format, client certificates will be further verified against this file during TLS handshake | -| --grpc_enable_optional_tls | | enable optional TLS mode when a server accepts both TLS and plain-text connections on the same port | -| --grpc_enable_tracing | boolean | Enable GRPC tracing | -| --grpc_initial_conn_window_size | int | grpc initial connection window size | -| --grpc_initial_window_size | int | grpc initial window size | -| --grpc_keepalive_time | duration | After a duration of this time if the client doesn't see any activity it pings the server to see if the transport is still alive. (default 10s) | -| --grpc_keepalive_timeout | duration | After having pinged for keepalive check, the client waits for a duration of Timeout and if no activity is seen even after that the connection is closed. (default 10s) | -| --grpc_key | string | key to use, requires grpc_cert, enables TLS | -| --grpc_max_connection_age | duration | Maximum age of a client connection before GoAway is sent. (default 2562047h47m16.854775807s) | -| --grpc_max_connection_age_grace | duration | Additional grace period after grpc_max_connection_age, after which connections are forcibly closed. (default 2562047h47m16.854775807s) | -| --grpc_max_message_size | int | Maximum allowed RPC message size. Larger messages will be rejected by gRPC with the error 'exceeding the max size'. (default 16777216) | -| --grpc_port | int | Port to listen on for gRPC calls | -| --grpc_prometheus | boolean | Enable gRPC monitoring with Prometheus | -| --grpc_server_ca | string | path to server CA in PEM format, which will be combine with server cert, return full certificate chain to clients | -| --grpc_server_initial_conn_window_size | int | grpc server initial connection window size | -| --grpc_server_initial_window_size | int | grpc server initial window size | -| --grpc_server_keepalive_enforcement_policy_min_time | duration | grpc server minimum keepalive time (default 5m0s) | -| --grpc_server_keepalive_enforcement_policy_permit_without_stream | boolean | grpc server permit client keepalive pings even when there are no active streams (RPCs) | -| --jaeger-agent-host | string | host and port to send spans to. if empty, no tracing will be done | -| --keep_logs | duration | keep logs for this long (using ctime) (zero to keep forever) | -| --keep_logs_by_mtime | duration | keep logs for this long (using mtime) (zero to keep forever) | -| --lameduck-period | duration | keep running at least this long after SIGTERM before stopping (default 50ms) | -| --log_backtrace_at | value | when logging hits line file:N, emit a stack trace | -| --log_dir | string | If non-empty, write log files in this directory | -| --log_err_stacks | boolean | log stack traces for errors | -| --log_rotate_max_size | uint | size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) | -| --logtostderr | boolean | log to standard error instead of files | -| --max-stack-size | int | configure the maximum stack size in bytes (default 67108864) | -| --onclose_timeout | duration | wait no more than this for OnClose handlers before stopping (default 1ns) | -| --onterm_timeout | duration | wait no more than this for OnTermSync handlers before stopping (default 10s) | -| --opentsdb_uri | string | URI of opentsdb /api/put method | -| --pid_file | string | If set, the process will write its pid to the named file, and delete it on graceful shutdown. | -| --port | int | port for the server | -| --pprof | strings | enable profiling | -| --proxy_tablets | boolean | Setting this true will make vtctld proxy the tablet status instead of redirecting to them | -| --purge_logs_interval | duration | how often try to remove old logs (default 1h0m0s) | -| --remote_operation_timeout | duration | time to wait for a remote operation (default 30s) | -| --s3_backup_aws_endpoint | string | endpoint of the S3 backend (region must be provided) | -| --s3_backup_aws_region | string | AWS region to use (default "us-east-1") | -| --s3_backup_aws_retries | int | AWS request retries (default -1) | -| --s3_backup_force_path_style | boolean | force the s3 path style | -| --s3_backup_log_level | string | determine the S3 loglevel to use from LogOff, LogDebug, LogDebugWithSigning, LogDebugWithHTTPBody, LogDebugWithRequestRetries, LogDebugWithRequestErrors (default "LogOff") | -| --s3_backup_server_side_encryption | string | server-side encryption algorithm (e.g., AES256, aws:kms) | -| --s3_backup_storage_bucket | string | S3 bucket to use for backups | -| --s3_backup_storage_root | string | root prefix for all backup-related object names | -| --s3_backup_tls_skip_verify_cert | boolean | skip the 'certificate is valid' check for SSL connections | -| --schema_change_check_interval | duration | How often the schema change dir is checked for schema changes. This value must be positive; if zero or lower, the default of 1m is used. | -| --schema_change_controller | string | schema change controller is responsible for finding schema changes and responding to schema change events | -| --schema_change_dir | string | directory contains schema changes for all keyspaces. Each keyspace has its own directory and schema changes are expected to live in '$KEYSPACE/input' dir. e.g. test_keyspace/input/*sql, each sql file represents a schema change | -| --schema_change_replicas_timeout | duration | how long to wait for replicas to receive the schema change (default 10s) | -| --schema_change_user | string | The user who submits this schema change. | -| --security_policy | string | the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only) | -| --service_map | value | comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice | -| --sql-max-length-errors | int | truncate queries in error logs to the given length (default unlimited) | -| --sql-max-length-ui | int | truncate queries in debug UIs to the given length (default 512) (default 512) | -| --stats_backend | string | The name of the registered push-based monitoring/stats backend to use | -| --stats_combine_dimensions | string | List of dimensions to be combined into a single "all" value in exported stats vars | -| --stats_common_tags | strings | Comma-separated list of common tags for the stats backend. It provides both label and values. Example: label1:value1,label2:value2 | -| --stats_drop_variables | string | Variables to be dropped from the list of exported variables. | -| --stats_emit_period | duration | Interval between emitting stats to all registered backends (default 1m0s) | -| --stderrthreshold | value | logs at or above this threshold go to stderr (default 1) | -| --tablet_dir | string | The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid. | -| --tablet_grpc_ca | string | the server ca to use to validate servers when connecting | -| --tablet_grpc_cert | string | the cert to use to connect | -| --tablet_grpc_crl | string | the server crl to use to validate server certificates when connecting | -| --tablet_grpc_key | string | the key to use to connect | -| --tablet_grpc_server_name | string | the server name to use to validate server certificate | -| --tablet_health_keep_alive | duration | close streaming tablet health connection if there are no requests for this long (default 5m0s) | -| --tablet_manager_grpc_ca | string | the server ca to use to validate servers when connecting | -| --tablet_manager_grpc_cert | string | the cert to use to connect | -| --tablet_manager_grpc_concurrency | int | concurrency to use to talk to a vttablet server for performance-sensitive RPCs (like ExecuteFetchAs{Dba,AllPrivs,App}) (default 8) | -| --tablet_manager_grpc_connpool_size | int | number of tablets to keep tmclient connections open to (default 100) | -| --tablet_manager_grpc_crl | string | the server crl to use to validate server certificates when connecting | -| --tablet_manager_grpc_key | string | the key to use to connect | -| --tablet_manager_grpc_server_name | string | the server name to use to validate server certificate | -| --tablet_manager_protocol | string | the protocol to use to talk to vttablet (default "grpc") | -| --tablet_protocol | string | how to talk to the vttablets (default "grpc") | -| --tablet_refresh_interval | duration | Tablet refresh interval. (default 1m0s) | -| --tablet_refresh_known_tablets | | Whether to reload the tablet's address/port map from topo in case they change. (default true) | -| --tablet_url_template | string | format string describing debug tablet url formatting. See the Go code for getTabletDebugURL() how to customize this. (default "http://{{.GetTabletHostPort}}") | -| --topo_consul_lock_delay | duration | LockDelay for consul session. (default 15s) | -| --topo_consul_lock_session_checks | string | List of checks for consul session. (default "serfHealth") | -| --topo_consul_lock_session_ttl | string | TTL for consul session. | -| --topo_consul_watch_poll_duration | duration | time of the long poll for watch queries. (default 30s) | -| --topo_etcd_lease_ttl | int | Lease TTL for locks and leader election. The client will use KeepAlive to keep the lease going. (default 30) | -| --topo_etcd_tls_ca | string | path to the ca to use to validate the server cert when connecting to the etcd topo server | -| --topo_etcd_tls_cert | string | path to the client cert to use to connect to the etcd topo server, requires topo_etcd_tls_key, enables TLS | -| --topo_etcd_tls_key | string | path to the client key to use to connect to the etcd topo server, enables TLS | -| --topo_global_root | string | the path of the global topology data in the global topology server | -| --topo_global_server_address | string | the address of the global topology server | -| --topo_implementation | string | the topology implementation to use | -| --topo_read_concurrency | int | Concurrency of topo reads. (default 32) | -| --topo_zk_auth_file | string | auth to use when connecting to the zk topo server, file contents should be :, e.g., digest:user:pass | -| --topo_zk_base_timeout | duration | zk base timeout (see zk.Connect) (default 30s) | -| --topo_zk_max_concurrency | int | maximum number of pending requests to send to a Zookeeper server. (default 64) | -| --topo_zk_tls_ca | string | the server ca to use to validate servers when connecting to the zk topo server | -| --topo_zk_tls_cert | string | the cert to use to connect to the zk topo server, requires topo_zk_tls_key, enables TLS | -| --topo_zk_tls_key | string | the key to use to connect to the zk topo server, enables TLS | -| --tracer | string | tracing service to use (default "noop") | -| --tracing-enable-logging | | whether to enable logging in the tracing service | -| --tracing-sampling-rate | float | sampling rate for the probabilistic jaeger sampler (default 0.1) | -| --tracing-sampling-type | string | sampling strategy to use for jaeger. possible values are 'const', 'probabilistic', 'rateLimiting', or 'remote' (default "const") | -| --v | value | log level for V logs | -| --version | | print binary version | -| --vmodule | value | comma-separated list of pattern=N settings for file-filtered logging | -| --vtctl_healthcheck_topology_refresh | duration | refresh interval for re-reading the topology (default 30s) | -| --vtctld_sanitize_log_messages | | When true, vtctld sanitizes logging. | diff --git a/content/en/docs/18.0/reference/programs/vtctld/_index.md b/content/en/docs/18.0/reference/programs/vtctld/_index.md index c20990856..46f0ce5c6 100644 --- a/content/en/docs/18.0/reference/programs/vtctld/_index.md +++ b/content/en/docs/18.0/reference/programs/vtctld/_index.md @@ -6,10 +6,34 @@ series: vtctld The Vitess cluster management daemon. +### Synopsis + +vtctld provides web and gRPC interfaces to manage a single Vitess cluster. +It is usually the first Vitess component to be started after a valid global topology service has been created. + +For the last several releases, vtctld has been transitioning to a newer gRPC service for well-typed cluster management requests. +This is **required** to use programs such as vtadmin and vtctldclient, and The old API and service are deprecated and will be removed in a future release. +To enable this newer service, include "grpc-vtctld" in the --service_map argument. +This is demonstrated in the example usage below. + ``` vtctld [flags] ``` +### Examples + +``` +vtctld \ + --topo_implementation etcd2 \ + --topo_global_server_address localhost:2379 \ + --topo_global_root /vitess/ \ + --service_map 'grpc-vtctl,grpc-vtctld' \ + --backup_storage_implementation file \ + --file_backup_storage_root $VTDATAROOT/backups \ + --port 15000 \ + --grpc_port 15999 +``` + ### Options ``` diff --git a/content/en/docs/18.0/reference/programs/vtorc.md b/content/en/docs/18.0/reference/programs/vtorc.md deleted file mode 100644 index 243a4b292..000000000 --- a/content/en/docs/18.0/reference/programs/vtorc.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: vtorc ---- - -VTOrc is the automated fault detection and repair tool in Vitess. - -## Example Usage - -Start VTOrc as follows: - -```bash -export TOPOLOGY_FLAGS="--topo_implementation etcd2 --topo_global_server_address localhost:2379 --topo_global_root /vitess/global" -export VTDATAROOT="/tmp" - -vtorc \ - $TOPOLOGY_FLAGS \ - --log_dir $VTDATAROOT/tmp \ - --port 15000 \ - --recovery-period-block-duration "10m" \ - --instance-poll-time "1s" \ - --topo-information-refresh-duration "30s" \ - --alsologtostderr -``` - -## Options - -The following command line options apply to VTOrc: - -| Name | Type | Definition | -|:------------------------------------|:--------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| --allow-emergency-reparent | boolean | Whether VTOrc should be allowed to run emergency reparent operation when it detects a dead primary (default true) | -| --alsologtostderr | boolean | log to standard error as well as files | -| --audit-file-location | string | File location where the audit logs are to be stored | -| --audit-purge-duration | duration | Duration for which audit logs are held before being purged. Should be in multiples of days (default 168h0m0s) | -| --audit-to-backend | boolean | Whether to store the audit log in the VTOrc database | -| --audit-to-syslog | boolean | Whether to store the audit log in the syslog | -| --catch-sigpipe | boolean | catch and ignore SIGPIPE on stdout and stderr if specified | -| --clusters_to_watch | strings | Comma-separated list of keyspaces or keyspace/shards that this instance will monitor and repair. Defaults to all clusters in the topology. Example: "ks1,ks2/-80" | -| --config | string | config file name | -| --consul_auth_static_file | string | JSON File to read the topos/tokens from. | -| --grpc_auth_static_client_creds | string | When using grpc_static_auth in the server, this file provides the credentials to use to authenticate with server. | -| --grpc_compression | string | Which protocol to use for compressing gRPC. Default: nothing. Supported: snappy | -| --grpc_enable_tracing | boolean | Enable gRPC tracing. | -| --grpc_initial_conn_window_size | int | gRPC initial connection window size | -| --grpc_initial_window_size | int | gRPC initial window size | -| --grpc_keepalive_time | duration | After a duration of this time, if the client doesn't see any activity, it pings the server to see if the transport is still alive. (default 10s) | -| --grpc_keepalive_timeout | duration | After having pinged for keepalive check, the client waits for a duration of Timeout and if no activity is seen even after that the connection is closed. (default 10s) | -| --grpc_max_message_size | int | Maximum allowed RPC message size. Larger messages will be rejected by gRPC with the error 'exceeding the max size'. (default 16777216) | -| --grpc_prometheus | boolean | Enable gRPC monitoring with Prometheus. | -| -h, --help | boolean | display usage and exit | -| --instance-poll-time | duration | Timer duration on which VTOrc refreshes MySQL information (default 5s) | -| --keep_logs | duration | keep logs for this long (using ctime) (zero to keep forever) | -| --keep_logs_by_mtime | duration | keep logs for this long (using mtime) (zero to keep forever) | -| --lameduck-period | duration | keep running at least this long after SIGTERM before stopping (default 50ms) | -| --lock-timeout | duration | Maximum time for which a shard/keyspace lock can be acquired for (default 45s) | -| --log_backtrace_at | traceLocation | when logging hits line file:N, emit a stack trace (default :0) | -| --log_dir | string | If non-empty, write log files in this directory | -| --log_err_stacks | boolean | log stack traces for errors | -| --log_rotate_max_size | uint | size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) | -| --logtostderr | boolean | log to standard error instead of files | -| --onclose_timeout | duration | wait no more than this for OnClose handlers before stopping (default 10s) | -| --onterm_timeout | duration | wait no more than this for OnTermSync handlers before stopping (default 10s) | -| --pid_file | string | If set, the process will write its pid to the named file, and delete it on graceful shutdown. | -| --port | int | port for the server | -| --pprof | strings | enable profiling | -| --prevent-cross-cell-failover | boolean | Prevent VTOrc from promoting a primary in a different cell than the current primary in case of a failover | -| --purge_logs_interval | duration | how often try to remove old logs (default 1h0m0s) | -| --reasonable-replication-lag | duration | Maximum replication lag on replicas which is deemed to be acceptable (default 10s) | -| --recovery-period-block-duration | duration | Duration for which a new recovery is blocked on an instance after running a recovery (default 30s) | -| --recovery-poll-duration | duration | Timer duration on which VTOrc polls its database to run a recovery (default 1s) | -| --remote_operation_timeout | duration | time to wait for a remote operation (default 15s) | -| --security_policy | string | the name of a registered security policy to use for controlling access to URLs - empty means allow all for anyone (built-in policies: deny-all, read-only) | -| --shutdown_wait_time | duration | Maximum time to wait for VTOrc to release all the locks that it is holding before shutting down on SIGTERM (default 30s) | -| --snapshot-topology-interval | duration | Timer duration on which VTOrc takes a snapshot of the current MySQL information it has in the database. Should be in multiple of hours | -| --sqlite-data-file | string | SQLite Datafile to use as VTOrc's database (default "file::memory:?mode=memory&cache=shared") | -| --stderrthreshold | severity | logs at or above this threshold go to stderr (default 1) | -| --tablet_manager_grpc_ca | string | the server ca to use to validate servers when connecting | -| --tablet_manager_grpc_cert | string | the cert to use to connect | -| --tablet_manager_grpc_concurrency | int | concurrency to use to talk to a vttablet server for performance-sensitive RPCs (like ExecuteFetchAs{Dba,AllPrivs,App}) (default 8) | -| --tablet_manager_grpc_connpool_size | int | number of tablets to keep tmclient connections open to (default 100) | -| --tablet_manager_grpc_crl | string | the server crl to use to validate server certificates when connecting | -| --tablet_manager_grpc_key | string | the key to use to connect | -| --tablet_manager_grpc_server_name | string | the server name to use to validate server certificate | -| --tablet_manager_protocol | string | Protocol to use to make tabletmanager RPCs to vttablets. (default "grpc") | -| --topo-information-refresh-duration | duration | Timer duration on which VTOrc refreshes the keyspace and vttablet records from the topology server (default 15s) | -| --topo_consul_lock_delay | duration | LockDelay for consul session. (default 15s) | -| --topo_consul_lock_session_checks | string | List of checks for consul session. (default "serfHealth") | -| --topo_consul_lock_session_ttl | string | TTL for consul session. | -| --topo_consul_watch_poll_duration | duration | time of the long poll for watch queries. (default 30s) | -| --topo_etcd_lease_ttl | int | Lease TTL for locks and leader election. The client will use KeepAlive to keep the lease going. (default 30) | -| --topo_etcd_tls_ca | string | path to the ca to use to validate the server cert when connecting to the etcd topo server | -| --topo_etcd_tls_cert | string | path to the client cert to use to connect to the etcd topo server, requires topo_etcd_tls_key, enables TLS | -| --topo_etcd_tls_key | string | path to the client key to use to connect to the etcd topo server, enables TLS | -| --topo_global_root | string | the path of the global topology data in the global topology server | -| --topo_global_server_address | string | the address of the global topology server | -| --topo_implementation | string | the topology implementation to use | -| --topo_zk_auth_file | string | auth to use when connecting to the zk topo server, file contents should be :, e.g., digest:user:pass | -| --topo_zk_base_timeout | duration | zk base timeout (see zk.Connect) (default 30s) | -| --topo_zk_max_concurrency | int | maximum number of pending requests to send to a Zookeeper server. (default 64) | -| --topo_zk_tls_ca | string | the server ca to use to validate servers when connecting to the zk topo server | -| --topo_zk_tls_cert | string | the cert to use to connect to the zk topo server, requires topo_zk_tls_key, enables TLS | -| --topo_zk_tls_key | string | the key to use to connect to the zk topo server, enables TLS | -| --v | value | log level for V logs | -| --version | boolean | print binary version | -| --vmodule | value | comma-separated list of pattern=N settings for file-filtered logging | -| --wait-replicas-timeout | duration | Duration for which to wait for replica's to respond when issuing RPCs (default 30s) | diff --git a/content/en/docs/18.0/reference/programs/vtorc/_index.md b/content/en/docs/18.0/reference/programs/vtorc/_index.md index f0ec32fc5..ec764f3dc 100644 --- a/content/en/docs/18.0/reference/programs/vtorc/_index.md +++ b/content/en/docs/18.0/reference/programs/vtorc/_index.md @@ -10,6 +10,21 @@ VTOrc is the automated fault detection and repair tool in Vitess. vtorc [flags] ``` +### Examples + +``` +vtorc \ + --topo_implementation etcd2 \ + --topo_global_server_address localhost:2379 \ + --topo_global_root /vitess/global \ + --log_dir $VTDATAROOT/tmp \ + --port 15000 \ + --recovery-period-block-duration "10m" \ + --instance-poll-time "1s" \ + --topo-information-refresh-duration "30s" \ + --alsologtostderr +``` + ### Options ``` @@ -20,6 +35,7 @@ vtorc [flags] --audit-to-backend Whether to store the audit log in the VTOrc database --audit-to-syslog Whether to store the audit log in the syslog --catch-sigpipe catch and ignore SIGPIPE on stdout and stderr if specified + --change-tablets-with-errant-gtid-to-drained Whether VTOrc should be changing the type of tablets with errant GTIDs to DRAINED --clusters_to_watch strings Comma-separated list of keyspaces or keyspace/shards that this instance will monitor and repair. Defaults to all clusters in the topology. Example: "ks1,ks2/-80" --config string config file name --config-file string Full path of the config file (with extension) to use. If set, --config-path, --config-type, and --config-name are ignored. diff --git a/layouts/partials/docs/sidebar.html b/layouts/partials/docs/sidebar.html index 38eb0114d..516221ae7 100644 --- a/layouts/partials/docs/sidebar.html +++ b/layouts/partials/docs/sidebar.html @@ -32,6 +32,7 @@ {{/* 'docs_nav_disable_expand' is (currently only) used to hide the caret on the "Older Version Docs" link */}} {{/* We can remove it with a better versioning system: see https://github.com/vitessio/website/issues/625 */}} {{ $isExpandable := and .IsSection (not .Params.docs_nav_disable_expand) }} + {{ $isExpandable := and $isExpandable (gt (len .RegularPages) 0) }} {{ $expandableClass := cond $isExpandable "expandable" "" }}
  • diff --git a/tools/cobradocs/version.go b/tools/cobradocs/version.go index 038e5de65..add7d0ad6 100644 --- a/tools/cobradocs/version.go +++ b/tools/cobradocs/version.go @@ -47,21 +47,23 @@ func (v version) GenerateDocs(workdir string, vitessDir string, docgenPath strin } }() - gitCheckout := exec.Command("git", "checkout", v.Ref) - debugf(gitCheckout.String()) - if err = gitCheckout.Run(); err != nil { - return err - } - - defer func() { - gitCheckout := exec.Command("git", "checkout", "-") + if v.Ref != "HEAD" { + gitCheckout := exec.Command("git", "checkout", v.Ref) debugf(gitCheckout.String()) - if checkoutErr := gitCheckout.Run(); checkoutErr != nil { - if err == nil { - err = checkoutErr - } + if err = gitCheckout.Run(); err != nil { + return err } - }() + + defer func() { + gitCheckout := exec.Command("git", "checkout", "-") + debugf(gitCheckout.String()) + if checkoutErr := gitCheckout.Run(); checkoutErr != nil { + if err == nil { + err = checkoutErr + } + } + }() + } if err = isDir(filepath.Join(vitessDir, docgenPath)); err != nil { err = fmt.Errorf("cannot find docgen tool directory: %w", err)