diff --git a/config/tablet/default.yaml b/config/tablet/default.yaml index d0e4eca477b..15ae27a8521 100644 --- a/config/tablet/default.yaml +++ b/config/tablet/default.yaml @@ -8,27 +8,27 @@ init: timeoutSeconds: 60 # init_timeout db: - socket: # db_socket - host: # db_host - port: 0 # db_port - charSet: # db_charset - flags: 0 # db_flags - flavor: # db_flavor - sslCa: # db_ssl_ca - sslCaPath: # db_ssl_ca_path - sslCert: # db_ssl_cert - sslKey: # db_ssl_key - serverName: # db_server_name - connectTimeoutMilliseconds: 0 # db_connect_timeout_ms + socket: # db-socket + host: # db-host + port: 0 # db-port + charSet: # db-charset + flags: 0 # db-flags + flavor: # db-flavor + sslCa: # db-ssl-ca + sslCaPath: # db-ssl-ca-path + sslCert: # db-ssl-cert + sslKey: # db-ssl-key + serverName: # db-server-name + connectTimeoutMilliseconds: 0 # db-connect-timeout-ms app: user: vt_app # db_app_user password: # db_app_password useSsl: true # db_app_use_ssl preferTcp: false dba: - user: vt_dba # db_dba_user - password: # db_dba_password - useSsl: true # db_dba_use_ssl + user: vt_dba # db-dba-user + password: # db-dba-password + useSsl: true # db-dba-use-ssl preferTcp: false filtered: user: vt_filtered # db_filtered_user diff --git a/docker/vttestserver/run.sh b/docker/vttestserver/run.sh index e3a99ab38f4..37585666d44 100755 --- a/docker/vttestserver/run.sh +++ b/docker/vttestserver/run.sh @@ -36,7 +36,7 @@ rm -vf "$VTDATAROOT"/"$tablet_dir"/{mysql.sock,mysql.sock.lock} --num_shards "$NUM_SHARDS" \ --mysql_bind_host "${MYSQL_BIND_HOST:-127.0.0.1}" \ --vtcombo-bind-host "${VTCOMBO_BIND_HOST:-127.0.0.1}" \ - --mysql_server_version "${MYSQL_SERVER_VERSION:-$1}" \ + --mysql-server-version "${MYSQL_SERVER_VERSION:-$1}" \ --charset "${CHARSET:-utf8mb4}" \ --foreign_key_mode "${FOREIGN_KEY_MODE:-allow}" \ --enable_online_ddl="${ENABLE_ONLINE_DDL:-true}" \ diff --git a/examples/compose/docker-compose.beginners.yml b/examples/compose/docker-compose.beginners.yml index f17e3a74ca4..e2b02a01f2b 100644 --- a/examples/compose/docker-compose.beginners.yml +++ b/examples/compose/docker-compose.beginners.yml @@ -66,7 +66,7 @@ services: # TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation $TOPOLOGY_FLAGS \ --cell $CELL \ - --service_map 'grpc-vtctl,grpc-vtctld' \ + --service-map 'grpc-vtctl,grpc-vtctld' \ --backup_storage_implementation file \ --file_backup_storage_root /vt/vtdataroot/backups \ --logtostderr=true \ @@ -100,7 +100,7 @@ services: --cell $CELL \ --cells_to_watch $CELL \ --tablet_types_to_wait PRIMARY,REPLICA \ - --service_map 'grpc-vtgateservice' \ + --service-map 'grpc-vtgateservice' \ --enable_system_settings=true \ "] volumes: diff --git a/examples/compose/docker-compose.yml b/examples/compose/docker-compose.yml index 2ddfcc5b7cf..b41962757dd 100644 --- a/examples/compose/docker-compose.yml +++ b/examples/compose/docker-compose.yml @@ -138,7 +138,7 @@ services: - -c - ' /vt/bin/vtctld --topo-implementation consul --topo-global-server-address consul1:8500 --topo-global-root vitess/global --cell test - --service_map ''grpc-vtctl,grpc-vtctld'' --backup_storage_implementation file --file_backup_storage_root + --service-map ''grpc-vtctl,grpc-vtctld'' --backup_storage_implementation file --file_backup_storage_root /vt/vtdataroot/backups --logtostderr=true --port 8080 --grpc-port 15999 ' depends_on: external_db_host: @@ -156,7 +156,7 @@ services: - '/script/run-forever.sh /vt/bin/vtgate --topo-implementation consul --topo-global-server-address consul1:8500 --topo-global-root vitess/global --logtostderr=true --port 8080 --grpc-port 15999 --mysql_server_port 15306 --mysql_auth_server_impl none --cell test --cells_to_watch - test --tablet_types_to_wait PRIMARY,REPLICA,RDONLY --service_map ''grpc-vtgateservice'' + test --tablet_types_to_wait PRIMARY,REPLICA,RDONLY --service-map ''grpc-vtgateservice'' --normalize_queries=true ' depends_on: - vtctld diff --git a/examples/compose/vtcompose/docker-compose.test.yml b/examples/compose/vtcompose/docker-compose.test.yml index 1a6fcf98673..978f632c164 100644 --- a/examples/compose/vtcompose/docker-compose.test.yml +++ b/examples/compose/vtcompose/docker-compose.test.yml @@ -153,7 +153,7 @@ services: - -c - ' /vt/bin/vtctld --topo-implementation consul --topo-global-server-address consul1:8500 --topo-global-root vitess/global --cell test - --service_map ''grpc-vtctl,grpc-vtctld'' --backup_storage_implementation file + --service-map ''grpc-vtctl,grpc-vtctld'' --backup_storage_implementation file --file_backup_storage_root /vt/vtdataroot/backups --logtostderr=true --port 8080 --grpc-port 15999 ' depends_on: @@ -172,7 +172,7 @@ services: - '/script/run-forever.sh /vt/bin/vtgate --topo-implementation consul --topo-global-server-address consul1:8500 --topo-global-root vitess/global --logtostderr=true --port 8080 --grpc-port 15999 --mysql_server_port 15306 --mysql_auth_server_impl none --cell - test --cells_to_watch test --tablet_types_to_wait PRIMARY,REPLICA,RDONLY --service_map + test --cells_to_watch test --tablet_types_to_wait PRIMARY,REPLICA,RDONLY --service-map ''grpc-vtgateservice'' --normalize_queries=true ' depends_on: - vtctld diff --git a/examples/compose/vtcompose/vtcompose.go b/examples/compose/vtcompose/vtcompose.go index 092bca4fd11..678acdf9dd1 100644 --- a/examples/compose/vtcompose/vtcompose.go +++ b/examples/compose/vtcompose/vtcompose.go @@ -632,7 +632,7 @@ func generateVtctld(opts vtOptions) string { command: ["sh", "-c", " /vt/bin/vtctld \ %[3]s \ --cell %[4]s \ - --service_map 'grpc-vtctl,grpc-vtctld' \ + --service-map 'grpc-vtctl,grpc-vtctld' \ --backup_storage_implementation file \ --file_backup_storage_root /vt/vtdataroot/backups \ --logtostderr=true \ @@ -671,7 +671,7 @@ func generateVtgate(opts vtOptions) string { --cell %[5]s \ --cells_to_watch %[5]s \ --tablet_types_to_wait PRIMARY,REPLICA,RDONLY \ - --service_map 'grpc-vtgateservice' \ + --service-map 'grpc-vtgateservice' \ --normalize_queries=true \ "] volumes: diff --git a/examples/operator/101_initial_cluster.yaml b/examples/operator/101_initial_cluster.yaml index 0c1aae9e59f..377d557ba93 100644 --- a/examples/operator/101_initial_cluster.yaml +++ b/examples/operator/101_initial_cluster.yaml @@ -43,7 +43,7 @@ spec: cells: - zone1 extraFlags: - security_policy: read-only + security-policy: read-only replicas: 1 resources: limits: @@ -100,7 +100,7 @@ spec: replicas: 2 vttablet: extraFlags: - db_charset: utf8mb4 + db-charset: utf8mb4 resources: limits: memory: 256Mi diff --git a/examples/operator/201_customer_tablets.yaml b/examples/operator/201_customer_tablets.yaml index 1326ac447dd..08f1676d98a 100644 --- a/examples/operator/201_customer_tablets.yaml +++ b/examples/operator/201_customer_tablets.yaml @@ -39,7 +39,7 @@ spec: cells: - zone1 extraFlags: - security_policy: read-only + security-policy: read-only replicas: 1 resources: limits: @@ -96,7 +96,7 @@ spec: replicas: 2 vttablet: extraFlags: - db_charset: utf8mb4 + db-charset: utf8mb4 resources: limits: memory: 256Mi @@ -131,7 +131,7 @@ spec: replicas: 2 vttablet: extraFlags: - db_charset: utf8mb4 + db-charset: utf8mb4 resources: limits: memory: 256Mi diff --git a/examples/operator/302_new_shards.yaml b/examples/operator/302_new_shards.yaml index 7b617f68ff3..01d53e21a70 100644 --- a/examples/operator/302_new_shards.yaml +++ b/examples/operator/302_new_shards.yaml @@ -39,7 +39,7 @@ spec: cells: - zone1 extraFlags: - security_policy: read-only + security-policy: read-only replicas: 1 resources: limits: @@ -96,7 +96,7 @@ spec: replicas: 2 vttablet: extraFlags: - db_charset: utf8mb4 + db-charset: utf8mb4 resources: limits: memory: 256Mi @@ -131,7 +131,7 @@ spec: replicas: 2 vttablet: extraFlags: - db_charset: utf8mb4 + db-charset: utf8mb4 resources: limits: memory: 256Mi @@ -162,7 +162,7 @@ spec: replicas: 2 vttablet: extraFlags: - db_charset: utf8mb4 + db-charset: utf8mb4 resources: limits: memory: 256Mi diff --git a/examples/operator/306_down_shard_0.yaml b/examples/operator/306_down_shard_0.yaml index f78ff27c35c..feaaced0937 100644 --- a/examples/operator/306_down_shard_0.yaml +++ b/examples/operator/306_down_shard_0.yaml @@ -39,7 +39,7 @@ spec: cells: - zone1 extraFlags: - security_policy: read-only + security-policy: read-only replicas: 1 resources: limits: @@ -96,7 +96,7 @@ spec: replicas: 2 vttablet: extraFlags: - db_charset: utf8mb4 + db-charset: utf8mb4 resources: limits: memory: 256Mi @@ -131,7 +131,7 @@ spec: replicas: 2 vttablet: extraFlags: - db_charset: utf8mb4 + db-charset: utf8mb4 resources: limits: memory: 256Mi diff --git a/examples/operator/401_scheduled_backups.yaml b/examples/operator/401_scheduled_backups.yaml index 661fc11fb64..e74540e79c3 100644 --- a/examples/operator/401_scheduled_backups.yaml +++ b/examples/operator/401_scheduled_backups.yaml @@ -73,7 +73,7 @@ spec: cells: - zone1 extraFlags: - security_policy: read-only + security-policy: read-only replicas: 1 resources: limits: @@ -130,7 +130,7 @@ spec: replicas: 2 vttablet: extraFlags: - db_charset: utf8mb4 + db-charset: utf8mb4 wait_for_backup_interval: "0" resources: limits: @@ -166,7 +166,7 @@ spec: replicas: 2 vttablet: extraFlags: - db_charset: utf8mb4 + db-charset: utf8mb4 wait_for_backup_interval: "0" resources: limits: diff --git a/go/acl/acl.go b/go/acl/acl.go index 9f98a82c688..eb68a188472 100644 --- a/go/acl/acl.go +++ b/go/acl/acl.go @@ -23,7 +23,7 @@ limitations under the License. // own policy as a package that calls RegisterPolicy(), and compile it into all // Vitess binaries that you use. // -// By default (when no security_policy is specified), everyone is allowed to do +// By default (when no security-policy is specified), everyone is allowed to do // anything. // // For convenience, there are two other built-in policies that also do NOT do @@ -43,6 +43,7 @@ import ( "github.com/spf13/pflag" "vitess.io/vitess/go/vt/log" + "vitess.io/vitess/go/vt/utils" ) // This is a list of predefined roles. Applications are free @@ -70,7 +71,7 @@ type Policy interface { } func RegisterFlags(fs *pflag.FlagSet) { - fs.StringVar(&securityPolicy, "security_policy", securityPolicy, "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)") + utils.SetFlagStringVar(fs, &securityPolicy, "security-policy", securityPolicy, "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)") } // RegisterPolicy registers a security policy. This function must be called @@ -94,7 +95,7 @@ func savePolicy() { currentPolicy = policy return } - log.Warningf("security_policy %q not found; using fallback policy (deny-all)", securityPolicy) + log.Warningf("security-policy %q not found; using fallback policy (deny-all)", securityPolicy) currentPolicy = denyAllPolicy{} } diff --git a/go/acl/acl_test.go b/go/acl/acl_test.go index 0b5bc8ab015..e0b613f0fc9 100644 --- a/go/acl/acl_test.go +++ b/go/acl/acl_test.go @@ -106,8 +106,8 @@ func TestRegisterFlags(t *testing.T) { RegisterFlags(testFs) - securityPolicyFlag := testFs.Lookup("security_policy") - assert.NotNil(t, securityPolicyFlag, "no security_policy flag is registered") + securityPolicyFlag := testFs.Lookup("security-policy") + assert.NotNil(t, securityPolicyFlag, "no security-policy flag is registered") // Check the default value of the flag want := "test" diff --git a/go/acl/deny_all_policy.go b/go/acl/deny_all_policy.go index 37d1d51eea3..79a9a0f7d65 100644 --- a/go/acl/deny_all_policy.go +++ b/go/acl/deny_all_policy.go @@ -21,7 +21,7 @@ import ( "net/http" ) -var errDenyAll = errors.New("not allowed: deny-all security_policy enforced") +var errDenyAll = errors.New("not allowed: deny-all security-policy enforced") // denyAllPolicy rejects all access. type denyAllPolicy struct{} diff --git a/go/acl/read_only_policy.go b/go/acl/read_only_policy.go index 05b4817ec61..d60064a22cc 100644 --- a/go/acl/read_only_policy.go +++ b/go/acl/read_only_policy.go @@ -21,7 +21,7 @@ import ( "net/http" ) -var errReadOnly = errors.New("not allowed: read-only security_policy enforced") +var errReadOnly = errors.New("not allowed: read-only security-policy enforced") // readOnlyPolicy allows DEBUGGING and MONITORING roles for everyone, // while denying any other roles (e.g. ADMIN) for everyone. diff --git a/go/cmd/vtcombo/cli/main.go b/go/cmd/vtcombo/cli/main.go index 52e29044268..013090d6414 100644 --- a/go/cmd/vtcombo/cli/main.go +++ b/go/cmd/vtcombo/cli/main.go @@ -241,9 +241,10 @@ func run(cmd *cobra.Command, args []string) (err error) { // Tablet configuration and init. // Send mycnf as nil because vtcombo won't do backups and restores. // - // Also force the `--tablet_manager_protocol` and `--tablet_protocol` flags + // Also force the `--tablet-manager-protocol` and `--tablet_protocol` flags // to be the "internal" protocol that InitTabletMap registers. - cmd.Flags().Set("tablet_manager_protocol", "internal") + + cmd.Flags().Set("tablet-manager-protocol", "internal") cmd.Flags().Set("tablet_protocol", "internal") uid, err := vtcombo.InitTabletMap(env, ts, &tpb, mysqld, &dbconfigs.GlobalDBConfigs, schemaDir, startMysql, srvTopoCounts) if err != nil { diff --git a/go/cmd/vtctld/cli/cli.go b/go/cmd/vtctld/cli/cli.go index 50dcd275aca..17af2dbd0f6 100644 --- a/go/cmd/vtctld/cli/cli.go +++ b/go/cmd/vtctld/cli/cli.go @@ -37,13 +37,13 @@ It is usually the first Vitess component to be started after a valid global topo 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. +To enable this newer service, include "grpc-vtctld" in the --service-map argument. This is demonstrated in the example usage below.`, Example: `vtctld \ --topo-implementation etcd2 \ --topo-global-server-address localhost:2379 \ --topo-global-root /vitess/ \ - --service_map 'grpc-vtctl,grpc-vtctld' \ + --service-map 'grpc-vtctl,grpc-vtctld' \ --backup_storage_implementation file \ --file_backup_storage_root $VTDATAROOT/backups \ --port 15000 \ diff --git a/go/cmd/vtctldclient/command/vreplication/materialize/materialize.go b/go/cmd/vtctldclient/command/vreplication/materialize/materialize.go index cb595e6b7f7..c14ede00be9 100644 --- a/go/cmd/vtctldclient/command/vreplication/materialize/materialize.go +++ b/go/cmd/vtctldclient/command/vreplication/materialize/materialize.go @@ -24,6 +24,7 @@ import ( "vitess.io/vitess/go/cmd/vtctldclient/command/vreplication/common" "vitess.io/vitess/go/mysql/config" "vitess.io/vitess/go/vt/topo/topoproto" + "vitess.io/vitess/go/vt/utils" ) var ( @@ -48,7 +49,7 @@ func registerCommands(root *cobra.Command) { create.MarkFlagRequired("source-keyspace") create.Flags().Var(&createOptions.TableSettings, "table-settings", "A JSON array defining what tables to materialize using what select statements. See the --help output for more details.") create.Flags().BoolVar(&common.CreateOptions.StopAfterCopy, "stop-after-copy", false, "Stop the workflow after it's finished copying the existing rows and before it starts replicating changes.") - create.Flags().StringVar(&common.CreateOptions.MySQLServerVersion, "mysql_server_version", fmt.Sprintf("%s-Vitess", config.DefaultMySQLVersion), "Configure the MySQL version to use for example for the parser.") + utils.SetFlagStringVar(create.Flags(), &common.CreateOptions.MySQLServerVersion, "mysql-server-version", fmt.Sprintf("%s-Vitess", config.DefaultMySQLVersion), "Configure the MySQL version to use for example for the parser.") create.Flags().IntVar(&common.CreateOptions.TruncateUILen, "sql-max-length-ui", 512, "truncate queries in debug UIs to the given length (default 512)") create.Flags().IntVar(&common.CreateOptions.TruncateErrLen, "sql-max-length-errors", 0, "truncate queries in error logs to the given length (default unlimited)") create.Flags().StringSliceVarP(&common.CreateOptions.ReferenceTables, "reference-tables", "r", nil, "Used to specify the reference tables to materialize on every target shard.") diff --git a/go/cmd/vtgate/cli/cli.go b/go/cmd/vtgate/cli/cli.go index f19d08efacd..91d090758e1 100644 --- a/go/cmd/vtgate/cli/cli.go +++ b/go/cmd/vtgate/cli/cli.go @@ -66,8 +66,8 @@ var ( --cell test \ --cells_to_watch test \ --tablet_types_to_wait PRIMARY,REPLICA \ - --service_map 'grpc-vtgateservice' \ - --pid_file $VTDATAROOT/tmp/vtgate.pid \ + --service-map 'grpc-vtgateservice' \ + --pid-file $VTDATAROOT/tmp/vtgate.pid \ --mysql_auth_server_impl none`, Args: cobra.NoArgs, Version: servenv.AppVersion.String(), diff --git a/go/cmd/vttablet/cli/cli.go b/go/cmd/vttablet/cli/cli.go index 4628b67f68b..9cfa20d6802 100644 --- a/go/cmd/vttablet/cli/cli.go +++ b/go/cmd/vttablet/cli/cli.go @@ -94,7 +94,7 @@ vttablet \ --init_tablet_type $tablet_type \ --port $port \ --grpc-port $grpc_port \ - --service_map 'grpc-queryservice,grpc-tabletmanager,grpc-updatestream'` + "\n\n`$alias` needs to be of the form: `-id`, and the cell should match one of the local cells that was created in the topology. The id can be left padded with zeroes: `cell-100` and `cell-000000100` are synonymous.", + --service-map 'grpc-queryservice,grpc-tabletmanager,grpc-updatestream'` + "\n\n`$alias` needs to be of the form: `-id`, and the cell should match one of the local cells that was created in the topology. The id can be left padded with zeroes: `cell-100` and `cell-000000100` are synonymous.", Args: cobra.NoArgs, Version: servenv.AppVersion.String(), PreRunE: servenv.CobraPreRunE, diff --git a/go/cmd/vttablet/cli/cli_test.go b/go/cmd/vttablet/cli/cli_test.go index 698eede087e..01f6709fe65 100644 --- a/go/cmd/vttablet/cli/cli_test.go +++ b/go/cmd/vttablet/cli/cli_test.go @@ -47,6 +47,8 @@ func TestRunFailsToStartTabletManager(t *testing.T) { utils.SetFlagVariantsForTests(flags, "--topo-implementation", "test") utils.SetFlagVariantsForTests(flags, "--topo-global-server-address", "localhost") utils.SetFlagVariantsForTests(flags, "--topo-global-root", "cell") + utils.SetFlagVariantsForTests(flags, "--db-host", "localhost") + utils.SetFlagVariantsForTests(flags, "--db-port", "3306") var flagArgs []string for flag, value := range flags { @@ -54,7 +56,6 @@ func TestRunFailsToStartTabletManager(t *testing.T) { } flagArgs = append(flagArgs, - "--db_host", "localhost", "--db_port", "3306", "--tablet-path", "cell-1", "--init_keyspace", "ks", "--init_shard", "0", "--init_tablet_type", "replica", "--restore_from_backup", diff --git a/go/flags/endtoend/count_flags.sh b/go/flags/endtoend/count_flags.sh index aad9df47a19..81a833752b5 100755 --- a/go/flags/endtoend/count_flags.sh +++ b/go/flags/endtoend/count_flags.sh @@ -7,7 +7,7 @@ for file in *.txt; do reading_flags=0 while IFS= read -r line; do - if [[ "$line" == "Flags:" ]]; then + if [[ "$line" == "Flags:" || "$line" == "Usage of vtctlclient:" ]]; then reading_flags=1 continue fi @@ -29,3 +29,4 @@ echo "-------------------------------------" echo "Total Flags with underscores (_): $underscore_count" echo "Total Flags with dashes (-): $dash_count" + diff --git a/go/flags/endtoend/mysqlctl.txt b/go/flags/endtoend/mysqlctl.txt index f803b393a76..7dff92eff62 100644 --- a/go/flags/endtoend/mysqlctl.txt +++ b/go/flags/endtoend/mysqlctl.txt @@ -29,6 +29,9 @@ Flags: --config-path strings Paths to search for config files in. (default [{{ .Workdir }}]) --config-persistence-min-interval duration minimum interval between persisting dynamic config changes back to disk (if no change has occurred, nothing is done). (default 1s) --config-type string Config file type (omit to infer config type from file extension). + --db-charset string Character set/collation used for this tablet. Make sure to configure this to a charset/collation supported by the lowest MySQL version in your environment. (default "utf8mb4") + --db-conn-query-info enable parsing and processing of QUERY_OK info fields + --db-connect-timeout-ms int connection timeout to mysqld in milliseconds (0 for no timeout) --db-credentials-file string db credentials file; send SIGHUP to reload this file --db-credentials-server string db credentials server type ('file' - file implementation; 'vault' - HashiCorp Vault implementation) (default "file") --db-credentials-vault-addr string URL to Vault server @@ -40,56 +43,53 @@ Flags: --db-credentials-vault-tls-ca string Path to CA PEM for validating Vault server certificate --db-credentials-vault-tokenfile string Path to file containing Vault auth token; token can also be passed using VAULT_TOKEN environment variable --db-credentials-vault-ttl duration How long to cache DB credentials from the Vault server (default 30m0s) - --db_charset string Character set/collation used for this tablet. Make sure to configure this to a charset/collation supported by the lowest MySQL version in your environment. (default "utf8mb4") - --db_conn_query_info enable parsing and processing of QUERY_OK info fields - --db_connect_timeout_ms int connection timeout to mysqld in milliseconds (0 for no timeout) - --db_dba_password string db dba password - --db_dba_use_ssl Set this flag to false to make the dba connection to not use ssl (default true) - --db_dba_user string db dba user userKey (default "vt_dba") - --db_flags uint Flag values as defined by MySQL. - --db_flavor string Flavor overrid. Valid value is FilePos. - --db_host string The host name for the tcp connection. - --db_port int tcp port - --db_server_name string server name of the DB we are connecting to. - --db_socket string The unix socket to connect on. If this is specified, host and port will not be used. - --db_ssl_ca string connection ssl ca - --db_ssl_ca_path string connection ssl ca path - --db_ssl_cert string connection ssl certificate - --db_ssl_key string connection ssl key - --db_ssl_mode SslMode SSL mode to connect with. One of disabled, preferred, required, verify_ca & verify_identity. - --db_tls_min_version string Configures the minimal TLS version negotiated when SSL is enabled. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3. + --db-dba-password string db dba password + --db-dba-use-ssl Set this flag to false to make the dba connection to not use ssl (default true) + --db-dba-user string db dba user userKey (default "vt_dba") + --db-flags uint Flag values as defined by MySQL. + --db-flavor string Flavor overrid. Valid value is FilePos. + --db-host string The host name for the tcp connection. + --db-port int tcp port + --db-server-name string server name of the DB we are connecting to. + --db-socket string The unix socket to connect on. If this is specified, host and port will not be used. + --db-ssl-ca string connection ssl ca + --db-ssl-ca-path string connection ssl ca path + --db-ssl-cert string connection ssl certificate + --db-ssl-key string connection ssl key + --db-ssl-mode SslMode SSL mode to connect with. One of disabled, preferred, required, verify_ca & verify_identity. + --db-tls-min-version string Configures the minimal TLS version negotiated when SSL is enabled. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3. --dba_idle_timeout duration Idle timeout for dba connections (default 1m0s) --dba_pool_size int Size of the connection pool for dba connections (default 20) -h, --help help for mysqlctl - --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) + --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-err-stacks log stack traces for errors + --log-rotate-max-size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --log_backtrace_at traceLocations 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 log stack traces for errors - --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --logtostderr log to standard error instead of files --max-stack-size int configure the maximum stack size in bytes (default 67108864) + --mysql-server-version string MySQL server version to advertise. (default "8.0.40-Vitess") --mysql_port int MySQL port. (default 3306) - --mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess") --mysql_socket string Path to the mysqld socket file. --mysqlctl_client_protocol string the protocol to use to talk to the mysqlctl server (default "grpc") --mysqlctl_mycnf_template string template file to use for generating the my.cnf file during server init --mysqlctl_socket string socket file to use for remote mysqlctl actions (empty for local actions) - --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. + --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. --pool_hostname_resolve_interval duration if set force an update to all hostnames and reconnect if changed, defaults to 0 (disabled) --pprof strings enable profiling --pprof-http enable pprof http endpoints - --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) + --purge-logs-interval duration how often try to remove old logs (default 1h0m0s) --replication_connect_retry duration how long to wait in between replica reconnect attempts. Only precise to the second. (default 10s) - --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 strings comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice + --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 strings comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice --socket_file string Local unix socket file to listen on --stderrthreshold severityFlag logs at or above this threshold go to stderr (default 1) --table-refresh-interval int interval in milliseconds to refresh tables in status page with refreshRequired class - --tablet_dir string The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid. + --tablet-dir string The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid. --tablet_uid uint32 Tablet UID. (default 41983) --v Level log level for V logs -v, --version print binary version diff --git a/go/flags/endtoend/mysqlctld.txt b/go/flags/endtoend/mysqlctld.txt index 3ee01346ade..8fb5d36e746 100644 --- a/go/flags/endtoend/mysqlctld.txt +++ b/go/flags/endtoend/mysqlctld.txt @@ -30,6 +30,9 @@ Flags: --config-path strings Paths to search for config files in. (default [{{ .Workdir }}]) --config-persistence-min-interval duration minimum interval between persisting dynamic config changes back to disk (if no change has occurred, nothing is done). (default 1s) --config-type string Config file type (omit to infer config type from file extension). + --db-charset string Character set/collation used for this tablet. Make sure to configure this to a charset/collation supported by the lowest MySQL version in your environment. (default "utf8mb4") + --db-conn-query-info enable parsing and processing of QUERY_OK info fields + --db-connect-timeout-ms int connection timeout to mysqld in milliseconds (0 for no timeout) --db-credentials-file string db credentials file; send SIGHUP to reload this file --db-credentials-server string db credentials server type ('file' - file implementation; 'vault' - HashiCorp Vault implementation) (default "file") --db-credentials-vault-addr string URL to Vault server @@ -41,24 +44,21 @@ Flags: --db-credentials-vault-tls-ca string Path to CA PEM for validating Vault server certificate --db-credentials-vault-tokenfile string Path to file containing Vault auth token; token can also be passed using VAULT_TOKEN environment variable --db-credentials-vault-ttl duration How long to cache DB credentials from the Vault server (default 30m0s) - --db_charset string Character set/collation used for this tablet. Make sure to configure this to a charset/collation supported by the lowest MySQL version in your environment. (default "utf8mb4") - --db_conn_query_info enable parsing and processing of QUERY_OK info fields - --db_connect_timeout_ms int connection timeout to mysqld in milliseconds (0 for no timeout) - --db_dba_password string db dba password - --db_dba_use_ssl Set this flag to false to make the dba connection to not use ssl (default true) - --db_dba_user string db dba user userKey (default "vt_dba") - --db_flags uint Flag values as defined by MySQL. - --db_flavor string Flavor overrid. Valid value is FilePos. - --db_host string The host name for the tcp connection. - --db_port int tcp port - --db_server_name string server name of the DB we are connecting to. - --db_socket string The unix socket to connect on. If this is specified, host and port will not be used. - --db_ssl_ca string connection ssl ca - --db_ssl_ca_path string connection ssl ca path - --db_ssl_cert string connection ssl certificate - --db_ssl_key string connection ssl key - --db_ssl_mode SslMode SSL mode to connect with. One of disabled, preferred, required, verify_ca & verify_identity. - --db_tls_min_version string Configures the minimal TLS version negotiated when SSL is enabled. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3. + --db-dba-password string db dba password + --db-dba-use-ssl Set this flag to false to make the dba connection to not use ssl (default true) + --db-dba-user string db dba user userKey (default "vt_dba") + --db-flags uint Flag values as defined by MySQL. + --db-flavor string Flavor overrid. Valid value is FilePos. + --db-host string The host name for the tcp connection. + --db-port int tcp port + --db-server-name string server name of the DB we are connecting to. + --db-socket string The unix socket to connect on. If this is specified, host and port will not be used. + --db-ssl-ca string connection ssl ca + --db-ssl-ca-path string connection ssl ca path + --db-ssl-cert string connection ssl certificate + --db-ssl-key string connection ssl key + --db-ssl-mode SslMode SSL mode to connect with. One of disabled, preferred, required, verify_ca & verify_identity. + --db-tls-min-version string Configures the minimal TLS version negotiated when SSL is enabled. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3. --dba_idle_timeout duration Idle timeout for dba connections (default 1m0s) --dba_pool_size int Size of the connection pool for dba connections (default 20) --grpc-auth-mode string Which auth plugin implementation to use (eg: static) @@ -89,36 +89,36 @@ Flags: --grpc-server-keepalive-timeout duration After having pinged for keepalive check, the server waits for a duration of Timeout and if no activity is seen even after that the connection is closed. (default 10s) -h, --help help for mysqlctld --init_db_sql_file string Path to .sql file to run after mysqld initialization - --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) + --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-err-stacks log stack traces for errors + --log-rotate-max-size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --log_backtrace_at traceLocations 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 log stack traces for errors - --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --logtostderr log to standard error instead of files --max-stack-size int configure the maximum stack size in bytes (default 67108864) + --mysql-server-version string MySQL server version to advertise. (default "8.0.40-Vitess") --mysql_port int MySQL port (default 3306) - --mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess") --mysql_socket string Path to the mysqld socket file --mysqlctl_mycnf_template string template file to use for generating the my.cnf file during server init --mysqlctl_socket string socket file to use for remote mysqlctl actions (empty for local actions) - --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 5m10s) - --pid_file string If set, the process will write its pid to the named file, and delete it on graceful shutdown. + --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 5m10s) + --pid-file string If set, the process will write its pid to the named file, and delete it on graceful shutdown. --pool_hostname_resolve_interval duration if set force an update to all hostnames and reconnect if changed, defaults to 0 (disabled) --port int port for the server --pprof strings enable profiling --pprof-http enable pprof http endpoints - --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) + --purge-logs-interval duration how often try to remove old logs (default 1h0m0s) --replication_connect_retry duration how long to wait in between replica reconnect attempts. Only precise to the second. (default 10s) - --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 strings comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice + --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 strings comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice --shutdown-wait-time duration How long to wait for mysqld shutdown (default 5m0s) --socket_file string Local unix socket file to listen on --stderrthreshold severityFlag logs at or above this threshold go to stderr (default 1) --table-refresh-interval int interval in milliseconds to refresh tables in status page with refreshRequired class - --tablet_dir string The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid. + --tablet-dir string The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid. --tablet_uid uint32 Tablet UID (default 41983) --v Level log level for V logs -v, --version print binary version diff --git a/go/flags/endtoend/topo2topo.txt b/go/flags/endtoend/topo2topo.txt index 3f3f09c2ae9..5e99c0a7d37 100644 --- a/go/flags/endtoend/topo2topo.txt +++ b/go/flags/endtoend/topo2topo.txt @@ -25,17 +25,17 @@ Flags: --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 Enable gRPC monitoring with Prometheus. -h, --help help for topo2topo - --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) + --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) + --log-err-stacks log stack traces for errors + --log-rotate-max-size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --log_backtrace_at traceLocations 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 log stack traces for errors - --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --logtostderr log to standard error instead of files --pprof strings enable profiling --pprof-http enable pprof http endpoints - --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) - --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) + --purge-logs-interval duration how often try to remove old logs (default 1h0m0s) + --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) --stderrthreshold severityFlag logs at or above this threshold go to stderr (default 1) --to_implementation string topology implementation to copy data to --to_root string topology server root to copy data to diff --git a/go/flags/endtoend/vtaclcheck.txt b/go/flags/endtoend/vtaclcheck.txt index 8917df63c66..9253aec9b01 100644 --- a/go/flags/endtoend/vtaclcheck.txt +++ b/go/flags/endtoend/vtaclcheck.txt @@ -13,17 +13,17 @@ Flags: --config-persistence-min-interval duration minimum interval between persisting dynamic config changes back to disk (if no change has occurred, nothing is done). (default 1s) --config-type string Config file type (omit to infer config type from file extension). -h, --help help for vtaclcheck - --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) + --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) + --log-err-stacks log stack traces for errors + --log-rotate-max-size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --log_backtrace_at traceLocations 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 log stack traces for errors - --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --logtostderr log to standard error instead of files --pprof strings enable profiling --pprof-http enable pprof http endpoints - --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) - --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) + --purge-logs-interval duration how often try to remove old logs (default 1h0m0s) + --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) --static-auth-file string The path of the auth_server_static JSON file to check --stderrthreshold severityFlag logs at or above this threshold go to stderr (default 1) --v Level log level for V logs diff --git a/go/flags/endtoend/vtbackup.txt b/go/flags/endtoend/vtbackup.txt index fc90f93d713..76bc787de67 100644 --- a/go/flags/endtoend/vtbackup.txt +++ b/go/flags/endtoend/vtbackup.txt @@ -78,6 +78,18 @@ Flags: --config-persistence-min-interval duration minimum interval between persisting dynamic config changes back to disk (if no change has occurred, nothing is done). (default 1s) --config-type string Config file type (omit to infer config type from file extension). --consul_auth_static_file string JSON File to read the topos/tokens from. + --db-allprivs-password string db allprivs password + --db-allprivs-use-ssl Set this flag to false to make the allprivs connection to not use ssl (default true) + --db-allprivs-user string db allprivs user userKey (default "vt_allprivs") + --db-app-password string db app password + --db-app-use-ssl Set this flag to false to make the app connection to not use ssl (default true) + --db-app-user string db app user userKey (default "vt_app") + --db-appdebug-password string db appdebug password + --db-appdebug-use-ssl Set this flag to false to make the appdebug connection to not use ssl (default true) + --db-appdebug-user string db appdebug user userKey (default "vt_appdebug") + --db-charset string Character set/collation used for this tablet. Make sure to configure this to a charset/collation supported by the lowest MySQL version in your environment. (default "utf8mb4") + --db-conn-query-info enable parsing and processing of QUERY_OK info fields + --db-connect-timeout-ms int connection timeout to mysqld in milliseconds (0 for no timeout) --db-credentials-file string db credentials file; send SIGHUP to reload this file --db-credentials-server string db credentials server type ('file' - file implementation; 'vault' - HashiCorp Vault implementation) (default "file") --db-credentials-vault-addr string URL to Vault server @@ -89,42 +101,30 @@ Flags: --db-credentials-vault-tls-ca string Path to CA PEM for validating Vault server certificate --db-credentials-vault-tokenfile string Path to file containing Vault auth token; token can also be passed using VAULT_TOKEN environment variable --db-credentials-vault-ttl duration How long to cache DB credentials from the Vault server (default 30m0s) - --db_allprivs_password string db allprivs password - --db_allprivs_use_ssl Set this flag to false to make the allprivs connection to not use ssl (default true) - --db_allprivs_user string db allprivs user userKey (default "vt_allprivs") - --db_app_password string db app password - --db_app_use_ssl Set this flag to false to make the app connection to not use ssl (default true) - --db_app_user string db app user userKey (default "vt_app") - --db_appdebug_password string db appdebug password - --db_appdebug_use_ssl Set this flag to false to make the appdebug connection to not use ssl (default true) - --db_appdebug_user string db appdebug user userKey (default "vt_appdebug") - --db_charset string Character set/collation used for this tablet. Make sure to configure this to a charset/collation supported by the lowest MySQL version in your environment. (default "utf8mb4") - --db_conn_query_info enable parsing and processing of QUERY_OK info fields - --db_connect_timeout_ms int connection timeout to mysqld in milliseconds (0 for no timeout) - --db_dba_password string db dba password - --db_dba_use_ssl Set this flag to false to make the dba connection to not use ssl (default true) - --db_dba_user string db dba user userKey (default "vt_dba") - --db_erepl_password string db erepl password - --db_erepl_use_ssl Set this flag to false to make the erepl connection to not use ssl (default true) - --db_erepl_user string db erepl user userKey (default "vt_erepl") - --db_filtered_password string db filtered password - --db_filtered_use_ssl Set this flag to false to make the filtered connection to not use ssl (default true) - --db_filtered_user string db filtered user userKey (default "vt_filtered") - --db_flags uint Flag values as defined by MySQL. - --db_flavor string Flavor overrid. Valid value is FilePos. - --db_host string The host name for the tcp connection. - --db_port int tcp port - --db_repl_password string db repl password - --db_repl_use_ssl Set this flag to false to make the repl connection to not use ssl (default true) - --db_repl_user string db repl user userKey (default "vt_repl") - --db_server_name string server name of the DB we are connecting to. - --db_socket string The unix socket to connect on. If this is specified, host and port will not be used. - --db_ssl_ca string connection ssl ca - --db_ssl_ca_path string connection ssl ca path - --db_ssl_cert string connection ssl certificate - --db_ssl_key string connection ssl key - --db_ssl_mode SslMode SSL mode to connect with. One of disabled, preferred, required, verify_ca & verify_identity. - --db_tls_min_version string Configures the minimal TLS version negotiated when SSL is enabled. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3. + --db-dba-password string db dba password + --db-dba-use-ssl Set this flag to false to make the dba connection to not use ssl (default true) + --db-dba-user string db dba user userKey (default "vt_dba") + --db-erepl-password string db erepl password + --db-erepl-use-ssl Set this flag to false to make the erepl connection to not use ssl (default true) + --db-erepl-user string db erepl user userKey (default "vt_erepl") + --db-filtered-password string db filtered password + --db-filtered-use-ssl Set this flag to false to make the filtered connection to not use ssl (default true) + --db-filtered-user string db filtered user userKey (default "vt_filtered") + --db-flags uint Flag values as defined by MySQL. + --db-flavor string Flavor overrid. Valid value is FilePos. + --db-host string The host name for the tcp connection. + --db-port int tcp port + --db-repl-password string db repl password + --db-repl-use-ssl Set this flag to false to make the repl connection to not use ssl (default true) + --db-repl-user string db repl user userKey (default "vt_repl") + --db-server-name string server name of the DB we are connecting to. + --db-socket string The unix socket to connect on. If this is specified, host and port will not be used. + --db-ssl-ca string connection ssl ca + --db-ssl-ca-path string connection ssl ca path + --db-ssl-cert string connection ssl certificate + --db-ssl-key string connection ssl key + --db-ssl-mode SslMode SSL mode to connect with. One of disabled, preferred, required, verify_ca & verify_identity. + --db-tls-min-version string Configures the minimal TLS version negotiated when SSL is enabled. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3. --detach detached mode - run backups detached from the terminal --disable-redo-log Disable InnoDB redo log during replication-from-primary phase of backup. --emit_stats If set, emit stats to push-based monitoring and stats backends @@ -152,13 +152,13 @@ Flags: --init_shard string (init parameter) shard to use for this tablet --initial_backup Instead of restoring from backup, initialize an empty database with the provided init_db_sql_file and upload a backup of that for the shard, if the shard has no backups yet. This can be used to seed a brand new shard with an initial, empty backup. If any backups already exist for the shard, this will be considered a successful no-op. This can only be done before the shard exists in topology (i.e. before any tablets are deployed). --keep-alive-timeout duration Wait until timeout elapses after a successful backup before shutting down. - --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) + --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) --lock-timeout duration Maximum time to wait when attempting to acquire a lock from the topo server (default 45s) + --log-err-stacks log stack traces for errors + --log-rotate-max-size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --log_backtrace_at traceLocations 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 log stack traces for errors - --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --logtostderr log to standard error instead of files --manifest-external-decompressor string command with arguments to store in the backup manifest when compressing a backup with an external compression engine. --min_backup_interval duration Only take a new backup if it's been at least this long since the most recent backup. @@ -182,6 +182,7 @@ Flags: --mycnf_slow_log_path string mysql slow query log path --mycnf_socket_file string mysql socket file --mycnf_tmp_dir string mysql tmp directory + --mysql-server-version string MySQL server version to advertise. (default "8.0.40-Vitess") --mysql-shell-backup-location string location where the backup will be stored --mysql-shell-dump-flags string flags to pass to mysql shell dump utility. This should be a JSON string and will be saved in the MANIFEST (default "{\"threads\": 4}") --mysql-shell-flags string execution flags to pass to mysqlsh binary to be used during dump/load (default "--defaults-file=/dev/null --js -h localhost") @@ -190,14 +191,13 @@ Flags: --mysql-shell-speedup-restore speed up restore by disabling redo logging and double write buffer during the restore process --mysql-shutdown-timeout duration how long to wait for mysqld shutdown (default 5m0s) --mysql_port int mysql port (default 3306) - --mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess") --mysql_socket string path to the mysql socket --mysql_timeout duration how long to wait for mysqld startup (default 5m0s) --opentsdb_uri string URI of opentsdb /api/put method --port int port for the server --pprof strings enable profiling --pprof-http enable pprof http endpoints - --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) + --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 15s) --restart_before_backup Perform a mysqld clean/full restart after applying binlogs, but before taking the backup. Only makes sense to work around xtrabackup bugs. --s3_backup_aws_endpoint string endpoint of the S3 backend (region must be provided). @@ -210,23 +210,23 @@ Flags: --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 skip the 'certificate is valid' check for SSL connections. - --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) + --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) --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) + --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 severityFlag 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,App}, CheckThrottler and FullStatus) (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") + --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,App}, CheckThrottler and FullStatus) (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-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. diff --git a/go/flags/endtoend/vtbench.txt b/go/flags/endtoend/vtbench.txt index ef1bcf7a08b..bdc97eed173 100644 --- a/go/flags/endtoend/vtbench.txt +++ b/go/flags/endtoend/vtbench.txt @@ -63,20 +63,20 @@ Flags: --grpc-prometheus Enable gRPC monitoring with Prometheus. -h, --help help for vtbench --host string VTGate host(s) in the form 'host1,host2,...' - --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) + --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) --log_backtrace_at traceLocations 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 log stack traces for errors - --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) + --log-err-stacks log stack traces for errors + --log-rotate-max-size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --logtostderr log to standard error instead of files - --mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess") + --mysql-server-version string MySQL server version to advertise. (default "8.0.40-Vitess") --port int VTGate port --pprof strings enable profiling --pprof-http enable pprof http endpoints --protocol string Client protocol, either mysql (default), grpc-vtgate, or grpc-vttablet (default "mysql") - --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) - --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) + --purge-logs-interval duration how often try to remove old logs (default 1h0m0s) + --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) --sql string SQL statement to execute --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) diff --git a/go/flags/endtoend/vtclient.txt b/go/flags/endtoend/vtclient.txt index aa1905d3759..7154fe460e5 100644 --- a/go/flags/endtoend/vtclient.txt +++ b/go/flags/endtoend/vtclient.txt @@ -36,22 +36,22 @@ Flags: -h, --help help for vtclient --jaeger-agent-host string host and port to send spans to. if empty, no tracing will be done --json Output JSON instead of human-readable table - --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) + --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) + --log-err-stacks log stack traces for errors + --log-rotate-max-size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --log_backtrace_at traceLocations 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 log stack traces for errors - --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --logtostderr log to standard error instead of files --max_sequence_id int max sequence ID. --min_sequence_id int min sequence ID to generate. When max_sequence_id > min_sequence_id, for each query, a number is generated in [min_sequence_id, max_sequence_id) and attached to the end of the bind variables. - --mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess") + --mysql-server-version string MySQL server version to advertise. (default "8.0.40-Vitess") --parallel int DMLs only: Number of threads executing the same query in parallel. Useful for simple load testing. (default 1) --pprof strings enable profiling --pprof-http enable pprof http endpoints - --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) + --purge-logs-interval duration how often try to remove old logs (default 1h0m0s) --qps int queries per second to throttle each thread at. - --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) + --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) --server string vtgate server to connect to --stderrthreshold severityFlag logs at or above this threshold go to stderr (default 1) --streaming use a streaming query diff --git a/go/flags/endtoend/vtcombo.txt b/go/flags/endtoend/vtcombo.txt index 49b76cea688..781ce71db08 100644 --- a/go/flags/endtoend/vtcombo.txt +++ b/go/flags/endtoend/vtcombo.txt @@ -50,6 +50,18 @@ Flags: --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 + --db-allprivs-password string db allprivs password + --db-allprivs-use-ssl Set this flag to false to make the allprivs connection to not use ssl (default true) + --db-allprivs-user string db allprivs user userKey (default "vt_allprivs") + --db-app-password string db app password + --db-app-use-ssl Set this flag to false to make the app connection to not use ssl (default true) + --db-app-user string db app user userKey (default "vt_app") + --db-appdebug-password string db appdebug password + --db-appdebug-use-ssl Set this flag to false to make the appdebug connection to not use ssl (default true) + --db-appdebug-user string db appdebug user userKey (default "vt_appdebug") + --db-charset string Character set/collation used for this tablet. Make sure to configure this to a charset/collation supported by the lowest MySQL version in your environment. (default "utf8mb4") + --db-conn-query-info enable parsing and processing of QUERY_OK info fields + --db-connect-timeout-ms int connection timeout to mysqld in milliseconds (0 for no timeout) --db-credentials-file string db credentials file; send SIGHUP to reload this file --db-credentials-server string db credentials server type ('file' - file implementation; 'vault' - HashiCorp Vault implementation) (default "file") --db-credentials-vault-addr string URL to Vault server @@ -61,42 +73,30 @@ Flags: --db-credentials-vault-tls-ca string Path to CA PEM for validating Vault server certificate --db-credentials-vault-tokenfile string Path to file containing Vault auth token; token can also be passed using VAULT_TOKEN environment variable --db-credentials-vault-ttl duration How long to cache DB credentials from the Vault server (default 30m0s) - --db_allprivs_password string db allprivs password - --db_allprivs_use_ssl Set this flag to false to make the allprivs connection to not use ssl (default true) - --db_allprivs_user string db allprivs user userKey (default "vt_allprivs") - --db_app_password string db app password - --db_app_use_ssl Set this flag to false to make the app connection to not use ssl (default true) - --db_app_user string db app user userKey (default "vt_app") - --db_appdebug_password string db appdebug password - --db_appdebug_use_ssl Set this flag to false to make the appdebug connection to not use ssl (default true) - --db_appdebug_user string db appdebug user userKey (default "vt_appdebug") - --db_charset string Character set/collation used for this tablet. Make sure to configure this to a charset/collation supported by the lowest MySQL version in your environment. (default "utf8mb4") - --db_conn_query_info enable parsing and processing of QUERY_OK info fields - --db_connect_timeout_ms int connection timeout to mysqld in milliseconds (0 for no timeout) - --db_dba_password string db dba password - --db_dba_use_ssl Set this flag to false to make the dba connection to not use ssl (default true) - --db_dba_user string db dba user userKey (default "vt_dba") - --db_erepl_password string db erepl password - --db_erepl_use_ssl Set this flag to false to make the erepl connection to not use ssl (default true) - --db_erepl_user string db erepl user userKey (default "vt_erepl") - --db_filtered_password string db filtered password - --db_filtered_use_ssl Set this flag to false to make the filtered connection to not use ssl (default true) - --db_filtered_user string db filtered user userKey (default "vt_filtered") - --db_flags uint Flag values as defined by MySQL. - --db_flavor string Flavor overrid. Valid value is FilePos. - --db_host string The host name for the tcp connection. - --db_port int tcp port - --db_repl_password string db repl password - --db_repl_use_ssl Set this flag to false to make the repl connection to not use ssl (default true) - --db_repl_user string db repl user userKey (default "vt_repl") - --db_server_name string server name of the DB we are connecting to. - --db_socket string The unix socket to connect on. If this is specified, host and port will not be used. - --db_ssl_ca string connection ssl ca - --db_ssl_ca_path string connection ssl ca path - --db_ssl_cert string connection ssl certificate - --db_ssl_key string connection ssl key - --db_ssl_mode SslMode SSL mode to connect with. One of disabled, preferred, required, verify_ca & verify_identity. - --db_tls_min_version string Configures the minimal TLS version negotiated when SSL is enabled. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3. + --db-dba-password string db dba password + --db-dba-use-ssl Set this flag to false to make the dba connection to not use ssl (default true) + --db-dba-user string db dba user userKey (default "vt_dba") + --db-erepl-password string db erepl password + --db-erepl-use-ssl Set this flag to false to make the erepl connection to not use ssl (default true) + --db-erepl-user string db erepl user userKey (default "vt_erepl") + --db-filtered-password string db filtered password + --db-filtered-use-ssl Set this flag to false to make the filtered connection to not use ssl (default true) + --db-filtered-user string db filtered user userKey (default "vt_filtered") + --db-flags uint Flag values as defined by MySQL. + --db-flavor string Flavor overrid. Valid value is FilePos. + --db-host string The host name for the tcp connection. + --db-port int tcp port + --db-repl-password string db repl password + --db-repl-use-ssl Set this flag to false to make the repl connection to not use ssl (default true) + --db-repl-user string db repl user userKey (default "vt_repl") + --db-server-name string server name of the DB we are connecting to. + --db-socket string The unix socket to connect on. If this is specified, host and port will not be used. + --db-ssl-ca string connection ssl ca + --db-ssl-ca-path string connection ssl ca path + --db-ssl-cert string connection ssl certificate + --db-ssl-key string connection ssl key + --db-ssl-mode SslMode SSL mode to connect with. One of disabled, preferred, required, verify_ca & verify_identity. + --db-tls-min-version string Configures the minimal TLS version negotiated when SSL is enabled. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3. --dba_idle_timeout duration Idle timeout for dba connections (default 1m0s) --dba_pool_size int Size of the connection pool for dba connections (default 20) --dbddl_plugin string controls how to handle CREATE/DROP DATABASE. use it if you are using your own database provisioning service (default "fail") @@ -179,18 +179,18 @@ Flags: --init_timeout duration (init parameter) timeout to use for the init phase. (default 1m0s) --jaeger-agent-host string host and port to send spans to. if empty, no tracing will be done --json_topo vttest.TopoData vttest proto definition of the topology, encoded in json format. See vttest.proto for more information. - --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) + --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) --keyspaces_to_watch strings Specifies which keyspaces this vtgate should have access to while routing queries or accessing the vschema. --lameduck-period duration keep running at least this long after SIGTERM before stopping (default 50ms) --lock-timeout duration Maximum time to wait when attempting to acquire a lock from the topo server (default 45s) --lock_heartbeat_time duration If there is lock function used. This will keep the lock connection active by using this heartbeat (default 5s) --lock_tables_timeout duration How long to keep the table locked before timing out (default 1m0s) + --log-err-stacks log stack traces for errors + --log-rotate-max-size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --log_backtrace_at traceLocations 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 log stack traces for errors --log_queries_to_file string Enable query logging to the specified file - --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --logtostderr log to standard error instead of files --manifest-external-decompressor string command with arguments to store in the backup manifest when compressing a backup with an external compression engine. --max-stack-size int configure the maximum stack size in bytes (default 67108864) @@ -217,9 +217,10 @@ Flags: --mycnf_slow_log_path string mysql slow query log path --mycnf_socket_file string mysql socket file --mycnf_tmp_dir string mysql tmp directory - --mysql-server-drain-onterm If set, the server waits for --onterm_timeout for already connected clients to complete their in flight work + --mysql-server-drain-onterm If set, the server waits for --onterm-timeout for already connected clients to complete their in flight work --mysql-server-keepalive-period duration TCP period between keep-alives --mysql-server-pool-conn-read-buffers If set, the server will pool incoming connection read buffers + --mysql-server-version string MySQL server version to advertise. (default "8.0.40-Vitess") --mysql-shell-backup-location string location where the backup will be stored --mysql-shell-dump-flags string flags to pass to mysql shell dump utility. This should be a JSON string and will be saved in the MANIFEST (default "{\"threads\": 4}") --mysql-shell-flags string execution flags to pass to mysqlsh binary to be used during dump/load (default "--defaults-file=/dev/null --js -h localhost") @@ -244,7 +245,6 @@ Flags: --mysql_server_ssl_key string Path to ssl key for mysql server plugin SSL --mysql_server_ssl_server_ca string path to server CA in PEM format, which will be combine with server cert, return full certificate chain to clients --mysql_server_tls_min_version string Configures the minimal TLS version negotiated when SSL is enabled. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3. - --mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess") --mysql_server_write_timeout duration connection write timeout --mysql_slow_connect_warn_threshold duration Warn if it takes more than the given threshold for a mysql connection to establish --mysql_tcp_version string Select tcp, tcp4, or tcp6 to control the socket type. (default "tcp") @@ -252,9 +252,9 @@ Flags: --mysqlctl_socket string socket file to use for remote mysqlctl actions (empty for local actions) --no_scatter when set to true, the planner will fail instead of producing a plan that includes scatter queries --normalize_queries Rewrite queries with bind vars. Turn this off if the app itself sends normalized queries with bind vars. (default true) - --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. + --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. --planner-version string Sets the default planner to use when the session has not changed it. Valid values are: Gen4, Gen4Greedy, Gen4Left2Right --pool_hostname_resolve_interval duration if set force an update to all hostnames and reconnect if changed, defaults to 0 (disabled) --port int port for the server @@ -264,7 +264,7 @@ Flags: --proxy_protocol Enable HAProxy PROXY protocol on MySQL listener socket --proxy_tablets Setting this true will make vtctld proxy the tablet status instead of redirecting to them --publish_retry_interval duration how long vttablet waits to retry publishing the tablet record (default 30s) - --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) + --purge-logs-interval duration how often try to remove old logs (default 1h0m0s) --query-log-stream-handler string URL handler for streaming queries log (default "/debug/querylog") --query-timeout int Sets the default query timeout (in ms). Can be overridden by session variable (query_timeout) or comment directive (QUERY_TIMEOUT_MS) --querylog-buffer-size int Maximum number of buffered query logs before throttling log output (default 10) @@ -320,9 +320,9 @@ Flags: --schema-version-max-age-seconds int max age of schema version records to kept in memory by the vreplication historian --schema_change_signal Enable the schema tracker; requires queryserver-config-schema-change-signal to be enabled on the underlying vttablets for this to work (default true) --schema_dir string Schema base directory. Should contain one directory per keyspace, with a vschema.json file if necessary. - --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) + --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) --semi-sync-monitor-interval duration How frequently the semi-sync monitor checks if the primary is blocked on semi-sync ACKs (default 10s) - --service_map strings comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice + --service-map strings comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice --serving_state_grace_period duration how long to pause after broadcasting health to vtgate, before enforcing a new serving state --shard_sync_retry_delay duration delay between retries of updates to keep the tablet and its shard record in sync (default 30s) --shutdown_grace_period duration how long to wait for queries and transactions to complete during graceful shutdown. (default 3s) @@ -332,29 +332,29 @@ Flags: --srv_topo_cache_ttl duration how long to use cached entries for topology (default 1s) --srv_topo_timeout duration topo server timeout (default 5s) --start_mysql Should vtcombo also start mysql - --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) + --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 severityFlag logs at or above this threshold go to stderr (default 1) --stream_buffer_size int the number of bytes sent from vtgate for each stream call. It's recommended to keep this value in sync with vttablet's query-server-config-stream-buffer-size. (default 32768) --stream_health_buffer_size uint max streaming health entries to buffer per streaming health client (default 20) --table-refresh-interval int interval in milliseconds to refresh tables in status page with refreshRequired class --table_gc_lifecycle string States for a DROP TABLE garbage collection cycle. Default is 'hold,purge,evac,drop', use any subset ('drop' implicitly always included) (default "hold,purge,evac,drop") + --tablet-dir string The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid. --tablet-filter-tags StringMap Specifies a comma-separated list of tablet tags (as key:value pairs) to filter the tablets to watch. - --tablet_dir string The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid. + --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,App}, CheckThrottler and FullStatus) (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") --tablet_filters strings Specifies a comma-separated list of 'keyspace|shard_name or keyrange' values to filter the tablets to watch. --tablet_health_keep_alive duration close streaming tablet health connection if there are no requests for this long (default 5m0s) --tablet_hostname string if not empty, this hostname will be assumed instead of trying to resolve it - --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,App}, CheckThrottler and FullStatus) (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") --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_types_to_wait strings Wait till connected for specified tablet types during Gateway initialization. Should be provided as a comma-separated set of tablet types. diff --git a/go/flags/endtoend/vtctlclient.txt b/go/flags/endtoend/vtctlclient.txt index 59c51918ada..9656a6495b1 100644 --- a/go/flags/endtoend/vtctlclient.txt +++ b/go/flags/endtoend/vtctlclient.txt @@ -21,19 +21,19 @@ Usage of vtctlclient: --grpc-prometheus Enable gRPC monitoring with Prometheus. -h, --help display usage and exit --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) + --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) + --log-err-stacks log stack traces for errors + --log-rotate-max-size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --log_backtrace_at traceLocations 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 log stack traces for errors --log_link string If non-empty, add symbolic links in this directory to the log files - --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --logbuflevel int Buffer log messages logged at this level or lower (-1 means don't buffer; 0 means buffer INFO only; ...). Has limited applicability on non-prod platforms. --logtostderr log to standard error instead of files --pprof strings enable profiling --pprof-http enable pprof http endpoints - --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) - --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) + --purge-logs-interval duration how often try to remove old logs (default 1h0m0s) + --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) --server string server to use for connection --stderrthreshold severityFlag logs at or above this threshold go to stderr (default 1) --tracer string tracing service to use (default "noop") diff --git a/go/flags/endtoend/vtctld.txt b/go/flags/endtoend/vtctld.txt index d7fe2f59368..337785777e2 100644 --- a/go/flags/endtoend/vtctld.txt +++ b/go/flags/endtoend/vtctld.txt @@ -3,7 +3,7 @@ It is usually the first Vitess component to be started after a valid global topo 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. +To enable this newer service, include "grpc-vtctld" in the --service-map argument. This is demonstrated in the example usage below. Usage: @@ -14,7 +14,7 @@ vtctld \ --topo-implementation etcd2 \ --topo-global-server-address localhost:2379 \ --topo-global-root /vitess/ \ - --service_map 'grpc-vtctl,grpc-vtctld' \ + --service-map 'grpc-vtctl,grpc-vtctld' \ --backup_storage_implementation file \ --file_backup_storage_root $VTDATAROOT/backups \ --port 15000 \ @@ -88,26 +88,26 @@ Flags: --grpc-server-keepalive-timeout duration After having pinged for keepalive check, the server waits for a duration of Timeout and if no activity is seen even after that the connection is closed. (default 10s) -h, --help help for vtctld --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) + --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 to wait when attempting to acquire a lock from the topo server (default 45s) + --log-err-stacks log stack traces for errors + --log-rotate-max-size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --log_backtrace_at traceLocations 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 log stack traces for errors - --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --logtostderr log to standard error instead of files --max-stack-size int configure the maximum stack size in bytes (default 67108864) - --mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess") - --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) + --mysql-server-version string MySQL server version to advertise. (default "8.0.40-Vitess") + --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) --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. + --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 --pprof-http enable pprof http endpoints --proxy_tablets 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) + --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 15s) --s3_backup_aws_endpoint string endpoint of the S3 backend (region must be provided). --s3_backup_aws_min_partsize int Minimum part size to use, defaults to 5MiB but can be increased due to the dataset size. (default 5242880) @@ -124,32 +124,32 @@ Flags: --schema_change_dir string Directory containing 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 a schema change. (default 10s) --schema_change_user string The user who schema changes are submitted on behalf of. - --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 strings comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice + --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 strings 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) + --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 severityFlag logs at or above this threshold go to stderr (default 1) --table-refresh-interval int interval in milliseconds to refresh tables in status page with refreshRequired class - --tablet_dir string The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid. + --tablet-dir string The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid. + --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,App}, CheckThrottler and FullStatus) (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") --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,App}, CheckThrottler and FullStatus) (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") --tablet_protocol string Protocol to use to make queryservice RPCs to 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) diff --git a/go/flags/endtoend/vtctldclient.txt b/go/flags/endtoend/vtctldclient.txt index 2a0279ecfbf..c7c019b2b8f 100644 --- a/go/flags/endtoend/vtctldclient.txt +++ b/go/flags/endtoend/vtctldclient.txt @@ -131,26 +131,26 @@ Flags: --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 Enable gRPC monitoring with Prometheus. -h, --help help for vtctldclient - --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) + --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) + --log-rotate-max-size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --log_backtrace_at traceLocations when logging hits line file:N, emit a stack trace --log_dir string If non-empty, write log files in this directory --log_link string If non-empty, add symbolic links in this directory to the log files - --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --logbuflevel int Buffer log messages logged at this level or lower (-1 means don't buffer; 0 means buffer INFO only; ...). Has limited applicability on non-prod platforms. --logtostderr log to standard error instead of files - --mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess") - --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) - --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) + --mysql-server-version string MySQL server version to advertise. (default "8.0.40-Vitess") + --purge-logs-interval duration how often try to remove old logs (default 1h0m0s) + --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) --server string server to use for the connection (required) --stderrthreshold severityFlag 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,App}, CheckThrottler and FullStatus) (default 8) - --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") + --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,App}, CheckThrottler and FullStatus) (default 8) + --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-global-root string the path of the global topology data in the global topology server (default "/vitess/global") --topo-global-server-address strings the address of the global topology server(s) (default [localhost:2379]) --topo-implementation string the topology implementation to use (default "etcd2") diff --git a/go/flags/endtoend/vtexplain.txt b/go/flags/endtoend/vtexplain.txt index 90013fe1b98..3c423b9535c 100644 --- a/go/flags/endtoend/vtexplain.txt +++ b/go/flags/endtoend/vtexplain.txt @@ -50,26 +50,26 @@ Flags: --default_tablet_type topodatapb.TabletType The default tablet type to set for queries, when one is not explicitly selected. (default PRIMARY) --execution-mode string The execution mode to simulate -- must be set to multi, legacy-autocommit, or twopc (default "multi") -h, --help help for vtexplain - --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) + --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) --ks-shard-map string JSON map of keyspace name -> shard name -> ShardReference object. The inner map is the same as the output of FindAllShardsInKeyspace --ks-shard-map-file string File containing json blob of keyspace name -> shard name -> ShardReference object + --log-err-stacks log stack traces for errors + --log-rotate-max-size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --log_backtrace_at traceLocations 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 log stack traces for errors - --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --logtostderr log to standard error instead of files - --mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess") + --mysql-server-version string MySQL server version to advertise. (default "8.0.40-Vitess") --normalize Whether to enable vtgate normalization --output-mode string Output in human-friendly text or json (default "text") --planner-version string Sets the default planner to use. Valid values are: Gen4, Gen4Greedy, Gen4Left2Right --pprof strings enable profiling --pprof-http enable pprof http endpoints - --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) + --purge-logs-interval duration how often try to remove old logs (default 1h0m0s) --replication-mode string The replication mode to simulate -- must be set to either ROW or STATEMENT (default "ROW") --schema string The SQL table schema --schema-file string Identifies the file that contains the SQL table schema - --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) + --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) --shards int Number of shards per keyspace. Passing --ks-shard-map/--ks-shard-map-file causes this flag to be ignored. (default 2) --sql string A list of semicolon-delimited SQL commands to analyze --sql-file string Identifies the file that contains the SQL commands to analyze diff --git a/go/flags/endtoend/vtgate.txt b/go/flags/endtoend/vtgate.txt index a835636475f..59df3f03451 100644 --- a/go/flags/endtoend/vtgate.txt +++ b/go/flags/endtoend/vtgate.txt @@ -20,8 +20,8 @@ vtgate \ --cell test \ --cells_to_watch test \ --tablet_types_to_wait PRIMARY,REPLICA \ - --service_map 'grpc-vtgateservice' \ - --pid_file $VTDATAROOT/tmp/vtgate.pid \ + --service-map 'grpc-vtgateservice' \ + --pid-file $VTDATAROOT/tmp/vtgate.pid \ --mysql_auth_server_impl none Flags: @@ -103,27 +103,28 @@ Flags: --healthcheck_timeout duration the health check timeout period (default 1m0s) -h, --help help for vtgate --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) + --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) --keyspaces_to_watch strings Specifies which keyspaces this vtgate should have access to while routing queries or accessing the vschema. --lameduck-period duration keep running at least this long after SIGTERM before stopping (default 50ms) --legacy_replication_lag_algorithm Use the legacy algorithm when selecting vttablets for serving. (default true) --lock-timeout duration Maximum time to wait when attempting to acquire a lock from the topo server (default 45s) --lock_heartbeat_time duration If there is lock function used. This will keep the lock connection active by using this heartbeat (default 5s) + --log-err-stacks log stack traces for errors + --log-rotate-max-size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --log_backtrace_at traceLocations 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 log stack traces for errors --log_queries_to_file string Enable query logging to the specified file - --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --logtostderr log to standard error instead of files --max-stack-size int configure the maximum stack size in bytes (default 67108864) --max_memory_rows int Maximum number of rows that will be held in memory for intermediate results as well as the final result. (default 300000) --max_payload_size int The threshold for query payloads in bytes. A payload greater than this threshold will result in a failure to handle the query. --message_stream_grace_period duration the amount of time to give for a vttablet to resume if it ends a message stream, usually because of a reparent. (default 30s) --min_number_serving_vttablets int The minimum number of vttablets for each replicating tablet_type (e.g. replica, rdonly) that will be continue to be used even with replication lag above discovery_low_replication_lag, but still below discovery_high_replication_lag_minimum_serving. (default 2) - --mysql-server-drain-onterm If set, the server waits for --onterm_timeout for already connected clients to complete their in flight work + --mysql-server-drain-onterm If set, the server waits for --onterm-timeout for already connected clients to complete their in flight work --mysql-server-keepalive-period duration TCP period between keep-alives --mysql-server-pool-conn-read-buffers If set, the server will pool incoming connection read buffers + --mysql-server-version string MySQL server version to advertise. (default "8.0.40-Vitess") --mysql_allow_clear_text_without_tls If set, the server will allow the use of a clear text password over non-SSL connections. --mysql_auth_server_impl string Which auth server implementation to use. Options: none, ldap, clientcert, static, vault. (default "static") --mysql_auth_server_static_file string JSON File to read the users/passwords from. @@ -156,22 +157,21 @@ Flags: --mysql_server_ssl_key string Path to ssl key for mysql server plugin SSL --mysql_server_ssl_server_ca string path to server CA in PEM format, which will be combine with server cert, return full certificate chain to clients --mysql_server_tls_min_version string Configures the minimal TLS version negotiated when SSL is enabled. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3. - --mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess") --mysql_server_write_timeout duration connection write timeout --mysql_slow_connect_warn_threshold duration Warn if it takes more than the given threshold for a mysql connection to establish --mysql_tcp_version string Select tcp, tcp4, or tcp6 to control the socket type. (default "tcp") --no_scatter when set to true, the planner will fail instead of producing a plan that includes scatter queries --normalize_queries Rewrite queries with bind vars. Turn this off if the app itself sends normalized queries with bind vars. (default true) - --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) + --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) --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. + --pid-file string If set, the process will write its pid to the named file, and delete it on graceful shutdown. --planner-version string Sets the default planner to use when the session has not changed it. Valid values are: Gen4, Gen4Greedy, Gen4Left2Right --port int port for the server --pprof strings enable profiling --pprof-http enable pprof http endpoints --proxy_protocol Enable HAProxy PROXY protocol on MySQL listener socket - --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) + --purge-logs-interval duration how often try to remove old logs (default 1h0m0s) --query-timeout int Sets the default query timeout (in ms). Can be overridden by session variable (query_timeout) or comment directive (QUERY_TIMEOUT_MS) --querylog-buffer-size int Maximum number of buffered query logs before throttling log output (default 10) --querylog-filter-tag string string that must be present in the query for it to be logged; if using a value as the tag, you need to disable query normalization @@ -183,18 +183,18 @@ Flags: --remote_operation_timeout duration time to wait for a remote operation (default 15s) --retry-count int retry count (default 2) --schema_change_signal Enable the schema tracker; requires queryserver-config-schema-change-signal to be enabled on the underlying vttablets for this to work (default true) - --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 strings comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice + --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 strings 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) --srv_topo_cache_refresh duration how frequently to refresh the topology for cached entries (default 1s) --srv_topo_cache_ttl duration how long to use cached entries for topology (default 1s) --srv_topo_timeout duration topo server timeout (default 5s) - --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) + --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) --statsd_address string Address for statsd client --statsd_sample_rate float Sample rate for statsd metrics (default 1) --stderrthreshold severityFlag logs at or above this threshold go to stderr (default 1) diff --git a/go/flags/endtoend/vtgateclienttest.txt b/go/flags/endtoend/vtgateclienttest.txt index 59e5f21da0e..326406686f8 100644 --- a/go/flags/endtoend/vtgateclienttest.txt +++ b/go/flags/endtoend/vtgateclienttest.txt @@ -44,25 +44,25 @@ Flags: --grpc-server-keepalive-time duration After a duration of this time, if the server doesn't see any activity, it pings the client to see if the transport is still alive. (default 10s) --grpc-server-keepalive-timeout duration After having pinged for keepalive check, the server waits for a duration of Timeout and if no activity is seen even after that the connection is closed. (default 10s) -h, --help help for vtgateclienttest - --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) + --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-err-stacks log stack traces for errors + --log-rotate-max-size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --log_backtrace_at traceLocations 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 log stack traces for errors - --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --logtostderr log to standard error instead of files --max-stack-size int configure the maximum stack size in bytes (default 67108864) - --mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess") - --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. + --mysql-server-version string MySQL server version to advertise. (default "8.0.40-Vitess") + --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 --pprof-http enable pprof http endpoints - --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) - --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 strings comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice + --purge-logs-interval duration how often try to remove old logs (default 1h0m0s) + --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 strings comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice --stderrthreshold severityFlag logs at or above this threshold go to stderr (default 1) --table-refresh-interval int interval in milliseconds to refresh tables in status page with refreshRequired class --v Level log level for V logs diff --git a/go/flags/endtoend/vtorc.txt b/go/flags/endtoend/vtorc.txt index 44246e91386..8e1cad885bb 100644 --- a/go/flags/endtoend/vtorc.txt +++ b/go/flags/endtoend/vtorc.txt @@ -49,46 +49,46 @@ Flags: --grpc-prometheus Enable gRPC monitoring with Prometheus. -h, --help help for vtorc --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) + --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 to wait when attempting to acquire a lock from the topo server (default 45s) + --log-err-stacks log stack traces for errors + --log-rotate-max-size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --log_backtrace_at traceLocations 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 log stack traces for errors - --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --logtostderr 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 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. + --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 --pprof-http enable pprof http endpoints --prevent-cross-cell-failover 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) + --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-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) + --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") - --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) + --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 severityFlag logs at or above this threshold go to stderr (default 1) --table-refresh-interval int interval in milliseconds to refresh tables in status page with refreshRequired class - --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,App}, CheckThrottler and FullStatus) (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") + --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,App}, CheckThrottler and FullStatus) (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") --tolerable-replication-lag duration Amount of replication lag that is considered acceptable for a tablet to be eligible for promotion when Vitess makes the choice of a new primary in PRS --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") diff --git a/go/flags/endtoend/vttablet.txt b/go/flags/endtoend/vttablet.txt index d2a8cca67b2..3fa98e68f4e 100644 --- a/go/flags/endtoend/vttablet.txt +++ b/go/flags/endtoend/vttablet.txt @@ -36,7 +36,7 @@ vttablet \ --init_tablet_type $tablet_type \ --port $port \ --grpc-port $grpc_port \ - --service_map 'grpc-queryservice,grpc-tabletmanager,grpc-updatestream' + --service-map 'grpc-queryservice,grpc-tabletmanager,grpc-updatestream' `$alias` needs to be of the form: `-id`, and the cell should match one of the local cells that was created in the topology. The id can be left padded with zeroes: `cell-100` and `cell-000000100` are synonymous. @@ -84,6 +84,18 @@ Flags: --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 + --db-allprivs-password string db allprivs password + --db-allprivs-use-ssl Set this flag to false to make the allprivs connection to not use ssl (default true) + --db-allprivs-user string db allprivs user userKey (default "vt_allprivs") + --db-app-password string db app password + --db-app-use-ssl Set this flag to false to make the app connection to not use ssl (default true) + --db-app-user string db app user userKey (default "vt_app") + --db-appdebug-password string db appdebug password + --db-appdebug-use-ssl Set this flag to false to make the appdebug connection to not use ssl (default true) + --db-appdebug-user string db appdebug user userKey (default "vt_appdebug") + --db-charset string Character set/collation used for this tablet. Make sure to configure this to a charset/collation supported by the lowest MySQL version in your environment. (default "utf8mb4") + --db-conn-query-info enable parsing and processing of QUERY_OK info fields + --db-connect-timeout-ms int connection timeout to mysqld in milliseconds (0 for no timeout) --db-credentials-file string db credentials file; send SIGHUP to reload this file --db-credentials-server string db credentials server type ('file' - file implementation; 'vault' - HashiCorp Vault implementation) (default "file") --db-credentials-vault-addr string URL to Vault server @@ -95,42 +107,30 @@ Flags: --db-credentials-vault-tls-ca string Path to CA PEM for validating Vault server certificate --db-credentials-vault-tokenfile string Path to file containing Vault auth token; token can also be passed using VAULT_TOKEN environment variable --db-credentials-vault-ttl duration How long to cache DB credentials from the Vault server (default 30m0s) - --db_allprivs_password string db allprivs password - --db_allprivs_use_ssl Set this flag to false to make the allprivs connection to not use ssl (default true) - --db_allprivs_user string db allprivs user userKey (default "vt_allprivs") - --db_app_password string db app password - --db_app_use_ssl Set this flag to false to make the app connection to not use ssl (default true) - --db_app_user string db app user userKey (default "vt_app") - --db_appdebug_password string db appdebug password - --db_appdebug_use_ssl Set this flag to false to make the appdebug connection to not use ssl (default true) - --db_appdebug_user string db appdebug user userKey (default "vt_appdebug") - --db_charset string Character set/collation used for this tablet. Make sure to configure this to a charset/collation supported by the lowest MySQL version in your environment. (default "utf8mb4") - --db_conn_query_info enable parsing and processing of QUERY_OK info fields - --db_connect_timeout_ms int connection timeout to mysqld in milliseconds (0 for no timeout) - --db_dba_password string db dba password - --db_dba_use_ssl Set this flag to false to make the dba connection to not use ssl (default true) - --db_dba_user string db dba user userKey (default "vt_dba") - --db_erepl_password string db erepl password - --db_erepl_use_ssl Set this flag to false to make the erepl connection to not use ssl (default true) - --db_erepl_user string db erepl user userKey (default "vt_erepl") - --db_filtered_password string db filtered password - --db_filtered_use_ssl Set this flag to false to make the filtered connection to not use ssl (default true) - --db_filtered_user string db filtered user userKey (default "vt_filtered") - --db_flags uint Flag values as defined by MySQL. - --db_flavor string Flavor overrid. Valid value is FilePos. - --db_host string The host name for the tcp connection. - --db_port int tcp port - --db_repl_password string db repl password - --db_repl_use_ssl Set this flag to false to make the repl connection to not use ssl (default true) - --db_repl_user string db repl user userKey (default "vt_repl") - --db_server_name string server name of the DB we are connecting to. - --db_socket string The unix socket to connect on. If this is specified, host and port will not be used. - --db_ssl_ca string connection ssl ca - --db_ssl_ca_path string connection ssl ca path - --db_ssl_cert string connection ssl certificate - --db_ssl_key string connection ssl key - --db_ssl_mode SslMode SSL mode to connect with. One of disabled, preferred, required, verify_ca & verify_identity. - --db_tls_min_version string Configures the minimal TLS version negotiated when SSL is enabled. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3. + --db-dba-password string db dba password + --db-dba-use-ssl Set this flag to false to make the dba connection to not use ssl (default true) + --db-dba-user string db dba user userKey (default "vt_dba") + --db-erepl-password string db erepl password + --db-erepl-use-ssl Set this flag to false to make the erepl connection to not use ssl (default true) + --db-erepl-user string db erepl user userKey (default "vt_erepl") + --db-filtered-password string db filtered password + --db-filtered-use-ssl Set this flag to false to make the filtered connection to not use ssl (default true) + --db-filtered-user string db filtered user userKey (default "vt_filtered") + --db-flags uint Flag values as defined by MySQL. + --db-flavor string Flavor overrid. Valid value is FilePos. + --db-host string The host name for the tcp connection. + --db-port int tcp port + --db-repl-password string db repl password + --db-repl-use-ssl Set this flag to false to make the repl connection to not use ssl (default true) + --db-repl-user string db repl user userKey (default "vt_repl") + --db-server-name string server name of the DB we are connecting to. + --db-socket string The unix socket to connect on. If this is specified, host and port will not be used. + --db-ssl-ca string connection ssl ca + --db-ssl-ca-path string connection ssl ca path + --db-ssl-cert string connection ssl certificate + --db-ssl-key string connection ssl key + --db-ssl-mode SslMode SSL mode to connect with. One of disabled, preferred, required, verify_ca & verify_identity. + --db-tls-min-version string Configures the minimal TLS version negotiated when SSL is enabled. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3. --dba_idle_timeout duration Idle timeout for dba connections (default 1m0s) --dba_pool_size int Size of the connection pool for dba connections (default 20) --degraded_threshold duration replication lag after which a replica is considered degraded (default 30s) @@ -206,17 +206,17 @@ Flags: --init_tags StringMap (init parameter) comma separated list of key:value pairs used to tag the tablet --init_timeout duration (init parameter) timeout to use for the init phase. (default 1m0s) --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) + --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 to wait when attempting to acquire a lock from the topo server (default 45s) --lock_tables_timeout duration How long to keep the table locked before timing out (default 1m0s) + --log-err-stacks log stack traces for errors + --log-rotate-max-size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --log_backtrace_at traceLocations 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 log stack traces for errors --log_queries Enable query logging to syslog. --log_queries_to_file string Enable query logging to the specified file - --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --logtostderr log to standard error instead of files --manifest-external-decompressor string command with arguments to store in the backup manifest when compressing a backup with an external compression engine. --max-stack-size int configure the maximum stack size in bytes (default 67108864) @@ -240,6 +240,7 @@ Flags: --mycnf_slow_log_path string mysql slow query log path --mycnf_socket_file string mysql socket file --mycnf_tmp_dir string mysql tmp directory + --mysql-server-version string MySQL server version to advertise. (default "8.0.40-Vitess") --mysql-shell-backup-location string location where the backup will be stored --mysql-shell-dump-flags string flags to pass to mysql shell dump utility. This should be a JSON string and will be saved in the MANIFEST (default "{\"threads\": 4}") --mysql-shell-flags string execution flags to pass to mysqlsh binary to be used during dump/load (default "--defaults-file=/dev/null --js -h localhost") @@ -247,19 +248,18 @@ Flags: --mysql-shell-should-drain decide if we should drain while taking a backup or continue to serving traffic --mysql-shell-speedup-restore speed up restore by disabling redo logging and double write buffer during the restore process --mysql-shutdown-timeout duration timeout to use when MySQL is being shut down. (default 5m0s) - --mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess") --mysqlctl_mycnf_template string template file to use for generating the my.cnf file during server init --mysqlctl_socket string socket file to use for remote mysqlctl actions (empty for local actions) - --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) + --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) --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. + --pid-file string If set, the process will write its pid to the named file, and delete it on graceful shutdown. --pool_hostname_resolve_interval duration if set force an update to all hostnames and reconnect if changed, defaults to 0 (disabled) --port int port for the server --pprof strings enable profiling --pprof-http enable pprof http endpoints --publish_retry_interval duration how long vttablet waits to retry publishing the tablet record (default 30s) - --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) + --purge-logs-interval duration how often try to remove old logs (default 1h0m0s) --query-log-stream-handler string URL handler for streaming queries log (default "/debug/querylog") --querylog-filter-tag string string that must be present in the query for it to be logged; if using a value as the tag, you need to disable query normalization --querylog-format string format for query logs ("text" or "json") (default "text") @@ -321,9 +321,9 @@ Flags: --sanitize_log_messages Remove potentially sensitive information in tablet INFO, WARNING, and ERROR log messages such as query parameters. --schema-change-reload-timeout duration query server schema change reload timeout, this is how long to wait for the signaled schema reload operation to complete before giving up (default 30s) --schema-version-max-age-seconds int max age of schema version records to kept in memory by the vreplication historian - --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) + --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) --semi-sync-monitor-interval duration How frequently the semi-sync monitor checks if the primary is blocked on semi-sync ACKs (default 10s) - --service_map strings comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice + --service-map strings comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice --serving_state_grace_period duration how long to pause after broadcasting health to vtgate, before enforcing a new serving state --shard_sync_retry_delay duration delay between retries of updates to keep the tablet and its shard record in sync (default 30s) --shutdown_grace_period duration how long to wait for queries and transactions to complete during graceful shutdown. (default 3s) @@ -332,11 +332,11 @@ Flags: --srv_topo_cache_refresh duration how frequently to refresh the topology for cached entries (default 1s) --srv_topo_cache_ttl duration how long to use cached entries for topology (default 1s) --srv_topo_timeout duration topo server timeout (default 5s) - --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) + --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) --statsd_address string Address for statsd client --statsd_sample_rate float Sample rate for statsd metrics (default 1) --stderrthreshold severityFlag logs at or above this threshold go to stderr (default 1) @@ -345,23 +345,23 @@ Flags: --table-acl-config-reload-interval duration Ticker to reload ACLs. Duration flag, format e.g.: 30s. Default: do not reload --table-refresh-interval int interval in milliseconds to refresh tables in status page with refreshRequired class --table_gc_lifecycle string States for a DROP TABLE garbage collection cycle. Default is 'hold,purge,evac,drop', use any subset ('drop' implicitly always included) (default "hold,purge,evac,drop") + --tablet-dir string The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid. + --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,App}, CheckThrottler and FullStatus) (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") --tablet-path string tablet alias --tablet_config string YAML file config for tablet - --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_hostname string if not empty, this hostname will be assumed instead of trying to resolve it - --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,App}, CheckThrottler and FullStatus) (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") --tablet_protocol string Protocol to use to make queryservice RPCs to vttablets. (default "grpc") --throttle_tablet_types string Comma separated VTTablet types to be considered by the throttler. default: 'replica'. example: 'replica,rdonly'. 'replica' always implicitly included (default "replica") --topo-consul-lock-delay duration LockDelay for consul session. (default 15s) diff --git a/go/flags/endtoend/vttestserver.txt b/go/flags/endtoend/vttestserver.txt index b52096e496c..88821ea3f87 100644 --- a/go/flags/endtoend/vttestserver.txt +++ b/go/flags/endtoend/vttestserver.txt @@ -75,19 +75,20 @@ Flags: -h, --help help for vttestserver --initialize-with-vt-dba-tcp If this flag is enabled, MySQL will be initialized with an additional user named vt_dba_tcp, who will have access via TCP/IP connection. --initialize_with_random_data If this flag is each table-shard will be initialized with random data. See also the 'rng_seed' and 'min_shard_size' and 'max_shard_size' flags. - --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) + --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) --keyspaces strings Comma separated list of keyspaces (default [test_keyspace]) --lameduck-period duration keep running at least this long after SIGTERM before stopping (default 50ms) + --log-err-stacks log stack traces for errors + --log-rotate-max-size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --log_backtrace_at traceLocations 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 log stack traces for errors - --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --logtostderr log to standard error instead of files --manifest-external-decompressor string command with arguments to store in the backup manifest when compressing a backup with an external compression engine. --max-stack-size int configure the maximum stack size in bytes (default 67108864) --max_table_shard_size int The maximum number of initial rows in a table shard. Ignored if--initialize_with_random_data is false. The actual number is chosen randomly (default 10000) --min_table_shard_size int The minimum number of initial rows in a table shard. Ignored if--initialize_with_random_data is false. The actual number is chosen randomly. (default 1000) + --mysql-server-version string MySQL server version to advertise. (default "8.0.40-Vitess") --mysql-shell-backup-location string location where the backup will be stored --mysql-shell-dump-flags string flags to pass to mysql shell dump utility. This should be a JSON string and will be saved in the MANIFEST (default "{\"threads\": 4}") --mysql-shell-flags string execution flags to pass to mysqlsh binary to be used during dump/load (default "--defaults-file=/dev/null --js -h localhost") @@ -96,46 +97,45 @@ Flags: --mysql-shell-speedup-restore speed up restore by disabling redo logging and double write buffer during the restore process --mysql_bind_host string which host to bind vtgate mysql listener to (default "localhost") --mysql_only If this flag is set only mysql is initialized. The rest of the vitess components are not started. Also, the output specifies the mysql unix socket instead of the vtgate port. - --mysql_server_version string MySQL server version to advertise. (default "8.0.40-Vitess") --mysqlctl_mycnf_template string template file to use for generating the my.cnf file during server init --mysqlctl_socket string socket file to use for remote mysqlctl actions (empty for local actions) --no_scatter when set to true, the planner will fail instead of producing a plan that includes scatter queries --null_probability float The probability to initialize a field with 'NULL' if --initialize_with_random_data is true. Only applies to fields that can contain NULL values. (default 0.1) --num_shards strings Comma separated shard count (one per keyspace) (default [2]) - --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) + --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) --persistent_mode If this flag is set, the MySQL data directory is not cleaned up when LocalCluster.TearDown() is called. This is useful for running vttestserver as a database container in local developer environments. Note that db migration files (--schema_dir option) and seeding of random data (--initialize_with_random_data option) will only run during cluster startup if the data directory does not already exist. Changes to VSchema are persisted across cluster restarts using a simple watcher if the --data_dir argument is specified. - --pid_file string If set, the process will write its pid to the named file, and delete it on graceful shutdown. + --pid-file string If set, the process will write its pid to the named file, and delete it on graceful shutdown. --planner-version string Sets the default planner to use when the session has not changed it. Valid values are: Gen4, Gen4Greedy, Gen4Left2Right --pool_hostname_resolve_interval duration if set force an update to all hostnames and reconnect if changed, defaults to 0 (disabled) --port int Port to use for vtcombo. If this is 0, a random port will be chosen. --pprof strings enable profiling --pprof-http enable pprof http endpoints --proto_topo string Define the fake cluster topology as a compact text format encoded vttest proto. See vttest.proto for more information. - --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) + --purge-logs-interval duration how often try to remove old logs (default 1h0m0s) --queryserver-config-transaction-timeout duration query server transaction timeout, a transaction will be killed if it takes longer than this value (default 30s) --rdonly_count int Rdonly tablets per shard (default 1) --replica_count int Replica tablets per shard (includes primary) (default 2) --replication_connect_retry duration how long to wait in between replica reconnect attempts. Only precise to the second. (default 10s) --rng_seed int The random number generator seed to use when initializing with random data (see also --initialize_with_random_data). Multiple runs with the same seed will result with the same initial data. (default 123) --schema_dir string Directory for initial schema files. Within this dir, there should be a subdir for each keyspace. Within each keyspace dir, each file is executed as SQL after the database is created on each shard. If the directory contains a vschema.json file, it will be used as the vschema for the V3 API. - --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 strings comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice + --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 strings comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice --snapshot_file string A MySQL DB snapshot file --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) --stderrthreshold severityFlag logs at or above this threshold go to stderr (default 1) --table-refresh-interval int interval in milliseconds to refresh tables in status page with refreshRequired class - --tablet_dir string The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid. + --tablet-dir string The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid. + --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,App}, CheckThrottler and FullStatus) (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") --tablet_hostname string The hostname to use for the tablet otherwise it will be derived from OS' hostname (default "localhost") - --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,App}, CheckThrottler and FullStatus) (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") --tablet_refresh_interval duration Interval at which vtgate refreshes tablet information from topology server. (default 10s) --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") diff --git a/go/flags/endtoend/zk.txt b/go/flags/endtoend/zk.txt index add1b6b6803..91d0c053f63 100644 --- a/go/flags/endtoend/zk.txt +++ b/go/flags/endtoend/zk.txt @@ -31,11 +31,11 @@ Available Commands: Flags: -h, --help help for zk - --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) - --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) - --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) - --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) + --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) + --log-rotate-max-size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) + --purge-logs-interval duration how often try to remove old logs (default 1h0m0s) + --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) --server string server(s) to connect to Use "zk [command] --help" for more information about a command. diff --git a/go/flags/endtoend/zkctl.txt b/go/flags/endtoend/zkctl.txt index b89528766d8..178d552fd8f 100644 --- a/go/flags/endtoend/zkctl.txt +++ b/go/flags/endtoend/zkctl.txt @@ -20,16 +20,16 @@ Flags: --config-persistence-min-interval duration minimum interval between persisting dynamic config changes back to disk (if no change has occurred, nothing is done). (default 1s) --config-type string Config file type (omit to infer config type from file extension). -h, --help help for zkctl - --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) + --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) + --log-err-stacks log stack traces for errors + --log-rotate-max-size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --log_backtrace_at traceLocations 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 log stack traces for errors - --log_rotate_max_size uint size in bytes at which logs are rotated (glog.MaxSize) (default 1887436800) --logtostderr log to standard error instead of files --pprof strings enable profiling --pprof-http enable pprof http endpoints - --purge_logs_interval duration how often try to remove old logs (default 1h0m0s) + --purge-logs-interval duration how often try to remove old logs (default 1h0m0s) --stderrthreshold severityFlag logs at or above this threshold go to stderr (default 1) --v Level log level for V logs -v, --version print binary version diff --git a/go/mysql/conn_params.go b/go/mysql/conn_params.go index 46e733f6021..b4087fa0ff3 100644 --- a/go/mysql/conn_params.go +++ b/go/mysql/conn_params.go @@ -38,7 +38,7 @@ type ConnParams struct { // The following SSL flags control the SSL behavior. // // Not setting this value implies preferred mode unless - // the CapabilityClientSSL bit is set in db_flags. In the + // the CapabilityClientSSL bit is set in db-flags. In the // flag is set, it ends up equivalent to verify_identity mode. SslMode vttls.SslMode SslCa string @@ -93,7 +93,7 @@ func (cp *ConnParams) EnableClientFoundRows() { // SslRequired returns whether the connection parameters // define that SSL is a requirement. If SslMode is set, it uses // that to determine this, if it's not set it falls back to -// the legacy db_flags behavior. +// the legacy db-flags behavior. func (cp *ConnParams) SslRequired() bool { mode := cp.EffectiveSslMode() return mode != vttls.Disabled && mode != vttls.Preferred @@ -101,7 +101,7 @@ func (cp *ConnParams) SslRequired() bool { // EffectiveSslMode computes the effective SslMode. If SslMode // is explicitly set, it uses that to determine this, if it's -// not set it falls back to the legacy db_flags behavior. +// not set it falls back to the legacy db-flags behavior. func (cp *ConnParams) EffectiveSslMode() vttls.SslMode { if cp.SslMode == "" { if (cp.Flags & CapabilityClientSSL) > 0 { diff --git a/go/pools/smartconnpool/pool.go b/go/pools/smartconnpool/pool.go index 7e4b296e634..3914bda943b 100644 --- a/go/pools/smartconnpool/pool.go +++ b/go/pools/smartconnpool/pool.go @@ -401,7 +401,7 @@ func (pool *ConnPool[C]) put(conn *Pooled[C]) { if conn == nil { var err error // Using context.Background() is fine since MySQL connection already enforces - // a connect timeout via the `db_connect_timeout_ms` config param. + // a connect timeout via the `db-connect-timeout-ms` config param. conn, err = pool.connNew(context.Background()) if err != nil { pool.closedConn() @@ -415,7 +415,7 @@ func (pool *ConnPool[C]) put(conn *Pooled[C]) { pool.Metrics.maxLifetimeClosed.Add(1) conn.Close() // Using context.Background() is fine since MySQL connection already enforces - // a connect timeout via the `db_connect_timeout_ms` config param. + // a connect timeout via the `db-connect-timeout-ms` config param. if err := pool.connReopen(context.Background(), conn, conn.timeUsed.get()); err != nil { pool.closedConn() return @@ -775,7 +775,7 @@ func (pool *ConnPool[C]) closeIdleResources(now time.Time) { pool.Metrics.idleClosed.Add(1) conn.Close() // Using context.Background() is fine since MySQL connection already enforces - // a connect timeout via the `db_connect_timeout_ms` config param. + // a connect timeout via the `db-connect-timeout-ms` config param. if err := pool.connReopen(context.Background(), conn, mono); err != nil { pool.closedConn() } diff --git a/go/stats/export.go b/go/stats/export.go index dee087dd3c5..1211f34b4a0 100644 --- a/go/stats/export.go +++ b/go/stats/export.go @@ -40,6 +40,7 @@ import ( "github.com/spf13/pflag" "vitess.io/vitess/go/vt/log" + "vitess.io/vitess/go/vt/utils" ) var ( @@ -56,11 +57,12 @@ var CommonTags []string func RegisterFlags(fs *pflag.FlagSet) { fs.BoolVar(&emitStats, "emit_stats", emitStats, "If set, emit stats to push-based monitoring and stats backends") - fs.DurationVar(&statsEmitPeriod, "stats_emit_period", statsEmitPeriod, "Interval between emitting stats to all registered backends") - fs.StringVar(&statsBackend, "stats_backend", statsBackend, "The name of the registered push-based monitoring/stats backend to use") - fs.StringVar(&combineDimensions, "stats_combine_dimensions", combineDimensions, `List of dimensions to be combined into a single "all" value in exported stats vars`) - fs.StringVar(&dropVariables, "stats_drop_variables", dropVariables, `Variables to be dropped from the list of exported variables.`) - fs.StringSliceVar(&CommonTags, "stats_common_tags", CommonTags, `Comma-separated list of common tags for the stats backend. It provides both label and values. Example: label1:value1,label2:value2`) + + utils.SetFlagDurationVar(fs, &statsEmitPeriod, "stats-emit-period", statsEmitPeriod, "Interval between emitting stats to all registered backends") + utils.SetFlagStringVar(fs, &statsBackend, "stats-backend", statsBackend, "The name of the registered push-based monitoring/stats backend to use") + utils.SetFlagStringVar(fs, &combineDimensions, "stats-combine-dimensions", combineDimensions, `List of dimensions to be combined into a single "all" value in exported stats vars`) + utils.SetFlagStringVar(fs, &dropVariables, "stats-drop-variables", dropVariables, `Variables to be dropped from the list of exported variables.`) + utils.SetFlagStringSliceVar(fs, &CommonTags, "stats-common-tags", CommonTags, `Comma-separated list of common tags for the stats backend. It provides both label and values. Example: label1:value1,label2:value2`) } // StatsAllStr is the consolidated name if a dimension gets combined. diff --git a/go/test/endtoend/backup/vtbackup/backup_only_test.go b/go/test/endtoend/backup/vtbackup/backup_only_test.go index 0ad25301af0..ec6cc4f83fe 100644 --- a/go/test/endtoend/backup/vtbackup/backup_only_test.go +++ b/go/test/endtoend/backup/vtbackup/backup_only_test.go @@ -36,6 +36,7 @@ import ( "vitess.io/vitess/go/test/endtoend/cluster" "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/mysqlctl" + "vitess.io/vitess/go/vt/utils" ) var ( @@ -242,7 +243,7 @@ func startVtBackup(t *testing.T, initialBackup bool, restartBeforeBackup, disabl "--mysql_socket", mysqlSocket.Name(), // Use opentsdb for stats. - "--stats_backend", "opentsdb", + utils.GetFlagVariantForTests("--stats-backend"), "opentsdb", // Write stats to file for reading afterwards. "--opentsdb_uri", fmt.Sprintf("file://%s", statsPath), } diff --git a/go/test/endtoend/cluster/vtgate_process.go b/go/test/endtoend/cluster/vtgate_process.go index 2bac9ad1720..fa62a5794a6 100644 --- a/go/test/endtoend/cluster/vtgate_process.go +++ b/go/test/endtoend/cluster/vtgate_process.go @@ -173,6 +173,7 @@ func (vtgate *VtgateProcess) Setup() (err error) { // mysql server version on that. msvflag := false for _, f := range vtgate.ExtraArgs { + // TODO: Replace flag with dashed version in v25 if strings.Contains(f, "mysql_server_version") { msvflag = true break @@ -201,6 +202,7 @@ func (vtgate *VtgateProcess) Setup() (err error) { return err } mysqlvers := fmt.Sprintf("%d.%d.%d-vitess", vers.Major, vers.Minor, vers.Patch) + // TODO: Replace flag with dashed version in v25 args = append(args, "--mysql_server_version", mysqlvers) } if vtgate.PlannerVersion > 0 { diff --git a/go/test/endtoend/cluster/vttablet_process.go b/go/test/endtoend/cluster/vttablet_process.go index 763465a78ac..dc3625d82ec 100644 --- a/go/test/endtoend/cluster/vttablet_process.go +++ b/go/test/endtoend/cluster/vttablet_process.go @@ -127,6 +127,7 @@ func (vttablet *VttabletProcess) Setup() (err error) { if vttablet.SupportsBackup { vttablet.proc.Args = append(vttablet.proc.Args, "--restore_from_backup") } + //TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation if vttablet.DbFlavor != "" { vttablet.proc.Args = append(vttablet.proc.Args, fmt.Sprintf("--db_flavor=%s", vttablet.DbFlavor)) } diff --git a/go/test/endtoend/encryption/encryptedreplication/encrypted_replication_test.go b/go/test/endtoend/encryption/encryptedreplication/encrypted_replication_test.go index 0d47f8fad4d..790b4570932 100644 --- a/go/test/endtoend/encryption/encryptedreplication/encrypted_replication_test.go +++ b/go/test/endtoend/encryption/encryptedreplication/encrypted_replication_test.go @@ -29,6 +29,7 @@ import ( "vitess.io/vitess/go/test/endtoend/cluster" "vitess.io/vitess/go/test/endtoend/encryption" "vitess.io/vitess/go/vt/log" + "vitess.io/vitess/go/vt/utils" ) var ( @@ -60,10 +61,11 @@ func testReplicationBase(t *testing.T, isClientCertPassed bool) { replicaTablet := *clusterInstance.Keyspaces[0].Shards[0].Vttablets[1] if isClientCertPassed { - replicaTablet.VttabletProcess.ExtraArgs = append(replicaTablet.VttabletProcess.ExtraArgs, "--db_flags", "2048", - "--db_ssl_ca", path.Join(certDirectory, "ca-cert.pem"), - "--db_ssl_cert", path.Join(certDirectory, "client-cert.pem"), - "--db_ssl_key", path.Join(certDirectory, "client-key.pem"), + replicaTablet.VttabletProcess.ExtraArgs = append(replicaTablet.VttabletProcess.ExtraArgs, + utils.GetFlagVariantForTests("--db-flags"), "2048", + utils.GetFlagVariantForTests("--db-ssl-ca"), path.Join(certDirectory, "ca-cert.pem"), + utils.GetFlagVariantForTests("--db-ssl-cert"), path.Join(certDirectory, "client-cert.pem"), + "--db-ssl-key", path.Join(certDirectory, "client-key.pem"), ) } diff --git a/go/test/endtoend/encryption/encryptedtransport/encrypted_transport_test.go b/go/test/endtoend/encryption/encryptedtransport/encrypted_transport_test.go index cf54dc4aa69..36e1c725b1b 100644 --- a/go/test/endtoend/encryption/encryptedtransport/encrypted_transport_test.go +++ b/go/test/endtoend/encryption/encryptedtransport/encrypted_transport_test.go @@ -435,10 +435,10 @@ func serverExtraArguments(name string, ca string) []string { func tmclientExtraArgs(name string) []string { ca := "vttablet-server" - var args = []string{"--tablet_manager_grpc_cert", certDirectory + "/" + name + "-cert.pem", - "--tablet_manager_grpc_key", certDirectory + "/" + name + "-key.pem", - "--tablet_manager_grpc_ca", certDirectory + "/" + ca + "-cert.pem", - "--tablet_manager_grpc_server_name", "vttablet server instance"} + var args = []string{"--tablet-manager-grpc-cert", certDirectory + "/" + name + "-cert.pem", + "--tablet-manager-grpc-key", certDirectory + "/" + name + "-key.pem", + "--tablet-manager-grpc-ca", certDirectory + "/" + ca + "-cert.pem", + "--tablet-manager-grpc-server-name", "vttablet server instance"} return args } diff --git a/go/test/endtoend/mysqlserver/main_test.go b/go/test/endtoend/mysqlserver/main_test.go index a35c96030b9..200dbc89a7c 100644 --- a/go/test/endtoend/mysqlserver/main_test.go +++ b/go/test/endtoend/mysqlserver/main_test.go @@ -25,6 +25,7 @@ import ( "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/test/endtoend/cluster" + "vitess.io/vitess/go/vt/utils" ) var ( @@ -112,7 +113,7 @@ func TestMain(m *testing.M) { "--mysql_server_query_timeout", "1s", "--mysql_auth_server_impl", "static", "--mysql_auth_server_static_file", clusterInstance.TmpDirectory + mysqlAuthServerStatic, - "--mysql_server_version", "8.0.16-7", + utils.GetFlagVariantForTests("--mysql-server-version"), "8.0.16-7", "--warn_sharded_only=true", } diff --git a/go/test/endtoend/tabletmanager/tablet_health_test.go b/go/test/endtoend/tabletmanager/tablet_health_test.go index 061528682d2..acfab5f01a8 100644 --- a/go/test/endtoend/tabletmanager/tablet_health_test.go +++ b/go/test/endtoend/tabletmanager/tablet_health_test.go @@ -35,6 +35,7 @@ import ( "vitess.io/vitess/go/test/endtoend/utils" querypb "vitess.io/vitess/go/vt/proto/query" topodatapb "vitess.io/vitess/go/vt/proto/topodata" + vtutils "vitess.io/vitess/go/vt/utils" ) // TabletReshuffle test if a vttablet can be pointed at an existing mysql @@ -64,7 +65,7 @@ func TestTabletReshuffle(t *testing.T) { clusterInstance.VtTabletExtraArgs = []string{ "--lock_tables_timeout", "5s", "--mycnf_server_id", fmt.Sprintf("%d", rTablet.TabletUID), - "--db_socket", fmt.Sprintf("%s/mysql.sock", primaryTablet.VttabletProcess.Directory), + vtutils.GetFlagVariantForTests("--db-socket"), fmt.Sprintf("%s/mysql.sock", primaryTablet.VttabletProcess.Directory), "--disable_active_reparents", "--enable_replication_reporter=false", } diff --git a/go/test/endtoend/tabletmanager/tablet_security_policy_test.go b/go/test/endtoend/tabletmanager/tablet_security_policy_test.go index 90397a737ef..c0db2806fe0 100644 --- a/go/test/endtoend/tabletmanager/tablet_security_policy_test.go +++ b/go/test/endtoend/tabletmanager/tablet_security_policy_test.go @@ -26,6 +26,7 @@ import ( "github.com/stretchr/testify/require" "vitess.io/vitess/go/test/endtoend/cluster" + "vitess.io/vitess/go/vt/utils" ) func TestFallbackSecurityPolicy(t *testing.T) { @@ -36,8 +37,8 @@ func TestFallbackSecurityPolicy(t *testing.T) { err := cluster.StartMySQL(ctx, mTablet, username, clusterInstance.TmpDirectory) require.NoError(t, err) - // Requesting an unregistered security_policy should fallback to deny-all. - clusterInstance.VtTabletExtraArgs = []string{"--security_policy", "bogus"} + // Requesting an unregistered security-policy should fallback to deny-all. + clusterInstance.VtTabletExtraArgs = []string{utils.GetFlagVariantForTests("--security-policy"), "bogus"} err = clusterInstance.StartVttablet(mTablet, false, "SERVING", false, cell, keyspaceName, hostname, shardName) require.NoError(t, err) @@ -90,8 +91,8 @@ func TestDenyAllSecurityPolicy(t *testing.T) { err := cluster.StartMySQL(ctx, mTablet, username, clusterInstance.TmpDirectory) require.NoError(t, err) - // Requesting a deny-all security_policy. - clusterInstance.VtTabletExtraArgs = []string{"--security_policy", "deny-all"} + // Requesting a deny-all security-policy. + clusterInstance.VtTabletExtraArgs = []string{utils.GetFlagVariantForTests("--security-policy"), "deny-all"} err = clusterInstance.StartVttablet(mTablet, false, "SERVING", false, cell, keyspaceName, hostname, shardName) require.NoError(t, err) @@ -121,8 +122,8 @@ func TestReadOnlySecurityPolicy(t *testing.T) { err := cluster.StartMySQL(ctx, mTablet, username, clusterInstance.TmpDirectory) require.NoError(t, err) - // Requesting a read-only security_policy. - clusterInstance.VtTabletExtraArgs = []string{"--security_policy", "read-only"} + // Requesting a read-only security-policy. + clusterInstance.VtTabletExtraArgs = []string{utils.GetFlagVariantForTests("--security-policy"), "read-only"} err = clusterInstance.StartVttablet(mTablet, false, "SERVING", false, cell, keyspaceName, hostname, shardName) require.NoError(t, err) diff --git a/go/test/endtoend/transaction/rollback/txn_rollback_shutdown_test.go b/go/test/endtoend/transaction/rollback/txn_rollback_shutdown_test.go index c7bef098c05..0bb65c46c07 100644 --- a/go/test/endtoend/transaction/rollback/txn_rollback_shutdown_test.go +++ b/go/test/endtoend/transaction/rollback/txn_rollback_shutdown_test.go @@ -31,6 +31,7 @@ import ( "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/test/endtoend/cluster" + vtutils "vitess.io/vitess/go/vt/utils" ) var ( @@ -74,7 +75,7 @@ func TestMain(m *testing.M) { } // Set a short onterm timeout so the test goes faster. - clusterInstance.VtGateExtraArgs = []string{"--onterm_timeout", "1s"} + clusterInstance.VtGateExtraArgs = []string{vtutils.GetFlagVariantForTests("--onterm-timeout"), "1s"} err = clusterInstance.StartVtgate() if err != nil { panic(err) diff --git a/go/test/endtoend/transaction/twopc/stress/main_test.go b/go/test/endtoend/transaction/twopc/stress/main_test.go index f896a75aed3..0bfb67834d1 100644 --- a/go/test/endtoend/transaction/twopc/stress/main_test.go +++ b/go/test/endtoend/transaction/twopc/stress/main_test.go @@ -73,8 +73,8 @@ func TestMain(m *testing.M) { clusterInstance.VtTabletExtraArgs = append(clusterInstance.VtTabletExtraArgs, "--twopc_abandon_age", "1", "--migration_check_interval", "2s", - "--onterm_timeout", "1s", - "--onclose_timeout", "1s", + vtutils.GetFlagVariantForTests("--onterm-timeout"), "1s", + vtutils.GetFlagVariantForTests("--onclose-timeout"), "1s", ) // Start keyspace diff --git a/go/test/endtoend/vault/vault_test.go b/go/test/endtoend/vault/vault_test.go index f1ffbf75357..267d36817b3 100644 --- a/go/test/endtoend/vault/vault_test.go +++ b/go/test/endtoend/vault/vault_test.go @@ -35,6 +35,7 @@ import ( "vitess.io/vitess/go/test/endtoend/cluster" "vitess.io/vitess/go/test/endtoend/utils" "vitess.io/vitess/go/vt/log" + vtutils "vitess.io/vitess/go/vt/utils" ) var ( @@ -93,7 +94,7 @@ var ( // Make this small, so we can get a renewal "--mysql_auth_vault_ttl", "21s"} mysqlctlArg = []string{ - "--db_dba_password", mysqlPassword} + vtutils.GetFlagVariantForTests("--db-dba-password"), mysqlPassword} vttabletLogFileName = "vttablet.INFO" tokenRenewalString = "Vault client status: token renewed" ) diff --git a/go/test/endtoend/vtgate/connectiondrain/main_test.go b/go/test/endtoend/vtgate/connectiondrain/main_test.go index 6257baf8e40..a951fb39097 100644 --- a/go/test/endtoend/vtgate/connectiondrain/main_test.go +++ b/go/test/endtoend/vtgate/connectiondrain/main_test.go @@ -29,6 +29,7 @@ import ( "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/test/endtoend/cluster" "vitess.io/vitess/go/test/endtoend/utils" + vtutils "vitess.io/vitess/go/vt/utils" ) var ( @@ -60,7 +61,7 @@ func setupCluster(t *testing.T) (*cluster.LocalProcessCluster, mysql.ConnParams) require.NoError(t, err) // Start vtgate - clusterInstance.VtGateExtraArgs = append(clusterInstance.VtGateExtraArgs, "--mysql-server-drain-onterm", "--onterm_timeout", "30s") + clusterInstance.VtGateExtraArgs = append(clusterInstance.VtGateExtraArgs, "--mysql-server-drain-onterm", vtutils.GetFlagVariantForTests("--onterm-timeout"), "30s") err = clusterInstance.StartVtgate() require.NoError(t, err) @@ -119,7 +120,7 @@ func TestConnectionDrainCloseConnections(t *testing.T) { // Create a third connection, this connection should not be allowed. // Set a connection timeout to 1s otherwise the connection will take forever - // and eventually vtgate will reach the --onterm_timeout. + // and eventually vtgate will reach the --onterm-timeout. vtParams.ConnectTimeoutMs = 1000 defer func() { vtParams.ConnectTimeoutMs = 0 @@ -146,10 +147,10 @@ func TestConnectionDrainCloseConnections(t *testing.T) { require.NoError(t, err) vtConn.Close() - // Give enough time for vtgate to finish all the onterm hooks without reaching the 30s of --onterm_timeout + // Give enough time for vtgate to finish all the onterm hooks without reaching the 30s of --onterm-timeout time.Sleep(10 * time.Second) - // By now the vtgate should have shutdown on its own and without reaching --onterm_timeout + // By now the vtgate should have shutdown on its own and without reaching --onterm-timeout require.True(t, clusterInstance.VtgateProcess.IsShutdown()) } @@ -168,18 +169,18 @@ func TestConnectionDrainOnTermTimeout(t *testing.T) { vtConn2.Close() }() - // Tearing down vtgate here, we want to reach the onterm_timeout of 30s + // Tearing down vtgate here, we want to reach the onterm-timeout of 30s err = clusterInstance.VtgateProcess.Terminate() require.NoError(t, err) - // Run a busy query that returns only after the onterm_timeout is reached, this should fail when we reach the timeout + // Run a busy query that returns only after the onterm-timeout is reached, this should fail when we reach the timeout _, err = vtConn.ExecuteFetch("select sleep(40)", 1, false) require.Error(t, err) - // Running a query after we have reached the onterm_timeout should fail + // Running a query after we have reached the onterm-timeout should fail _, err = vtConn2.ExecuteFetch("select id from t1", 1, false) require.Error(t, err) - // By now vtgate will be shutdown becaused it reached its onterm_timeout, despite idle connections still being opened + // By now vtgate will be shutdown becaused it reached its onterm-timeout, despite idle connections still being opened require.True(t, clusterInstance.VtgateProcess.IsShutdown()) } diff --git a/go/test/endtoend/vtgate/mysql80/main_test.go b/go/test/endtoend/vtgate/mysql80/main_test.go index b970fb66b12..e188f7f2ed7 100644 --- a/go/test/endtoend/vtgate/mysql80/main_test.go +++ b/go/test/endtoend/vtgate/mysql80/main_test.go @@ -22,6 +22,7 @@ import ( "testing" querypb "vitess.io/vitess/go/vt/proto/query" + "vitess.io/vitess/go/vt/utils" "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/test/endtoend/cluster" @@ -59,7 +60,7 @@ func TestMain(m *testing.M) { clusterInstance.VtGatePlannerVersion = querypb.ExecuteOptions_Gen4 clusterInstance.VtGateExtraArgs = append(clusterInstance.VtGateExtraArgs, "--enable_system_settings=true", - "--mysql_server_version=8.0.16-7", + utils.GetFlagVariantForTests("--mysql-server-version")+"=8.0.16-7", ) // Start vtgate err = clusterInstance.StartVtgate() diff --git a/go/test/endtoend/vtgate/reservedconn/main_test.go b/go/test/endtoend/vtgate/reservedconn/main_test.go index 00f569d9eb9..1a40b6ea465 100644 --- a/go/test/endtoend/vtgate/reservedconn/main_test.go +++ b/go/test/endtoend/vtgate/reservedconn/main_test.go @@ -29,6 +29,7 @@ import ( "vitess.io/vitess/go/mysql" "vitess.io/vitess/go/test/endtoend/cluster" + vtutils "vitess.io/vitess/go/vt/utils" ) var ( @@ -124,9 +125,9 @@ func TestMain(m *testing.M) { } // Start vtgate - // This test requires setting the mysql_server_version vtgate flag + // This test requires setting the mysql-server-version vtgate flag // to 5.7 regardless of the actual MySQL version used for the tests. - clusterInstance.VtGateExtraArgs = []string{"--lock_heartbeat_time", "2s", "--mysql_server_version", "5.7.0"} + clusterInstance.VtGateExtraArgs = []string{"--lock_heartbeat_time", "2s", vtutils.GetFlagVariantForTests("--mysql-server-version"), "5.7.0"} clusterInstance.VtGatePlannerVersion = querypb.ExecuteOptions_Gen4 if err := clusterInstance.StartVtgate(); err != nil { return 1 diff --git a/go/test/endtoend/vtorc/general/vtorc_test.go b/go/test/endtoend/vtorc/general/vtorc_test.go index 4a2f50b4168..bbd9726b6f9 100644 --- a/go/test/endtoend/vtorc/general/vtorc_test.go +++ b/go/test/endtoend/vtorc/general/vtorc_test.go @@ -29,6 +29,7 @@ import ( "vitess.io/vitess/go/test/endtoend/cluster" "vitess.io/vitess/go/test/endtoend/vtorc/utils" "vitess.io/vitess/go/vt/log" + vtutils "vitess.io/vitess/go/vt/utils" "vitess.io/vitess/go/vt/vtorc/inst" "vitess.io/vitess/go/vt/vtorc/logic" ) @@ -631,7 +632,7 @@ func TestDurabilityPolicySetLater(t *testing.T) { func TestFullStatusConnectionPooling(t *testing.T) { defer utils.PrintVTOrcLogsOnFailure(t, clusterInfo.ClusterInstance) utils.SetupVttabletsAndVTOrcs(t, clusterInfo, 4, 0, []string{ - "--tablet_manager_grpc_concurrency=1", + fmt.Sprintf("%s=1", vtutils.GetFlagVariantForTests("--tablet-manager-grpc-concurrency")), }, cluster.VTOrcConfiguration{ PreventCrossCellFailover: true, }, 1, "") diff --git a/go/vt/dbconfigs/dbconfigs.go b/go/vt/dbconfigs/dbconfigs.go index 32fb2435286..c1d8bfd868b 100644 --- a/go/vt/dbconfigs/dbconfigs.go +++ b/go/vt/dbconfigs/dbconfigs.go @@ -31,6 +31,7 @@ import ( "vitess.io/vitess/go/vt/log" vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" "vitess.io/vitess/go/vt/servenv" + "vitess.io/vitess/go/vt/utils" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vttls" "vitess.io/vitess/go/yaml2" @@ -130,32 +131,36 @@ func RegisterFlags(userKeys ...string) { } func registerBaseFlags(fs *pflag.FlagSet) { - fs.StringVar(&GlobalDBConfigs.Socket, "db_socket", "", "The unix socket to connect on. If this is specified, host and port will not be used.") - fs.StringVar(&GlobalDBConfigs.Host, "db_host", "", "The host name for the tcp connection.") - fs.IntVar(&GlobalDBConfigs.Port, "db_port", 0, "tcp port") - fs.StringVar(&GlobalDBConfigs.Charset, "db_charset", "utf8mb4", "Character set/collation used for this tablet. Make sure to configure this to a charset/collation supported by the lowest MySQL version in your environment.") - fs.Uint64Var(&GlobalDBConfigs.Flags, "db_flags", 0, "Flag values as defined by MySQL.") - fs.StringVar(&GlobalDBConfigs.Flavor, "db_flavor", "", "Flavor overrid. Valid value is FilePos.") - fs.Var(&GlobalDBConfigs.SslMode, "db_ssl_mode", "SSL mode to connect with. One of disabled, preferred, required, verify_ca & verify_identity.") - fs.StringVar(&GlobalDBConfigs.SslCa, "db_ssl_ca", "", "connection ssl ca") - fs.StringVar(&GlobalDBConfigs.SslCaPath, "db_ssl_ca_path", "", "connection ssl ca path") - fs.StringVar(&GlobalDBConfigs.SslCert, "db_ssl_cert", "", "connection ssl certificate") - fs.StringVar(&GlobalDBConfigs.SslKey, "db_ssl_key", "", "connection ssl key") - fs.StringVar(&GlobalDBConfigs.TLSMinVersion, "db_tls_min_version", "", "Configures the minimal TLS version negotiated when SSL is enabled. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3.") - fs.StringVar(&GlobalDBConfigs.ServerName, "db_server_name", "", "server name of the DB we are connecting to.") - fs.IntVar(&GlobalDBConfigs.ConnectTimeoutMilliseconds, "db_connect_timeout_ms", 0, "connection timeout to mysqld in milliseconds (0 for no timeout)") - fs.BoolVar(&GlobalDBConfigs.EnableQueryInfo, "db_conn_query_info", false, "enable parsing and processing of QUERY_OK info fields") + + utils.SetFlagStringVar(fs, &GlobalDBConfigs.Socket, "db-socket", "", "The unix socket to connect on. If this is specified, host and port will not be used.") + utils.SetFlagStringVar(fs, &GlobalDBConfigs.Host, "db-host", "", "The host name for the tcp connection.") + utils.SetFlagIntVar(fs, &GlobalDBConfigs.Port, "db-port", 0, "tcp port") + utils.SetFlagStringVar(fs, &GlobalDBConfigs.Charset, "db-charset", "utf8mb4", "Character set/collation used for this tablet. Make sure to configure this to a charset/collation supported by the lowest MySQL version in your environment.") + utils.SetFlagUint64Var(fs, &GlobalDBConfigs.Flags, "db-flags", 0, "Flag values as defined by MySQL.") + utils.SetFlagStringVar(fs, &GlobalDBConfigs.Flavor, "db-flavor", "", "Flavor overrid. Valid value is FilePos.") + utils.SetFlagVar(fs, &GlobalDBConfigs.SslMode, "db-ssl-mode", "SSL mode to connect with. One of disabled, preferred, required, verify_ca & verify_identity.") + utils.SetFlagStringVar(fs, &GlobalDBConfigs.SslCa, "db-ssl-ca", "", "connection ssl ca") + utils.SetFlagStringVar(fs, &GlobalDBConfigs.SslCaPath, "db-ssl-ca-path", "", "connection ssl ca path") + utils.SetFlagStringVar(fs, &GlobalDBConfigs.SslCert, "db-ssl-cert", "", "connection ssl certificate") + utils.SetFlagStringVar(fs, &GlobalDBConfigs.SslKey, "db-ssl-key", "", "connection ssl key") + utils.SetFlagStringVar(fs, &GlobalDBConfigs.TLSMinVersion, "db-tls-min-version", "", "Configures the minimal TLS version negotiated when SSL is enabled. Defaults to TLSv1.2. Options: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3.") + utils.SetFlagStringVar(fs, &GlobalDBConfigs.ServerName, "db-server-name", "", "server name of the DB we are connecting to.") + utils.SetFlagIntVar(fs, &GlobalDBConfigs.ConnectTimeoutMilliseconds, "db-connect-timeout-ms", 0, "connection timeout to mysqld in milliseconds (0 for no timeout)") + utils.SetFlagBoolVar(fs, &GlobalDBConfigs.EnableQueryInfo, "db-conn-query-info", false, "enable parsing and processing of QUERY_OK info fields") } // The flags will change the global singleton func registerPerUserFlags(fs *pflag.FlagSet, userKey string, uc *UserConfig, cp *mysql.ConnParams) { - newUserFlag := "db_" + userKey + "_user" - fs.StringVar(&uc.User, newUserFlag, "vt_"+userKey, "db "+userKey+" user userKey") + newUserFlag := "db-" + userKey + "-user" + utils.SetFlagStringVar(fs, &uc.User, newUserFlag, "vt_"+userKey, "db "+userKey+" user userKey") + // fs.StringVar(&uc.User, newUserFlag, "vt_"+userKey, "db "+userKey+" user userKey") - newPasswordFlag := "db_" + userKey + "_password" - fs.StringVar(&uc.Password, newPasswordFlag, "", "db "+userKey+" password") + newPasswordFlag := "db-" + userKey + "-password" + utils.SetFlagStringVar(fs, &uc.Password, newPasswordFlag, "", "db "+userKey+" password") + // fs.StringVar(&uc.Password, newPasswordFlag, "", "db "+userKey+" password") - fs.BoolVar(&uc.UseSSL, "db_"+userKey+"_use_ssl", true, "Set this flag to false to make the "+userKey+" connection to not use ssl") + utils.SetFlagBoolVar(fs, &uc.UseSSL, "db-"+userKey+"-use-ssl", true, "Set this flag to false to make the "+userKey+" connection to not use ssl") + // fs.BoolVar(&uc.UseSSL, "db_"+userKey+"_use_ssl", true, "Set this flag to false to make the "+userKey+" connection to not use ssl") } // Connector contains Connection Parameters for mysql connection diff --git a/go/vt/log/log.go b/go/vt/log/log.go index fb0c90bbb1c..67746d906b6 100644 --- a/go/vt/log/log.go +++ b/go/vt/log/log.go @@ -28,6 +28,8 @@ import ( "github.com/golang/glog" "github.com/spf13/pflag" + + "vitess.io/vitess/go/vt/utils" ) // Level is used with V() to test log verbosity. @@ -85,7 +87,7 @@ func RegisterFlags(fs *pflag.FlagSet) { flagVal := logRotateMaxSize{ val: fmt.Sprintf("%d", atomic.LoadUint64(&glog.MaxSize)), } - fs.Var(&flagVal, "log_rotate_max_size", "size in bytes at which logs are rotated (glog.MaxSize)") + utils.SetFlagVar(fs, &flagVal, "log-rotate-max-size", "size in bytes at which logs are rotated (glog.MaxSize)") } // logRotateMaxSize implements pflag.Value and is used to diff --git a/go/vt/logutil/purge.go b/go/vt/logutil/purge.go index 8d85e15c5c9..c83f6a3081a 100644 --- a/go/vt/logutil/purge.go +++ b/go/vt/logutil/purge.go @@ -27,6 +27,7 @@ import ( "github.com/spf13/pflag" _flag "vitess.io/vitess/go/internal/flag" + "vitess.io/vitess/go/vt/utils" ) var ( @@ -41,9 +42,9 @@ var ( // calls this function, or call this function directly before parsing // command-line arguments. func RegisterFlags(fs *pflag.FlagSet) { - fs.DurationVar(&keepLogsByCtime, "keep_logs", keepLogsByCtime, "keep logs for this long (using ctime) (zero to keep forever)") - fs.DurationVar(&keepLogsByMtime, "keep_logs_by_mtime", keepLogsByMtime, "keep logs for this long (using mtime) (zero to keep forever)") - fs.DurationVar(&purgeLogsInterval, "purge_logs_interval", purgeLogsInterval, "how often try to remove old logs") + utils.SetFlagDurationVar(fs, &keepLogsByCtime, "keep-logs", keepLogsByCtime, "keep logs for this long (using ctime) (zero to keep forever)") + utils.SetFlagDurationVar(fs, &keepLogsByMtime, "keep-logs-by-mtime", keepLogsByMtime, "keep logs for this long (using mtime) (zero to keep forever)") + utils.SetFlagDurationVar(fs, &purgeLogsInterval, "purge-logs-interval", purgeLogsInterval, "how often try to remove old logs") } // parse parses a file name (as used by glog) and returns its process diff --git a/go/vt/mysqlctl/mycnf_gen.go b/go/vt/mysqlctl/mycnf_gen.go index dd0d6c81c81..16f82de21a3 100644 --- a/go/vt/mysqlctl/mycnf_gen.go +++ b/go/vt/mysqlctl/mycnf_gen.go @@ -30,6 +30,7 @@ import ( "vitess.io/vitess/go/vt/env" "vitess.io/vitess/go/vt/servenv" + "vitess.io/vitess/go/vt/utils" ) // This files handles the creation of Mycnf objects for the default 'vt' @@ -63,7 +64,7 @@ func init() { } func registerMyCnfFlags(fs *pflag.FlagSet) { - fs.StringVar(&tabletDir, "tablet_dir", tabletDir, "The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid.") + utils.SetFlagStringVar(fs, &tabletDir, "tablet-dir", tabletDir, "The directory within the vtdataroot to store vttablet/mysql files. Defaults to being generated by the tablet uid.") } // NewMycnf fills the Mycnf structure with vt root paths and derived values. diff --git a/go/vt/servenv/mysql.go b/go/vt/servenv/mysql.go index c0af2a7ee39..05c59dd486b 100644 --- a/go/vt/servenv/mysql.go +++ b/go/vt/servenv/mysql.go @@ -22,6 +22,7 @@ import ( "github.com/spf13/pflag" "vitess.io/vitess/go/mysql/config" + "vitess.io/vitess/go/vt/utils" ) // mySQLServerVersion is what Vitess will present as it's version during the connection handshake, @@ -32,10 +33,10 @@ var mySQLServerVersion = fmt.Sprintf("%s-Vitess", config.DefaultMySQLVersion) // RegisterMySQLServerFlags installs the flags needed to specify or expose a // particular MySQL server version from Vitess. func RegisterMySQLServerFlags(fs *pflag.FlagSet) { - fs.StringVar(&mySQLServerVersion, "mysql_server_version", mySQLServerVersion, "MySQL server version to advertise.") + utils.SetFlagStringVar(fs, &mySQLServerVersion, "mysql-server-version", mySQLServerVersion, "MySQL server version to advertise.") } -// MySQLServerVersion returns the value of the `--mysql_server_version` flag. +// MySQLServerVersion returns the value of the `--mysql-server-version` flag. func MySQLServerVersion() string { return mySQLServerVersion } diff --git a/go/vt/servenv/pid_file.go b/go/vt/servenv/pid_file.go index 67faaf184bd..49899d05ea4 100644 --- a/go/vt/servenv/pid_file.go +++ b/go/vt/servenv/pid_file.go @@ -23,7 +23,7 @@ import ( "vitess.io/vitess/go/vt/log" ) -var pidFile string // registered in RegisterFlags as --pid_file +var pidFile string // registered in RegisterFlags as --pid-file func init() { pidFileCreated := false diff --git a/go/vt/servenv/servenv.go b/go/vt/servenv/servenv.go index 42ce4a9cf12..d7ddccf1890 100644 --- a/go/vt/servenv/servenv.go +++ b/go/vt/servenv/servenv.go @@ -49,6 +49,7 @@ import ( "vitess.io/vitess/go/vt/grpccommon" "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/logutil" + "vitess.io/vitess/go/vt/utils" "vitess.io/vitess/go/vt/vterrors" // Include deprecation warnings for soon-to-be-unsupported flag invocations. @@ -100,28 +101,28 @@ var timeouts = &TimeoutFlags{ func RegisterFlags() { OnParse(func(fs *pflag.FlagSet) { fs.DurationVar(&timeouts.LameduckPeriod, "lameduck-period", timeouts.LameduckPeriod, "keep running at least this long after SIGTERM before stopping") - fs.DurationVar(&timeouts.OnTermTimeout, "onterm_timeout", timeouts.OnTermTimeout, "wait no more than this for OnTermSync handlers before stopping") - fs.DurationVar(&timeouts.OnCloseTimeout, "onclose_timeout", timeouts.OnCloseTimeout, "wait no more than this for OnClose handlers before stopping") + utils.SetFlagDurationVar(fs, &timeouts.OnTermTimeout, "onterm-timeout", timeouts.OnTermTimeout, "wait no more than this for OnTermSync handlers before stopping") + utils.SetFlagDurationVar(fs, &timeouts.OnCloseTimeout, "onclose-timeout", timeouts.OnCloseTimeout, "wait no more than this for OnClose handlers before stopping") fs.BoolVar(&catchSigpipe, "catch-sigpipe", catchSigpipe, "catch and ignore SIGPIPE on stdout and stderr if specified") fs.IntVar(&maxStackSize, "max-stack-size", maxStackSize, "configure the maximum stack size in bytes") fs.IntVar(&tableRefreshInterval, "table-refresh-interval", tableRefreshInterval, "interval in milliseconds to refresh tables in status page with refreshRequired class") // pid_file.go - fs.StringVar(&pidFile, "pid_file", pidFile, "If set, the process will write its pid to the named file, and delete it on graceful shutdown.") + utils.SetFlagStringVar(fs, &pidFile, "pid-file", pidFile, "If set, the process will write its pid to the named file, and delete it on graceful shutdown.") }) } func RegisterFlagsWithTimeouts(tf *TimeoutFlags) { OnParse(func(fs *pflag.FlagSet) { fs.DurationVar(&tf.LameduckPeriod, "lameduck-period", tf.LameduckPeriod, "keep running at least this long after SIGTERM before stopping") - fs.DurationVar(&tf.OnTermTimeout, "onterm_timeout", tf.OnTermTimeout, "wait no more than this for OnTermSync handlers before stopping") - fs.DurationVar(&tf.OnCloseTimeout, "onclose_timeout", tf.OnCloseTimeout, "wait no more than this for OnClose handlers before stopping") + utils.SetFlagDurationVar(fs, &tf.OnTermTimeout, "onterm-timeout", tf.OnTermTimeout, "wait no more than this for OnTermSync handlers before stopping") + utils.SetFlagDurationVar(fs, &tf.OnCloseTimeout, "onclose-timeout", tf.OnCloseTimeout, "wait no more than this for OnClose handlers before stopping") fs.BoolVar(&catchSigpipe, "catch-sigpipe", catchSigpipe, "catch and ignore SIGPIPE on stdout and stderr if specified") fs.IntVar(&maxStackSize, "max-stack-size", maxStackSize, "configure the maximum stack size in bytes") fs.IntVar(&tableRefreshInterval, "table-refresh-interval", tableRefreshInterval, "interval in milliseconds to refresh tables in status page with refreshRequired class") // pid_file.go - fs.StringVar(&pidFile, "pid_file", pidFile, "If set, the process will write its pid to the named file, and delete it on graceful shutdown.") + utils.SetFlagStringVar(fs, &pidFile, "pid-file", pidFile, "If set, the process will write its pid to the named file, and delete it on graceful shutdown.") timeouts = tf }) @@ -169,7 +170,7 @@ func OnTerm(f func()) { // This allows the program to change its behavior during the lameduck period. // // All hooks are run in parallel, and the process will do its best to wait -// (up to -onterm_timeout) for all of them to finish before dying. +// (up to -onterm-timeout) for all of them to finish before dying. // // See also: OnTerm func OnTermSync(f func()) { diff --git a/go/vt/servenv/service_map.go b/go/vt/servenv/service_map.go index 69d5cd0bcbc..cd1bf758272 100644 --- a/go/vt/servenv/service_map.go +++ b/go/vt/servenv/service_map.go @@ -20,6 +20,7 @@ import ( "github.com/spf13/pflag" "vitess.io/vitess/go/vt/log" + "vitess.io/vitess/go/vt/utils" ) var ( @@ -27,17 +28,17 @@ var ( // serviceMap is the used version of the service map. // init() functions can add default values to it (using InitServiceMap). - // service_map command line parameter will alter the map. + // service-map command line parameter will alter the map. // Can only be used after servenv.Init has been called. serviceMap = make(map[string]bool) ) // RegisterServiceMapFlag registers an OnParse hook to install the -// `--service_map` flag for a given cmd. It must be called before ParseFlags or +// `--service-map` flag for a given cmd. It must be called before ParseFlags or // ParseFlagsWithArgs. func RegisterServiceMapFlag() { OnParse(func(fs *pflag.FlagSet) { - fs.StringSliceVar(&serviceMapFlag, "service_map", serviceMapFlag, "comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice") + utils.SetFlagStringSliceVar(fs, &serviceMapFlag, "service-map", serviceMapFlag, "comma separated list of services to enable (or disable if prefixed with '-') Example: grpc-queryservice") }) OnInit(updateServiceMap) } @@ -63,9 +64,9 @@ func updateServiceMap() { // (and also logs how to enable / disable it) func checkServiceMap(protocol, name string) bool { if serviceMap[protocol+"-"+name] { - log.Infof("Registering %v for %v, disable it with -%v-%v service_map parameter", name, protocol, protocol, name) + log.Infof("Registering %v for %v, disable it with -%v-%v service-map parameter", name, protocol, protocol, name) return true } - log.Infof("Not registering %v for %v, enable it with %v-%v service_map parameter", name, protocol, protocol, name) + log.Infof("Not registering %v for %v, enable it with %v-%v service-map parameter", name, protocol, protocol, name) return false } diff --git a/go/vt/utils/flags.go b/go/vt/utils/flags.go index c6ab0ababe3..978e4365e74 100644 --- a/go/vt/utils/flags.go +++ b/go/vt/utils/flags.go @@ -23,8 +23,7 @@ import ( "time" "github.com/spf13/pflag" - - "vitess.io/vitess/go/vt/log" + // "vitess.io/vitess/go/vt/log" ) /* @@ -53,8 +52,9 @@ func setFlagVar[T any](fs *pflag.FlagSet, p *T, name string, def T, usage string underscored, dashed := flagVariants(name) if name == underscored { - log.Warning("Please use flag names with dashes instead of underscores, preparing for deprecation of underscores in flag names") + fmt.Printf("[WARNING] Please use flag names with dashes instead of underscores, preparing for deprecation of underscores in flag names") } + setFunc(fs, p, dashed, def, usage) setFunc(fs, p, underscored, def, "") _ = fs.MarkHidden(underscored) @@ -81,12 +81,26 @@ func SetFlagDurationVar(fs *pflag.FlagSet, p *time.Duration, name string, def ti setFlagVar(fs, p, name, def, usage, (*pflag.FlagSet).DurationVar) } -// SetFlagVariants adds both underscored and dashed versions of the flag to maintain compatibility during the transition. -// Underscores will be fully deprecated in v25. -func SetFlagVariants(m map[string]string, key, value string) { - underscored, dashed := flagVariants(key) - m[underscored] = value - m[dashed] = value +func SetFlagUint64Var(fs *pflag.FlagSet, p *uint64, name string, def uint64, usage string) { + setFlagVar(fs, p, name, def, usage, (*pflag.FlagSet).Uint64Var) +} + +func SetFlagStringSliceVar(fs *pflag.FlagSet, p *[]string, name string, def []string, usage string) { + setFlagVar(fs, p, name, def, usage, (*pflag.FlagSet).StringSliceVar) +} + +// SetFlagVar registers a flag (that implements the pflag.Value interface) +// using both the dashed and underscored versions of the flag name. +// The underscored version is hidden and marked as deprecated. +func SetFlagVar(fs *pflag.FlagSet, value pflag.Value, name, usage string) { + underscored, dashed := flagVariants(name) + if name == underscored { + fmt.Printf("[WARNING] Please use flag names with dashes instead of underscores, preparing for deprecation of underscores in flag names") + } + fs.Var(value, dashed, usage) + fs.Var(value, underscored, "") + _ = fs.MarkHidden(underscored) + _ = fs.MarkDeprecated(underscored, fmt.Sprintf("use %s instead", dashed)) } // SetFlagVariantsForTests randomly assigns either the underscored or dashed version of the flag name to the map. diff --git a/go/vt/vtcombo/tablet_map.go b/go/vt/vtcombo/tablet_map.go index e8c8935f989..6aeea294e35 100644 --- a/go/vt/vtcombo/tablet_map.go +++ b/go/vt/vtcombo/tablet_map.go @@ -202,7 +202,7 @@ func InitTabletMap( // Do this before any tablets are created so that they respect the protocol, // otherwise it defaults to grpc. // - // main() forces the --tablet_manager_protocol flag to this value. + // main() forces the --tablet-manager-protocol flag to this value. tmclient.RegisterTabletManagerClientFactory("internal", func() tmclient.TabletManagerClient { return &internalTabletManagerClient{} }) diff --git a/go/vt/vtctl/grpcvtctldserver/testutil/test_tmclient.go b/go/vt/vtctl/grpcvtctldserver/testutil/test_tmclient.go index 3b6af754d4e..7383a7bd3be 100644 --- a/go/vt/vtctl/grpcvtctldserver/testutil/test_tmclient.go +++ b/go/vt/vtctl/grpcvtctldserver/testutil/test_tmclient.go @@ -128,7 +128,7 @@ func NewVtctldServerWithTabletManagerClient(t testing.TB, ts *topo.Server, tmc t const ( fsName = "go.vt.vtctl.grpcvtctldserver.testutil" - tmclientProtocolFlagName = "tablet_manager_protocol" + tmclientProtocolFlagName = "tablet-manager-protocol" ) var fs *pflag.FlagSet diff --git a/go/vt/vterrors/vterrors.go b/go/vt/vterrors/vterrors.go index c97a7c8e45f..0124f43fb2e 100644 --- a/go/vt/vterrors/vterrors.go +++ b/go/vt/vterrors/vterrors.go @@ -96,6 +96,7 @@ import ( "github.com/spf13/pflag" vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" + "vitess.io/vitess/go/vt/utils" ) // logErrStacks controls whether printing errors includes the @@ -120,7 +121,7 @@ func setLogErrStacks(val bool) { func RegisterFlags(fs *pflag.FlagSet) { muLogErrStacks.Lock() defer muLogErrStacks.Unlock() - fs.BoolVar(&logErrStacks, "log_err_stacks", false, "log stack traces for errors") + utils.SetFlagBoolVar(fs, &logErrStacks, "log-err-stacks", false, "log stack traces for errors") } // New returns an error with the supplied message. diff --git a/go/vt/vtgate/plugin_mysql_server.go b/go/vt/vtgate/plugin_mysql_server.go index 512a278e0ff..ef01ec7a301 100644 --- a/go/vt/vtgate/plugin_mysql_server.go +++ b/go/vt/vtgate/plugin_mysql_server.go @@ -103,7 +103,7 @@ func registerPluginFlags(fs *pflag.FlagSet) { fs.DurationVar(&mysqlKeepAlivePeriod, "mysql-server-keepalive-period", mysqlKeepAlivePeriod, "TCP period between keep-alives") fs.DurationVar(&mysqlServerFlushDelay, "mysql_server_flush_delay", mysqlServerFlushDelay, "Delay after which buffered response will be flushed to the client.") fs.StringVar(&mysqlDefaultWorkloadName, "mysql_default_workload", mysqlDefaultWorkloadName, "Default session workload (OLTP, OLAP, DBA)") - fs.BoolVar(&mysqlDrainOnTerm, "mysql-server-drain-onterm", mysqlDrainOnTerm, "If set, the server waits for --onterm_timeout for already connected clients to complete their in flight work") + fs.BoolVar(&mysqlDrainOnTerm, "mysql-server-drain-onterm", mysqlDrainOnTerm, "If set, the server waits for --onterm-timeout for already connected clients to complete their in flight work") } // vtgateHandler implements the Listener interface. diff --git a/go/vt/vttablet/grpctmclient/cached_client.go b/go/vt/vttablet/grpctmclient/cached_client.go index c0dd751ec30..954cecd88cf 100644 --- a/go/vt/vttablet/grpctmclient/cached_client.go +++ b/go/vt/vttablet/grpctmclient/cached_client.go @@ -31,6 +31,7 @@ import ( "vitess.io/vitess/go/stats" "vitess.io/vitess/go/vt/grpcclient" "vitess.io/vitess/go/vt/servenv" + "vitess.io/vitess/go/vt/utils" "vitess.io/vitess/go/vt/vttablet/tmclient" tabletmanagerservicepb "vitess.io/vitess/go/vt/proto/tabletmanagerservice" @@ -40,7 +41,7 @@ import ( var defaultPoolCapacity = 100 func registerCachedClientFlags(fs *pflag.FlagSet) { - fs.IntVar(&defaultPoolCapacity, "tablet_manager_grpc_connpool_size", defaultPoolCapacity, "number of tablets to keep tmclient connections open to") + utils.SetFlagIntVar(fs, &defaultPoolCapacity, "tablet-manager-grpc-connpool-size", defaultPoolCapacity, "number of tablets to keep tmclient connections open to") } func init() { diff --git a/go/vt/vttablet/grpctmclient/client.go b/go/vt/vttablet/grpctmclient/client.go index f6d154570eb..5460152b542 100644 --- a/go/vt/vttablet/grpctmclient/client.go +++ b/go/vt/vttablet/grpctmclient/client.go @@ -35,6 +35,7 @@ import ( "vitess.io/vitess/go/vt/mysqlctl/tmutils" "vitess.io/vitess/go/vt/servenv" "vitess.io/vitess/go/vt/topo/topoproto" + "vitess.io/vitess/go/vt/utils" "vitess.io/vitess/go/vt/vttablet/tmclient" logutilpb "vitess.io/vitess/go/vt/proto/logutil" @@ -64,12 +65,12 @@ var ( ) func RegisterFlags(fs *pflag.FlagSet) { - fs.IntVar(&concurrency, "tablet_manager_grpc_concurrency", concurrency, "concurrency to use to talk to a vttablet server for performance-sensitive RPCs (like ExecuteFetchAs{Dba,App}, CheckThrottler and FullStatus)") - fs.StringVar(&cert, "tablet_manager_grpc_cert", cert, "the cert to use to connect") - fs.StringVar(&key, "tablet_manager_grpc_key", key, "the key to use to connect") - fs.StringVar(&ca, "tablet_manager_grpc_ca", ca, "the server ca to use to validate servers when connecting") - fs.StringVar(&crl, "tablet_manager_grpc_crl", crl, "the server crl to use to validate server certificates when connecting") - fs.StringVar(&name, "tablet_manager_grpc_server_name", name, "the server name to use to validate server certificate") + utils.SetFlagIntVar(fs, &concurrency, "tablet-manager-grpc-concurrency", concurrency, "concurrency to use to talk to a vttablet server for performance-sensitive RPCs (like ExecuteFetchAs{Dba,App}, CheckThrottler and FullStatus)") + utils.SetFlagStringVar(fs, &cert, "tablet-manager-grpc-cert", cert, "the cert to use to connect") + utils.SetFlagStringVar(fs, &key, "tablet-manager-grpc-key", key, "the key to use to connect") + utils.SetFlagStringVar(fs, &ca, "tablet-manager-grpc-ca", ca, "the server ca to use to validate servers when connecting") + utils.SetFlagStringVar(fs, &crl, "tablet-manager-grpc-crl", crl, "the server crl to use to validate server certificates when connecting") + utils.SetFlagStringVar(fs, &name, "tablet-manager-grpc-server-name", name, "the server name to use to validate server certificate") } var _binaries = []string{ // binaries that require the flags in this package @@ -134,9 +135,9 @@ type poolDialer interface { // In order to more efficiently use the underlying tcp connections, you can // instead use the cachedConnDialer implementation by specifying // -// --tablet_manager_protocol "grpc-cached" +// --tablet-manager-protocol "grpc-cached" // -// The cachedConnDialer keeps connections to up to --tablet_manager_grpc_connpool_size +// The cachedConnDialer keeps connections to up to --tablet-manager-grpc-connpool-size // distinct tablets open at any given time, for faster per-RPC call time, and less // connection churn. type Client struct { diff --git a/go/vt/vttablet/tmclient/rpc_client_api.go b/go/vt/vttablet/tmclient/rpc_client_api.go index 7ce4c7f0bf4..54ce48fafcd 100644 --- a/go/vt/vttablet/tmclient/rpc_client_api.go +++ b/go/vt/vttablet/tmclient/rpc_client_api.go @@ -27,6 +27,7 @@ import ( "vitess.io/vitess/go/vt/logutil" "vitess.io/vitess/go/vt/mysqlctl/tmutils" "vitess.io/vitess/go/vt/servenv" + "vitess.io/vitess/go/vt/utils" querypb "vitess.io/vitess/go/vt/proto/query" replicationdatapb "vitess.io/vitess/go/vt/proto/replicationdata" @@ -41,7 +42,7 @@ var tabletManagerProtocol = "grpc" // RegisterFlags registers the tabletconn flags on a given flagset. It is // exported for tests that need to inject a particular TabletManagerProtocol. func RegisterFlags(fs *pflag.FlagSet) { - fs.StringVar(&tabletManagerProtocol, "tablet_manager_protocol", tabletManagerProtocol, "Protocol to use to make tabletmanager RPCs to vttablets.") + utils.SetFlagStringVar(fs, &tabletManagerProtocol, "tablet-manager-protocol", tabletManagerProtocol, "Protocol to use to make tabletmanager RPCs to vttablets.") } func init() { diff --git a/go/vt/vttablet/tmclienttest/tmclienttest.go b/go/vt/vttablet/tmclienttest/tmclienttest.go index 6e40a2afb1f..0b207569f3f 100644 --- a/go/vt/vttablet/tmclienttest/tmclienttest.go +++ b/go/vt/vttablet/tmclienttest/tmclienttest.go @@ -26,9 +26,9 @@ import ( "vitess.io/vitess/go/vt/vttablet/tmclient" ) -const tmclientProtocolFlagName = "tablet_manager_protocol" +const tmclientProtocolFlagName = "tablet-manager-protocol" -// SetProtocol is a helper function to set the tmclient --tablet_manager_protocol +// SetProtocol is a helper function to set the tmclient --tablet-manager-protocol // flag value for tests. If successful, it returns a function that, when called, // returns the flag to its previous value. // diff --git a/go/vt/vttest/environment.go b/go/vt/vttest/environment.go index a4e139ad643..85f85ddafdf 100644 --- a/go/vt/vttest/environment.go +++ b/go/vt/vttest/environment.go @@ -207,7 +207,7 @@ func (env *LocalTestEnv) ProcessHealthCheck(name string) HealthChecker { // VtcomboArguments implements VtcomboArguments for LocalTestEnv. func (env *LocalTestEnv) VtcomboArguments() []string { return []string{ - "--service_map", strings.Join( + "--service-map", strings.Join( []string{"grpc-vtgateservice", "grpc-vtctl", "grpc-vtctld"}, ",", ), } diff --git a/go/vt/vttest/environment_test.go b/go/vt/vttest/environment_test.go index b5a724c764b..1b6e9046130 100644 --- a/go/vt/vttest/environment_test.go +++ b/go/vt/vttest/environment_test.go @@ -29,11 +29,11 @@ func TestVtcomboArguments(t *testing.T) { env := &LocalTestEnv{} args := env.VtcomboArguments() - t.Run("service_map flag", func(t *testing.T) { - require.Contains(t, args, "--service_map", "vttest.LocalTestEnv must provide `--service_map` flag to vtcombo") + t.Run("service-map flag", func(t *testing.T) { + require.Contains(t, args, "--service-map", "vttest.LocalTestEnv must provide `--service-map` flag to vtcombo") - x := sort.SearchStrings(args, "--service_map") - require.Less(t, x+1, len(args), "--service_map vtcombo flag (idx = %d) must take an argument. full arg list: %v", x, args) + x := sort.SearchStrings(args, "--service-map") + require.Less(t, x+1, len(args), "--service-map vtcombo flag (idx = %d) must take an argument. full arg list: %v", x, args) expectedServiceList := []string{ "grpc-vtgateservice", @@ -41,6 +41,6 @@ func TestVtcomboArguments(t *testing.T) { "grpc-vtctld", } serviceMapList := strings.Split(args[x+1], ",") - assert.ElementsMatch(t, expectedServiceList, serviceMapList, "--service_map list does not contain expected vtcombo services") + assert.ElementsMatch(t, expectedServiceList, serviceMapList, "--service-map list does not contain expected vtcombo services") }) } diff --git a/go/vt/vttest/vtprocess.go b/go/vt/vttest/vtprocess.go index 31f614b1f16..b3861a9583a 100644 --- a/go/vt/vttest/vtprocess.go +++ b/go/vt/vttest/vtprocess.go @@ -231,6 +231,7 @@ func VtcomboProcess(environment Environment, args *Config, mysql MySQLManager) ( } protoTopo, _ := prototext.Marshal(args.Topology) vt.ExtraArgs = append(vt.ExtraArgs, []string{ + //TODO: Remove underscore(_) flags in v25, replace them with dashed(-) notation "--db_charset", charset, "--db_app_user", user, "--db_app_password", pass, @@ -282,18 +283,18 @@ func VtcomboProcess(environment Environment, args *Config, mysql MySQLManager) ( if args.VSchemaDDLAuthorizedUsers != "" { vt.ExtraArgs = append(vt.ExtraArgs, []string{"--vschema_ddl_authorized_users", args.VSchemaDDLAuthorizedUsers}...) } - vt.ExtraArgs = append(vt.ExtraArgs, "--mysql_server_version", servenv.MySQLServerVersion()) + vt.ExtraArgs = append(vt.ExtraArgs, "--mysql-server-version", servenv.MySQLServerVersion()) if socket != "" { vt.ExtraArgs = append(vt.ExtraArgs, []string{ - "--db_socket", socket, + "--db-socket", socket, }...) } else { hostname, p := mysql.Address() port := fmt.Sprintf("%d", p) vt.ExtraArgs = append(vt.ExtraArgs, []string{ - "--db_host", hostname, - "--db_port", port, + "--db-host", hostname, + "--db-port", port, }...) } diff --git a/java/grpc-client/src/test/java/io/client/grpc/GrpcClientStaticAuthTest.java b/java/grpc-client/src/test/java/io/client/grpc/GrpcClientStaticAuthTest.java index 166948fbea4..59102025291 100644 --- a/java/grpc-client/src/test/java/io/client/grpc/GrpcClientStaticAuthTest.java +++ b/java/grpc-client/src/test/java/io/client/grpc/GrpcClientStaticAuthTest.java @@ -64,7 +64,7 @@ public static void setUpBeforeClass() throws Exception { vtRoot + "/bin/vtgateclienttest", "--logtostderr", "--grpc-port", Integer.toString(port), - "--service_map", "grpc-vtgateservice", + "--service-map", "grpc-vtgateservice", "--grpc-auth-mode", "static", "--grpc-auth-static-password-file", staticAuthFile.getPath() )).inheritIO().start(); diff --git a/java/grpc-client/src/test/java/io/client/grpc/GrpcClientTest.java b/java/grpc-client/src/test/java/io/client/grpc/GrpcClientTest.java index 2f37c3ef971..1ff1bba9448 100644 --- a/java/grpc-client/src/test/java/io/client/grpc/GrpcClientTest.java +++ b/java/grpc-client/src/test/java/io/client/grpc/GrpcClientTest.java @@ -57,7 +57,7 @@ public static void setUpBeforeClass() throws Exception { "--logtostderr", "--grpc-port", Integer.toString(port), - "--service_map", + "--service-map", "grpc-vtgateservice")) .inheritIO() .start(); diff --git a/java/grpc-client/src/test/java/io/client/grpc/GrpcClientTlsClientAuthTest.java b/java/grpc-client/src/test/java/io/client/grpc/GrpcClientTlsClientAuthTest.java index c52db926cb2..bdc9e7e38ae 100644 --- a/java/grpc-client/src/test/java/io/client/grpc/GrpcClientTlsClientAuthTest.java +++ b/java/grpc-client/src/test/java/io/client/grpc/GrpcClientTlsClientAuthTest.java @@ -173,7 +173,7 @@ private static void startVtgate() throws Exception { final String key = certDirectory.getCanonicalPath() + File.separatorChar + "server-key.pem"; final String vtgateCommand = String.format( - "%s --grpc-cert %s --grpc-key %s --grpc-ca %s --logtostderr --grpc-port %s --service_map grpc-vtgateservice", + "%s --grpc-cert %s --grpc-key %s --grpc-ca %s --logtostderr --grpc-port %s --service-map grpc-vtgateservice", vtRoot + "/bin/vtgateclienttest", cert, key, caCert, Integer.toString(port)); System.out.println(vtgateCommand); vtgateclienttest = new ProcessBuilder(vtgateCommand.split(" ")).inheritIO().start(); diff --git a/java/grpc-client/src/test/java/io/client/grpc/GrpcClientTlsTest.java b/java/grpc-client/src/test/java/io/client/grpc/GrpcClientTlsTest.java index 576918412f2..1d96c73be1c 100644 --- a/java/grpc-client/src/test/java/io/client/grpc/GrpcClientTlsTest.java +++ b/java/grpc-client/src/test/java/io/client/grpc/GrpcClientTlsTest.java @@ -153,7 +153,7 @@ private static void startVtgate() throws Exception { final String key = certDirectory.getCanonicalPath() + File.separatorChar + "server-key.pem"; final String vtgate = String.format( - "%s --grpc-cert %s --grpc-key %s --logtostderr --grpc-port %s --service_map grpc-vtgateservice", + "%s --grpc-cert %s --grpc-key %s --logtostderr --grpc-port %s --service-map grpc-vtgateservice", vtRoot + "/bin/vtgateclienttest", cert, key, diff --git a/java/grpc-client/src/test/java/io/client/grpc/GrpcClientWithRetriesTest.java b/java/grpc-client/src/test/java/io/client/grpc/GrpcClientWithRetriesTest.java index 452f0e26450..29420ff37f3 100644 --- a/java/grpc-client/src/test/java/io/client/grpc/GrpcClientWithRetriesTest.java +++ b/java/grpc-client/src/test/java/io/client/grpc/GrpcClientWithRetriesTest.java @@ -52,7 +52,7 @@ public static void setUpBeforeClass() throws Exception { "--logtostderr", "--grpc-port", Integer.toString(port), - "--service_map", + "--service-map", "grpc-vtgateservice")) .inheritIO() .start(); diff --git a/test.go b/test.go index c8dd310a0b0..437cba40e6f 100755 --- a/test.go +++ b/test.go @@ -58,6 +58,8 @@ import ( "sync" "syscall" "time" + + "vitess.io/vitess/go/vt/utils" ) var usage = `Usage of test.go: @@ -183,7 +185,7 @@ func (t *Test) run(dir, dataDir string) ([]byte, error) { testCmd = append(testCmd, "-keep-data") } } else { - testCmd = []string{"test/" + t.File, "-v", "--skip-build", "--keep-logs"} + testCmd = []string{"test/" + t.File, "-v", "--skip-build", utils.GetFlagVariantForTests("--keep-logs")} testCmd = append(testCmd, t.Args...) } if *partialKeyspace {