You are viewing an older version of this section. View current production version.
update-config
MemSQL Helios does not support this command.
Update configuration for one or all SingleStoreDB nodes in the cluster.
Usage
Update configuration for one or all SingleStoreDB nodes in the cluster
Usage:
sdb-admin update-config [flags]
Flags:
-a, --all Update all nodes in the cluster
-h, --help Help for update-config
--key string The configuration key to update
--memsql-id MemsqlID The node ID of the node on which to update the configuration
--reset Reset the key to the default value (formerly --delete)
--role {master, aggregator, leaf, unknown} Update only nodes with the given role. Possible roles are LEAF, AGGREGATOR, and MASTER (default Unspecified)
--set-global Execute the associated SET GLOBAL statement
--value string The value to set for the key
Global Flags:
--backup-cache FILE_PATH File path for the backup cache
--cache-file FILE_PATH File path for the Toolbox node cache
-c, --config FILE_PATH File path for the Toolbox configuration
--disable-colors Disable color output in console, which some terminal sessions/environments may have difficulty with
--disable-spinner Disable the progress spinner, which some terminal sessions/environments may have issues with
-j, --json Enable JSON output
--parallelism POSITIVE_INTEGER Maximum number of operations to run in parallel
--runtime-dir DIRECTORY_PATH Where to store Toolbox runtime data
--ssh-control-persist SECONDS Enable SSH ControlPersist and set it to the specified duration in seconds
--ssh-max-sessions POSITIVE_INTEGER Maximum number of SSH sessions to open per host, must be at least 3
--ssh-strict-host-key-checking Enable strict host key checking for SSH connections
--ssh-user-known-hosts-file FILE_PATH Path to the user known_hosts file for SSH connections. If not set, /dev/null will be used
--state-file FILE_PATH Toolbox state file path
-v, --verbosity count Increase logging verbosity: valid values are 1, 2, 3. Usage -v=count or --verbosity=count
-y, --yes Enable non-interactive mode and assume the user would like to move forward with the proposed actions by default
Remarks
For the target MemSQL nodes, update-config instructs each node, on startup, to set the engine variable (specified by the --key) to the --value.
If --set-global is specified, update-config will connect to the node (if the process is running) and run SET GLOBAL, setting the variable specified by the --key to the --value. This enables the variable’s value to be set before the node restarts.
Using --set-global is equivalent to running SET GLOBAL on a non-sync variable or running SET CLUSTER on a sync variable.
If --reset is specified, it will reset both the SET GLOBAL variables and the MemSQL config file variables.
This command is interactive unless you use either the --yes or --json flags to override interactive behavior.
If the engine variable (specified by the --key) is a sync variable:
- You must specify the
--memsql-idof the master aggregator. - You must specify the
--set-globalparameter. - You cannot specify the
--allparameter.
Example 1
The following example sets the general_log engine variable on all nodes on the local machine.
sdb-admin update-config --all --set-global --key "general_log" --value "PARTIAL"
Output:
Toolbox is about to run 'memsqlctl update-config --key general_log --value PARTIAL --set-global'
on the following nodes:
- On host 127.0.0.1:
+ 24084C82FD8E4342EF61ED4D85105A1CF5A264F5
+ B72DD1417CBAEAC04FD71ED3E0CAC81A723DB43C
Would you like to continue? [y/N]: y
✓ Updated configuration on 127.0.0.1
Operation completed successfully
Example 2
The following example attempts to set a sync variable on a leaf node.
sdb-admin update-config --memsql-id B72DD1417CBAEAC04FD71ED3E0CAC81A723DB43C --set-global
--key "default_distributed_ddl_timeout" --value "15"
As expected, update-config fails with the following error:
Variable default_distributed_ddl_timeout must be set on a Master Aggregator
To correct this error, run sdb-admin update-config using the --memsql-id of the Master Aggregator.