diff --git a/CHANGELOG.md b/CHANGELOG.md index 806bf13..66e61e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,3 +30,8 @@ Initial release. # 4.2.0 - [CHANGE] Fix incompatible command arguments for artifacts (2020-02-19) release + +# 4.3.0 + +- [CHANGE] Added support for 9fe7fd3 (2020-05-20) release +- [CHANGE] Some deprecated flags are removed diff --git a/Gemfile b/Gemfile index 1f4b83d..c00ff33 100644 --- a/Gemfile +++ b/Gemfile @@ -14,6 +14,6 @@ end group :kitchen_common do gem 'kitchen-docker' - gem 'kitchen-inspec' + gem 'kitchen-inspec', '<= 1.3.1' gem 'test-kitchen' end diff --git a/attributes/default.rb b/attributes/default.rb index 20ca2e4..5e6d750 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -8,13 +8,19 @@ # the topology implementation to use default['vitess']['topo_implementation'] = 'etcd2' -default['vitess']['version']['mysqlctld'] = 'v4.0.1-041757f' -default['vitess']['version']['vtctlclient'] = 'v4.0.1-041757f' -default['vitess']['version']['vtctld'] = 'v4.0.1-041757f' -default['vitess']['version']['vtgate'] = 'v4.0.1-041757f' -default['vitess']['version']['vttablet'] = 'v4.0.1-041757f' -default['vitess']['version']['vtworker'] = 'v4.0.1-041757f' -default['vitess']['version']['mysqlctl'] = 'v4.0.1-041757f' -default['vitess']['version']['vtctl'] = 'v4.0.1-041757f' -default['vitess']['version']['vtexplain'] = 'v4.0.1-041757f' -default['vitess']['version']['vtbench'] = 'v4.0.1-041757f' +default['vitess']['version']['mysqlctld'] = 'v6.0-9fe7fd3' +default['vitess']['version']['vtctlclient'] = 'v6.0-9fe7fd3' +default['vitess']['version']['vtctld'] = 'v6.0-9fe7fd3' +default['vitess']['version']['vtgate'] = 'v6.0-9fe7fd3' +default['vitess']['version']['vttablet'] = 'v6.0-9fe7fd3' +default['vitess']['version']['vtworker'] = 'v6.0-9fe7fd3' +default['vitess']['version']['mysqlctl'] = 'v6.0-9fe7fd3' +default['vitess']['version']['vtctl'] = 'v6.0-9fe7fd3' +default['vitess']['version']['vtexplain'] = 'v6.0-9fe7fd3' +default['vitess']['version']['vtbench'] = 'v6.0-9fe7fd3' + +# host to send spans to. if empty, no tracing will be done +default['vitess']['datadog-agent-host'] = nil + +# port to send spans to. if empty, no tracing will be done +default['vitess']['datadog-agent-port'] = nil diff --git a/attributes/mysqlctld.rb b/attributes/mysqlctld.rb index d1e61bf..9484ffb 100644 --- a/attributes/mysqlctld.rb +++ b/attributes/mysqlctld.rb @@ -158,12 +158,12 @@ default['vitess']['mysqlctld']['grpc_initial_window_size'] = nil # After a duration of this time if the client doesn't see any activity it pings the server to see if -# the transport is still alive -default['vitess']['mysqlctld']['grpc_keepalive_time'] = nil +# the transport is still alive. (default 10s) +default['vitess']['mysqlctld']['grpc_keepalive_time'] = '10s' # After having pinged for keepalive check, the client waits for a duration of Timeout and if no -# activity is seen even after that the connection is closed -default['vitess']['mysqlctld']['grpc_keepalive_timeout'] = nil +# activity is seen even after that the connection is closed. (default 10s) +default['vitess']['mysqlctld']['grpc_keepalive_timeout'] = '10s' # key to use, requires grpc_cert, enables TLS default['vitess']['mysqlctld']['grpc_key'] = nil @@ -212,9 +212,6 @@ # keep running at least this long after SIGTERM before stopping (default 50ms) default['vitess']['mysqlctld']['lameduck-period'] = '50ms' -# deprecated: timeout for acquiring topology locks, use remote_operation_timeout (default 30s) -default['vitess']['mysqlctld']['lock_timeout'] = '30s' - # when logging hits line file:N, emit a stack trace default['vitess']['mysqlctld']['log_backtrace_at'] = nil @@ -304,6 +301,12 @@ # The name of the registered push-based monitoring/stats backend to use default['vitess']['mysqlctld']['stats_backend'] = nil +# List of dimensions to be combined into a single "all" value in exported stats vars +default['vitess']['mysqlctld']['stats_combine_dimensions'] = nil + +# Variables to be dropped from the list of exported variables. +default['vitess']['mysqlctld']['stats_drop_variables'] = nil + # Interval between emitting stats to all registered backends (default 1m0s) default['vitess']['mysqlctld']['stats_emit_period'] = '1m0s' diff --git a/attributes/releases.rb b/attributes/releases.rb index 527315c..30b76a5 100644 --- a/attributes/releases.rb +++ b/attributes/releases.rb @@ -1,4 +1,4 @@ -default['vitess']['releases']['041757f']['url'] = - 'https://github.com/planetscale/vitess-releases/releases/download/041757f/vitess-4.0.1-041757f.tar.gz' -default['vitess']['releases']['041757f']['checksum'] = - '29948027a3c40aafb2f8ad298634be8b640b88538034708b904925bba62788a7' +default['vitess']['releases']['9fe7fd3']['url'] = + 'https://github.com/planetscale/vitess-releases/releases/download/9fe7fd3/vitess-6.0-9fe7fd3.tar.gz' +default['vitess']['releases']['9fe7fd3']['checksum'] = + 'c69fba47b364b4eea75b0bff478777764b627dbcd836f723397f306673fe269b' diff --git a/attributes/vtctld.rb b/attributes/vtctld.rb index 91ec267..92518bb 100644 --- a/attributes/vtctld.rb +++ b/attributes/vtctld.rb @@ -87,9 +87,6 @@ # Google Cloud Storage bucket to use for backups default['vitess']['vtctld']['gcs_backup_storage_bucket'] = nil -# This flag is unused and deprecated. It will be removed entirely in a future release -default['vitess']['vtctld']['gcs_backup_storage_project'] = nil - # root prefix for all backup-related object names default['vitess']['vtctld']['gcs_backup_storage_root'] = nil @@ -122,12 +119,12 @@ default['vitess']['vtctld']['grpc_initial_window_size'] = nil # After a duration of this time if the client doesn't see any activity it pings the server to see if -# the transport is still alive -default['vitess']['vtctld']['grpc_keepalive_time'] = nil +# the transport is still alive. (default 10s) +default['vitess']['vtctld']['grpc_keepalive_time'] = '10s' # After having pinged for keepalive check, the client waits for a duration of Timeout and if no -# activity is seen even after that the connection is closed -default['vitess']['vtctld']['grpc_keepalive_timeout'] = nil +# activity is seen even after that the connection is closed. (default 10s) +default['vitess']['vtctld']['grpc_keepalive_timeout'] = '10s' # key to use, requires grpc_cert, enables TLS default['vitess']['vtctld']['grpc_key'] = nil @@ -176,9 +173,6 @@ # use the legacy algorithm when selecting the vttablets for serving (default true) default['vitess']['vtctld']['legacy_replication_lag_algorithm'] = true -# deprecated: timeout for acquiring topology locks, use remote_operation_timeout (default 30s) -default['vitess']['vtctld']['lock_timeout'] = '30s' - # when logging hits line file:N, emit a stack trace default['vitess']['vtctld']['log_backtrace_at'] = nil @@ -244,6 +238,9 @@ # port for the server default['vitess']['vtctld']['port'] = 15_000 +# Setting this true will make vtctld proxy the tablet status instead of redirecting to them +default['vitess']['vtctld']['proxy_tablets'] = nil + # how often try to remove old logs (default 1h0m0s) default['vitess']['vtctld']['purge_logs_interval'] = '1h0m0s' @@ -329,6 +326,12 @@ # The name of the registered push-based monitoring/stats backend to use default['vitess']['vtctld']['stats_backend'] = nil +# List of dimensions to be combined into a single "all" value in exported stats vars +default['vitess']['vtctld']['stats_combine_dimensions'] = nil + +# Variables to be dropped from the list of exported variables. +default['vitess']['vtctld']['stats_drop_variables'] = nil + # Interval between emitting stats to all registered backends (default 1m0s) default['vitess']['vtctld']['stats_emit_period'] = '1m0s' diff --git a/attributes/vtgate.rb b/attributes/vtgate.rb index df48343..1c84570 100644 --- a/attributes/vtgate.rb +++ b/attributes/vtgate.rb @@ -40,9 +40,6 @@ # The default tablet type to set for queries, when one is not explicitly selected (default MASTER) default['vitess']['vtgate']['default_tablet_type'] = 'MASTER' -# if specified, this process will not route any queries to local tablets in the local cell -default['vitess']['vtgate']['disable_local_gateway'] = nil - # the replication lag that is considered too high when selecting the minimum num vttablets for # serving (default 2h0m0s) default['vitess']['vtgate']['discovery_high_replication_lag_minimum_serving'] = '2h0m0s' @@ -100,12 +97,12 @@ default['vitess']['vtgate']['grpc_initial_window_size'] = nil # After a duration of this time if the client doesn't see any activity it pings the server to see if -# the transport is still alive -default['vitess']['vtgate']['grpc_keepalive_time'] = nil +# the transport is still alive. (default 10s) +default['vitess']['vtgate']['grpc_keepalive_time'] = '10s' # After having pinged for keepalive check, the client waits for a duration of Timeout and if no -# activity is seen even after that the connection is closed -default['vitess']['vtgate']['grpc_keepalive_timeout'] = nil +# activity is seen even after that the connection is closed. (default 10s) +default['vitess']['vtgate']['grpc_keepalive_timeout'] = '10s' # key to use, requires grpc_cert, enables TLS default['vitess']['vtgate']['grpc_key'] = nil @@ -168,9 +165,6 @@ # use the legacy algorithm when selecting the vttablets for serving (default true) default['vitess']['vtgate']['legacy_replication_lag_algorithm'] = true -# deprecated: timeout for acquiring topology locks, use remote_operation_timeout (default 30s) -default['vitess']['vtgate']['lock_timeout'] = '30s' - # when logging hits line file:N, emit a stack trace default['vitess']['vtgate']['log_backtrace_at'] = nil @@ -226,6 +220,9 @@ # "mysql_clear_password") default['vitess']['vtgate']['mysql_clientcert_auth_method'] = 'mysql_clear_password' +# Default session workload (OLTP, OLAP, DBA) (default "UNSPECIFIED") +default['vitess']['vtgate']['mysql_default_workload'] = 'UNSPECIFIED' + # JSON File from which to read LDAP server config default['vitess']['vtgate']['mysql_ldap_auth_config_file'] = nil @@ -243,6 +240,9 @@ # If set, also listen for MySQL binary protocol connections on this port. (default -1) default['vitess']['vtgate']['mysql_server_port'] = 15_306 +# Delay after which buffered response will flushed to client. (default 100ms) +default['vitess']['vtgate']['mysql_server_flush_delay'] = '100ms' + # mysql query timeout default['vitess']['vtgate']['mysql_server_query_timeout'] = nil @@ -294,6 +294,9 @@ # port for the server default['vitess']['vtgate']['port'] = 15_001 +# Enable HAProxy PROXY protocol on MySQL listener socket +default['vitess']['vtgate']['proxy_protocol'] = nil + # how often try to remove old logs (default 1h0m0s) default['vitess']['vtgate']['purge_logs_interval'] = '1h0m0s' @@ -334,6 +337,12 @@ # The name of the registered push-based monitoring/stats backend to use default['vitess']['vtgate']['stats_backend'] = nil +# List of dimensions to be combined into a single "all" value in exported stats vars +default['vitess']['vtgate']['stats_combine_dimensions'] = nil + +# Variables to be dropped from the list of exported variables. +default['vitess']['vtgate']['stats_drop_variables'] = nil + # Interval between emitting stats to all registered backends (default 1m0s) default['vitess']['vtgate']['stats_emit_period'] = '1m0s' diff --git a/attributes/vttablet.rb b/attributes/vttablet.rb index 8655215..cbd7a9b 100644 --- a/attributes/vttablet.rb +++ b/attributes/vttablet.rb @@ -52,10 +52,6 @@ # Path to JSON config file for ceph backup storage (default "ceph_backup_config.json") default['vitess']['vttablet']['ceph_backup_storage_config'] = 'ceph_backup_config.json' -# size of a special pool that will be used if the client requests that statements be executed with -# the CLIENT_FOUND_ROWS option of MySQL. (default 20) -default['vitess']['vttablet']['client-found-rows-pool-size'] = 20 - # JSON File to read the topos/tokens from default['vitess']['vttablet']['consul_auth_static_file'] = nil @@ -65,9 +61,6 @@ # deprecated: use db_charset (default "utf8") default['vitess']['vttablet']['db-config-allprivs-charset'] = 'utf8' -# deprecated: dbname does not need to be explicitly configured -default['vitess']['vttablet']['db-config-allprivs-dbname'] = nil - # deprecated: use db_flags default['vitess']['vttablet']['db-config-allprivs-flags'] = nil @@ -104,9 +97,6 @@ # deprecated: use db_charset (default "utf8") default['vitess']['vttablet']['db-config-app-charset'] = 'utf8' -# deprecated: dbname does not need to be explicitly configured -default['vitess']['vttablet']['db-config-app-dbname'] = nil - # deprecated: use db_flags default['vitess']['vttablet']['db-config-app-flags'] = nil @@ -143,9 +133,6 @@ # deprecated: use db_charset (default "utf8") default['vitess']['vttablet']['db-config-appdebug-charset'] = 'utf8' -# deprecated: dbname does not need to be explicitly configured -default['vitess']['vttablet']['db-config-appdebug-dbname'] = nil - # deprecated: use db_flags default['vitess']['vttablet']['db-config-appdebug-flags'] = nil @@ -182,9 +169,6 @@ # deprecated: use db_charset (default "utf8") default['vitess']['vttablet']['db-config-dba-charset'] = 'utf8' -# deprecated: dbname does not need to be explicitly configured -default['vitess']['vttablet']['db-config-dba-dbname'] = nil - # deprecated: use db_flags default['vitess']['vttablet']['db-config-dba-flags'] = nil @@ -221,9 +205,6 @@ # deprecated: use db_charset (default "utf8") default['vitess']['vttablet']['db-config-filtered-charset'] = 'utf8' -# deprecated: dbname does not need to be explicitly configured -default['vitess']['vttablet']['db-config-filtered-dbname'] = nil - # deprecated: use db_flags default['vitess']['vttablet']['db-config-filtered-flags'] = nil @@ -260,9 +241,6 @@ # deprecated: use db_charset (default "utf8") default['vitess']['vttablet']['db-config-repl-charset'] = 'utf8' -# deprecated: dbname does not need to be explicitly configured -default['vitess']['vttablet']['db-config-repl-dbname'] = nil - # deprecated: use db_flags default['vitess']['vttablet']['db-config-repl-flags'] = nil @@ -408,13 +386,15 @@ # true iff we should emit stats to push-based monitoring/stats backends default['vitess']['vttablet']['emit_stats'] = nil -# if the flag is on, a DML outsides a transaction will be auto committed. This flag is deprecated and -# is unsafe. Instead, use the VTGate provided autocommit feature -default['vitess']['vttablet']['enable-autocommit'] = nil - # This option enables the query consolidator. (default true) default['vitess']['vttablet']['enable-consolidator'] = true +# This option enables the query consolidator only on replicas. +default['vitess']['vttablet']['enable-consolidator-replicas'] = nil + +# This option fetches & caches fields (columns) when storing query plans (default true) +default['vitess']['vttablet']['enable-query-plan-field-caching'] = true + # If true replication-lag-based throttling on transactions will be enabled default['vitess']['vttablet']['enable-tx-throttler'] = nil @@ -461,9 +441,6 @@ # Google Cloud Storage bucket to use for backups default['vitess']['vttablet']['gcs_backup_storage_bucket'] = nil -# This flag is unused and deprecated. It will be removed entirely in a future release -default['vitess']['vttablet']['gcs_backup_storage_project'] = nil - # root prefix for all backup-related object names default['vitess']['vttablet']['gcs_backup_storage_root'] = nil @@ -496,12 +473,12 @@ default['vitess']['vttablet']['grpc_initial_window_size'] = nil # After a duration of this time if the client doesn't see any activity it pings the server to see if -# the transport is still alive -default['vitess']['vttablet']['grpc_keepalive_time'] = nil +# the transport is still alive. (default 10s) +default['vitess']['vttablet']['grpc_keepalive_time'] = '10s' # After having pinged for keepalive check, the client waits for a duration of Timeout and if no -# activity is seen even after that the connection is closed -default['vitess']['vttablet']['grpc_keepalive_timeout'] = nil +# activity is seen even after that the connection is closed. (default 10s) +default['vitess']['vttablet']['grpc_keepalive_timeout'] = '10s' # key to use, requires grpc_cert, enables TLS default['vitess']['vttablet']['grpc_key'] = nil @@ -563,7 +540,8 @@ # (init parameter) keyspace to use for this tablet default['vitess']['vttablet']['init_keyspace'] = nil -# (init parameter) populate metadata tables +# (init parameter) populate metadata tables even if restore_from_backup is disabled. +# If restore_from_backup is enabled, metadata tables are always populated regardless of this flag. default['vitess']['vttablet']['init_populate_metadata'] = nil # (init parameter) shard to use for this tablet @@ -578,6 +556,9 @@ # (init parameter) timeout to use for the init phase. (default 1m0s) default['vitess']['vttablet']['init_timeout'] = '1m0s' +# connection timeout to mysqld in milliseconds (0 for no timeout) +default['vitess']['vttablet']['db_connect_timeout_ms'] = 0 + # host and port to send spans to. if empty, no tracing will be done default['vitess']['vttablet']['jaeger-agent-host'] = nil @@ -596,9 +577,6 @@ # How long to keep the table locked before timing out (default 1m0s) default['vitess']['vttablet']['lock_tables_timeout'] = '1m0s' -# deprecated: timeout for acquiring topology locks, use remote_operation_timeout (default 30s) -default['vitess']['vttablet']['lock_timeout'] = '30s' - # when logging hits line file:N, emit a stack trace default['vitess']['vttablet']['log_backtrace_at'] = nil @@ -687,6 +665,9 @@ # mysql tmp directory default['vitess']['vttablet']['mycnf_tmp_dir'] = nil +# Delay after which buffered response will flushed to client. (default 100ms) +default['vitess']['vttablet']['mysql_server_flush_delay'] = '100ms' + # JSON File to read the users/passwords from default['vitess']['vttablet']['mysql_auth_server_static_file'] = nil @@ -735,10 +716,6 @@ # If set, the process will write its pid to the named file, and delete it on graceful shutdown default['vitess']['vttablet']['pid_file'] = nil -# pool name prefix, vttablet has several pools and each of them has a name. This config specifies the -# prefix of these pool names -default['vitess']['vttablet']['pool-name-prefix'] = nil - # if set force an update to all hostnames and reconnect if changed, defaults to 0 (disabled) default['vitess']['vttablet']['pool_hostname_resolve_interval'] = nil @@ -760,9 +737,6 @@ # an acl that exempt from table acl checking (this acl is free to access any vitess tables) default['vitess']['vttablet']['queryserver-config-acl-exempt-acl'] = nil -# query server allow unsafe dml statements -default['vitess']['vttablet']['queryserver-config-allowunsafe-dmls'] = nil - # If this flag is enabled, tabletserver will emit monitoring metrics and let the request pass # regardless of table acl check results default['vitess']['vttablet']['queryserver-config-enable-table-acl-dry-run'] = nil @@ -776,21 +750,13 @@ # query server max dml rows per statement, maximum number of rows allowed to return at a time for an # update or delete with either 1) an equality where clauses on primary keys, or 2) a subselect # statement. For update and delete statements in above two categories, vttablet will split the -# original query into multiple small queries based on this configuration value. (default 500) -default['vitess']['vttablet']['queryserver-config-max-dml-rows'] = 500 +# original query into multiple small queries based on this configuration value. +default['vitess']['vttablet']['queryserver-config-max-dml-rows'] = nil # query server max result size, maximum number of rows allowed to return from vttablet for # non-streaming queries. (default 10000) default['vitess']['vttablet']['queryserver-config-max-result-size'] = 10_000 -# query server message pool prefill parallelism, a non-zero value will prefill the pool using the -# specified parallelism -default['vitess']['vttablet']['queryserver-config-message-conn-pool-prefill-parallelism'] = nil - -# query server message connection pool size, message pool is used by message managers: recommended -# value is one per message table (default 5) -default['vitess']['vttablet']['queryserver-config-message-conn-pool-size'] = 5 - # query server message postpone cap is the maximum number of messages that can be postponed at any # given time. Set this number to substantially lower than transaction cap, so that the transaction # pool isn't exhausted by the message subsystem. (default 4) @@ -817,8 +783,8 @@ default['vitess']['vttablet']['queryserver-config-query-pool-timeout'] = nil # query server query pool waiter limit, this is the maximum number of queries that can be queued -# waiting to get a connection (default 50000) -default['vitess']['vttablet']['queryserver-config-query-pool-waiter-cap'] = 50_000 +# waiting to get a connection (default 5000) +default['vitess']['vttablet']['queryserver-config-query-pool-waiter-cap'] = 5_000 # query server query timeout (in seconds), this is the query timeout in vttablet side. If a query # takes more than this timeout, it will be killed. (default 30) @@ -865,8 +831,8 @@ default['vitess']['vttablet']['queryserver-config-txpool-timeout'] = 1 # query server transaction pool waiter limit, this is the maximum number of transactions that can be -# queued waiting to get a connection (default 50000) -default['vitess']['vttablet']['queryserver-config-txpool-waiter-cap'] = 50_000 +# queued waiting to get a connection (default 5000) +default['vitess']['vttablet']['queryserver-config-txpool-waiter-cap'] = 5_000 # query server result size warning threshold, warn if number of rows returned from vttablet for # non-streaming queries exceeds this @@ -937,12 +903,21 @@ # Interval between emitting stats to all registered backends (default 1m0s) default['vitess']['vttablet']['stats_emit_period'] = '1m0s' +# List of dimensions to be combined into a single "all" value in exported stats vars +default['vitess']['vttablet']['stats_combine_dimensions'] = nil + +# Variables to be dropped from the list of exported variables. +default['vitess']['vttablet']['stats_drop_variables'] = nil + # logs at or above this threshold go to stderr (default 1) default['vitess']['vttablet']['stderrthreshold'] = 1 # path to table access checker config file; send SIGHUP to reload this file default['vitess']['vttablet']['table-acl-config'] = nil +# Ticker to reload ACLs +default['vitess']['vttablet']['table-acl-config-reload-interval'] = nil + # tablet alias default['vitess']['vttablet']['tablet-path'] = nil @@ -1130,6 +1105,9 @@ # the command default['vitess']['vttablet']['xtrabackup_backup_flags'] = nil +# flags to pass to prepare command. These should be space separated and will be added to the end of the command +default['vitess']['vttablet']['xtrabackup_prepare_flags'] = nil + # directory location of the xtrabackup executable, e.g., /usr/bin default['vitess']['vttablet']['xtrabackup_root_path'] = nil diff --git a/attributes/vtworker.rb b/attributes/vtworker.rb index d4e32f2..85a4fb9 100644 --- a/attributes/vtworker.rb +++ b/attributes/vtworker.rb @@ -103,12 +103,12 @@ default['vitess']['vtworker']['grpc_initial_window_size'] = nil # After a duration of this time if the client doesn't see any activity it pings the server to see if -# the transport is still alive -default['vitess']['vtworker']['grpc_keepalive_time'] = nil +# the transport is still alive. (default 10s) +default['vitess']['vtworker']['grpc_keepalive_time'] = '10s' # After having pinged for keepalive check, the client waits for a duration of Timeout and if no -# activity is seen even after that the connection is closed -default['vitess']['vtworker']['grpc_keepalive_timeout'] = nil +# activity is seen even after that the connection is closed. (default 10s) +default['vitess']['vtworker']['grpc_keepalive_timeout'] = '10s' # key to use, requires grpc_cert, enables TLS default['vitess']['vtworker']['grpc_key'] = nil @@ -157,9 +157,6 @@ # use the legacy algorithm when selecting the vttablets for serving (default true) default['vitess']['vtworker']['legacy_replication_lag_algorithm'] = true -# deprecated: timeout for acquiring topology locks, use remote_operation_timeout (default 30s) -default['vitess']['vtworker']['lock_timeout'] = '30s' - # when logging hits line file:N, emit a stack trace default['vitess']['vtworker']['log_backtrace_at'] = nil @@ -260,6 +257,12 @@ # The name of the registered push-based monitoring/stats backend to use default['vitess']['vtworker']['stats_backend'] = nil +# List of dimensions to be combined into a single "all" value in exported stats vars +default['vitess']['vtworker']['stats_combine_dimensions'] = nil + +# Variables to be dropped from the list of exported variables. +default['vitess']['vtworker']['stats_drop_variables'] = nil + # Interval between emitting stats to all registered backends (default 1m0s) default['vitess']['vtworker']['stats_emit_period'] = '1m0s' diff --git a/libraries/base_service.rb b/libraries/base_service.rb index c79baa0..b97aba6 100644 --- a/libraries/base_service.rb +++ b/libraries/base_service.rb @@ -50,6 +50,16 @@ class VitessBaseService < Chef::Resource kind_of: String, default: lazy { node['vitess']['topo_implementation'] } ) + attribute( + :datadog_agent_host, + kind_of: String, + default: lazy { node['vitess']['datadog-agent-host'] } + ) + attribute( + :datadog_agent_port, + kind_of: String, + default: lazy { node['vitess']['datadog-agent-port'] } + ) attribute(:vtroot, kind_of: String, default: '/var/lib/vt') attribute(:vtdataroot, kind_of: String, default: '/var/lib/vtdataroot') @@ -88,6 +98,8 @@ def additional_args 'topo_global_server_address' => new_resource.topo_global_server_address, 'topo_implementation' => new_resource.topo_implementation, } + args['datadog-agent-host'] = new_resource.datadog_agent_host if !new_resource.datadog_agent_host.nil? + args['datadog-agent-port'] = new_resource.datadog_agent_port if !new_resource.datadog_agent_port.nil? args['log_dir'] = service_log_dir if new_resource.args['log_dir'].nil? args end diff --git a/metadata.rb b/metadata.rb index 05c93f1..aaf180d 100644 --- a/metadata.rb +++ b/metadata.rb @@ -7,7 +7,7 @@ issues_url 'https://github.com/vinted/chef-vitess/issues' source_url 'https://github.com/vinted/chef-vitess' chef_version '>= 12.1' if respond_to?(:chef_version) -version '4.2.0' +version '4.3.0' supports 'redhat' supports 'centos' diff --git a/templates/sql/init_db.sql.erb b/templates/sql/init_db.sql.erb index 4a27854..300b4c7 100644 --- a/templates/sql/init_db.sql.erb +++ b/templates/sql/init_db.sql.erb @@ -75,6 +75,13 @@ GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, FILE, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'vt_filtered'@'localhost'; +# User for general MySQL monitoring. +CREATE USER 'vt_monitoring'@'localhost'; +GRANT SELECT, PROCESS, SUPER, REPLICATION CLIENT, RELOAD + ON *.* TO 'vt_monitoring'@'localhost'; +GRANT SELECT, UPDATE, DELETE, DROP + ON performance_schema.* TO 'vt_monitoring'@'localhost'; + # User for Orchestrator (https://github.com/github/orchestrator). CREATE USER 'orc_client_user'@'%' IDENTIFIED BY 'orc_client_user_password'; GRANT SUPER, PROCESS, REPLICATION SLAVE, RELOAD