Skip to content

Commit

Permalink
[Automated] Merged refs/heads/k8s-sync-2024-10-09-1728-3979ce6e9aea22…
Browse files Browse the repository at this point in the history
…2adf196cf750af50b2b127335a into target main
  • Loading branch information
github-actions[bot] authored Oct 10, 2024
2 parents 7811558 + 211ff98 commit 12b86bb
Show file tree
Hide file tree
Showing 22 changed files with 89 additions and 50 deletions.
6 changes: 4 additions & 2 deletions commands/cmd_add_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,14 @@ func makeCmdAddNode() *cobra.Command {
Examples:
# Add a single host to the existing database with config file
vcluster add_node --db-name test_db --new-hosts 10.20.30.43 \
--config /opt/vertica/config/vertica_cluster.yaml
--config /opt/vertica/config/vertica_cluster.yaml \
--password "PASSWORD"
# Add multiple hosts to the existing database with user input
vcluster add_node --db-name test_db --new-hosts 10.20.30.43,10.20.30.44 \
--data-path /data --hosts 10.20.30.40 \
--node-names v_test_db_node0001,v_test_db_node0002
--node-names v_test_db_node0001,v_test_db_node0002 \
--password "PASSWORD"
`,
[]string{dbNameFlag, configFlag, hostsFlag, ipv6Flag, dataPathFlag, depotPathFlag,
passwordFlag},
Expand Down
14 changes: 9 additions & 5 deletions commands/cmd_add_subcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,26 @@ Examples:
# Add a subcluster with config file
vcluster add_subcluster --subcluster sc1 \
--config /opt/vertica/config/vertica_cluster.yaml \
--is-primary --control-set-size 1
--is-primary --control-set-size 1 \
--password "PASSWORD"
# Add a subcluster with user input
vcluster add_subcluster --subcluster sc1 --db-name test_db \
--hosts 10.20.30.40,10.20.30.41,10.20.30.42 \
--is-primary --control-set-size -1
--is-primary --control-set-size -1 \
--password "PASSWORD"
# Add a subcluster and new nodes in the subcluster with config file
vcluster add_subcluster --subcluster sc1 \
--config /opt/vertica/config/vertica_cluster.yaml \
--is-primary --control-set-size 1 --new-hosts 10.20.30.43
--is-primary --control-set-size 1 --new-hosts 10.20.30.43 \
--password "PASSWORD"
# Add a subcluster new nodes in the subcluster with user input
vcluster add_subcluster --subcluster sc1 --db-name test_db \
--hosts 10.20.30.40,10.20.30.41,10.20.30.42 \
--is-primary --control-set-size -1 --new-hosts 10.20.30.43
--hosts 10.20.30.40,10.20.30.41,10.20.30.42 \
--is-primary --control-set-size -1 --new-hosts 10.20.30.43 \
--password "PASSWORD"
`,
[]string{dbNameFlag, configFlag, hostsFlag, ipv6Flag, eonModeFlag, passwordFlag,
dataPathFlag, depotPathFlag},
Expand Down
4 changes: 2 additions & 2 deletions commands/cmd_config_recover.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ Examples:
# Recover the config file to the default location
vcluster manage_config recover --db-name test_db \
--hosts 10.20.30.41,10.20.30.42,10.20.30.43 \
--catalog-path /data --depot-path /data --password ""
--catalog-path /data --depot-path /data --password "PASSWORD"
# Recover the config file to /tmp/vertica_cluster.yaml
vcluster manage_config recover --db-name test_db \
--hosts 10.20.30.41,10.20.30.42,10.20.30.43 \
--catalog-path /data --depot-path /data \
--config /tmp/vertica_cluster.yaml --password ""
--config /tmp/vertica_cluster.yaml --password "PASSWORD"
`,
[]string{dbNameFlag, hostsFlag, catalogPathFlag, depotPathFlag, ipv6Flag, configFlag, passwordFlag},
)
Expand Down
4 changes: 2 additions & 2 deletions commands/cmd_create_archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ func makeCmdCreateArchive() *cobra.Command {
Examples:
# Create an archive in a given archive name
vcluster create_archive --db-name DBNAME --archive-name ARCHIVE_ONE
vcluster create_archive --db-name DBNAME --archive-name ARCHIVE_ONE --password "PASSWORD"
# Create an archive in a given archive name and number of restore point(default 3)
vcluster create_archive --db-name DBNAME --archive-name ARCHIVE_ONE \
--num-restore-points 6
--num-restore-points 6 --password "PASSWORD"
# Create an archive in main cluster with user input password
vcluster create_archive --db-name DBNAME --archive-name ARCHIVE_ONE \
Expand Down
5 changes: 3 additions & 2 deletions commands/cmd_create_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ Examples:
--hosts 10.20.30.40,10.20.30.41,10.20.30.42 \
--catalog-path /data --data-path /data \
--config-param HttpServerConf=/opt/vertica/config/https_certs/httpstls.json \
--config $HOME/custom/directory/vertica_cluster.yaml
--config $HOME/custom/directory/vertica_cluster.yaml \
--password "PASSWORD"
# Read the password from file
vcluster create_db --db-name test_db \
Expand All @@ -76,7 +77,7 @@ Examples:
vcluster create_db --db-name test_db \
--hosts 10.20.30.40,10.20.30.41,10.20.30.42 \
--catalog-path /data --data-path /data \
--password 12345678
--password "PASSWORD"
`,
[]string{dbNameFlag, hostsFlag, catalogPathFlag, dataPathFlag, depotPathFlag,
communalStorageLocationFlag, passwordFlag, configFlag, ipv6Flag, configParamFlag},
Expand Down
9 changes: 6 additions & 3 deletions commands/cmd_get_draining_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,18 @@ func makeCmdGetDrainingStatus() *cobra.Command {
Examples:
# Show draining status of all subclusters in main cluster with user input
vcluster get_draining_status --db-name test_db \
--hosts 10.20.30.40,10.20.30.41,10.20.30.42
--hosts 10.20.30.40,10.20.30.41,10.20.30.42 \
--password "PASSWORD"
# Show draining status of all subclusters in main cluster with config file
vcluster get_draining_status \
--config /opt/vertica/config/vertica_cluster.yaml
--config /opt/vertica/config/vertica_cluster.yaml \
--password "PASSWORD"
# Show draining status of all subclusters in a sandbox with config file
vcluster get_draining_status --sandbox sand1 \
--config /opt/vertica/config/vertica_cluster.yaml
--config /opt/vertica/config/vertica_cluster.yaml \
--password "PASSWORD"
`,
[]string{dbNameFlag, configFlag, passwordFlag, hostsFlag, ipv6Flag, sandboxFlag,
eonModeFlag, outputFileFlag},
Expand Down
6 changes: 4 additions & 2 deletions commands/cmd_install_packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ func makeCmdInstallPackages() *cobra.Command {
Examples:
# Install default packages with user input
vcluster install_packages --db-name test_db \
--hosts 10.20.30.40,10.20.30.41,10.20.30.42
--hosts 10.20.30.40,10.20.30.41,10.20.30.42 \
--password "PASSWORD"
# Force (re)install default packages with config file
vcluster install_packages --db-name test_db --force-reinstall \
--config /opt/vertica/config/vertica_cluster.yaml
--config /opt/vertica/config/vertica_cluster.yaml \
--password "PASSWORD"
`,
[]string{dbNameFlag, configFlag, hostsFlag, ipv6Flag, passwordFlag, outputFileFlag},
)
Expand Down
4 changes: 2 additions & 2 deletions commands/cmd_list_all_nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ Nodes separated by a sandbox have the state "UNKNOWN."
Examples:
# List the status of nodes with config file where password authentication is
# used to access the database
vcluster list_all_nodes --password testpassword \
--config /opt/vertica/config/vertica_cluster.yaml
vcluster list_all_nodes --password "PASSWORD" \
--config /opt/vertica/config/vertica_cluster.yaml
`,
[]string{dbNameFlag, hostsFlag, passwordFlag, ipv6Flag, catalogPathFlag, configFlag, outputFileFlag},
)
Expand Down
6 changes: 4 additions & 2 deletions commands/cmd_re_ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ This file should only include the IP addresses of nodes that you want to update.
Examples:
# Alter the IP address of database nodes with user input
vcluster re_ip --db-name test_db --hosts 10.20.30.40,10.20.30.41,10.20.30.42 \
--catalog-path /data --re-ip-file /data/re_ip_map.json
--catalog-path /data --re-ip-file /data/re_ip_map.json \
--password "PASSWORD"
# Alter the IP address of database nodes with config file
vcluster re_ip --db-name test_db --re-ip-file /data/re_ip_map.json \
--config /opt/vertica/config/vertica_cluster.yaml
--config /opt/vertica/config/vertica_cluster.yaml \
--password "PASSWORD"
`,
[]string{dbNameFlag, hostsFlag, ipv6Flag, catalogPathFlag, configParamFlag, configFlag},
)
Expand Down
6 changes: 4 additions & 2 deletions commands/cmd_remove_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,13 @@ Examples:
# Remove multiple nodes from the existing database with config file
vcluster remove_node --db-name test_db \
--remove 10.20.30.40,10.20.30.42 \
--config /opt/vertica/config/vertica_cluster.yaml
--config /opt/vertica/config/vertica_cluster.yaml \
--password "PASSWORD"
# Remove a single node from the existing database with user input
vcluster remove_node --db-name test_db --remove 10.20.30.42 \
--hosts 10.20.30.40 --data-path /data
--hosts 10.20.30.40 --data-path /data \
--password "PASSWORD"
`,
[]string{dbNameFlag, configFlag, hostsFlag, ipv6Flag, catalogPathFlag, dataPathFlag, depotPathFlag, passwordFlag},
)
Expand Down
6 changes: 4 additions & 2 deletions commands/cmd_remove_subcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ func makeCmdRemoveSubcluster() *cobra.Command {
Examples:
# Remove a subcluster with config file
vcluster remove_subcluster --subcluster sc1 \
--config /opt/vertica/config/vertica_cluster.yaml
--config /opt/vertica/config/vertica_cluster.yaml \
--password "PASSWORD"
# Remove a subcluster with user input
vcluster remove_subcluster --db-name test_db \
--hosts 10.20.30.40,10.20.30.41,10.20.30.42 --subcluster sc1 \
--data-path /data --depot-path /data
--data-path /data --depot-path /data \
--password "PASSWORD"
`,
[]string{dbNameFlag, configFlag, hostsFlag, ipv6Flag, eonModeFlag, dataPathFlag, depotPathFlag, passwordFlag},
)
Expand Down
6 changes: 3 additions & 3 deletions commands/cmd_restart_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,20 @@ One of --restart and --start-hosts is required.
Examples:
# Start a single node in the database with config file
vcluster start_node --db-name test_db \
--start v_test_db_node0004=10.20.30.43 --password testpassword \
--start v_test_db_node0004=10.20.30.43 --password "PASSWORD" \
--config /opt/vertica/config/vertica_cluster.yaml
# Start a single node and change its IP address in the database
# with config file (assuming the node IP address previously stored
# catalog was not 10.20.30.44)
vcluster start_node --db-name test_db \
--start v_test_db_node0004=10.20.30.44 --password testpassword \
--start v_test_db_node0004=10.20.30.44 --password "PASSWORD" \
--config /opt/vertica/config/vertica_cluster.yaml
# Start multiple nodes in the database with config file
vcluster start_node --db-name test_db \
--start v_test_db_node0003=10.20.30.42,v_test_db_node0004=10.20.30.43 \
--password testpassword --config /opt/vertica/config/vertica_cluster.yaml
--password "PASSWORD" --config /opt/vertica/config/vertica_cluster.yaml
`,
[]string{dbNameFlag, hostsFlag, ipv6Flag, configFlag, passwordFlag},
)
Expand Down
9 changes: 6 additions & 3 deletions commands/cmd_revive_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,21 @@ Examples:
vcluster revive_db --db-name test_db \
--hosts 10.20.30.40,10.20.30.41,10.20.30.42 \
--communal-storage-location /communal \
--config /opt/vertica/config/vertica_cluster.yaml
--config /opt/vertica/config/vertica_cluster.yaml \
--password "PASSWORD"
# Describe the database only when reviving the database
vcluster revive_db --db-name test_db --communal-storage-location /communal \
--display-only
--display-only \
--password "PASSWORD"
# Revive a database with user input by restoring to a given restore point
vcluster revive_db --db-name test_db \
--hosts 10.20.30.40,10.20.30.41,10.20.30.42 \
--communal-storage-location /communal \
--config /opt/vertica/config/vertica_cluster.yaml --force-removal \
--ignore-cluster-lease --restore-point-archive db --restore-point-index 1
--ignore-cluster-lease --restore-point-archive db --restore-point-index 1 \
--password "PASSWORD"
`,
[]string{dbNameFlag, hostsFlag, ipv6Flag, communalStorageLocationFlag, configFlag, outputFileFlag, configParamFlag},
Expand Down
4 changes: 3 additions & 1 deletion commands/cmd_sandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ Examples:
# Sandbox a subcluster with config file
vcluster sandbox_subcluster --subcluster sc1 --sandbox sand \
--config /opt/vertica/config/vertica_cluster.yaml
--password "PASSWORD"
# Sandbox a subcluster with user input
vcluster sandbox_subcluster --subcluster sc1 --sandbox sand \
--hosts 10.20.30.40,10.20.30.41,10.20.30.42 --db-name test_db
--hosts 10.20.30.40,10.20.30.41,10.20.30.42 --db-name test_db \
--password "PASSWORD"
`,
[]string{dbNameFlag, configFlag, hostsFlag, ipv6Flag, passwordFlag},
)
Expand Down
6 changes: 4 additions & 2 deletions commands/cmd_save_restore_point.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ func makeCmdSaveRestorePoint() *cobra.Command {
Examples:
# Save restore point in a given archive with user input
vcluster save_restore_point --db-name test_db \
--archive-name ARCHIVE_ONE
--archive-name ARCHIVE_ONE \
--password "PASSWORD"
# Save restore point for a sandbox
vcluster save_restore_point --db-name test_db \
--archive-name ARCHIVE_ONE --sandbox SANDBOX_ONE
--archive-name ARCHIVE_ONE --sandbox SANDBOX_ONE \
--password "PASSWORD"
`,
[]string{dbNameFlag, hostsFlag, passwordFlag,
Expand Down
2 changes: 1 addition & 1 deletion commands/cmd_show_restore_points.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Examples:
# List restore points without filters with user input
vcluster show_restore_points --db-name test_db \
--hosts 10.20.30.40,10.20.30.41,10.20.30.42 \
--communal-storage-location /communal
--communal-storage-location /communal
# List restore points without filters with config file
vcluster show_restore_points --db-name test_db \
Expand Down
11 changes: 8 additions & 3 deletions commands/cmd_start_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,18 @@ specified nodes are started, and the specified subset must be a quorum of nodes.
Examples:
# Start a database with config file using password authentication
vcluster start_db --password testpassword \
--config /opt/vertica/config/vertica_cluster.yaml
--config /opt/vertica/config/vertica_cluster.yaml \
--password "PASSWORD"
# Start a database partially with config file on a sandbox
vcluster start_db --password testpassword \
--config /home/dbadmin/vertica_cluster.yaml --sandbox "sand"
--config /home/dbadmin/vertica_cluster.yaml --sandbox "sand" \
--password "PASSWORD"
# Start a database partially with config file on a sandbox
vcluster start_db --password testpassword \
--config /home/dbadmin/vertica_cluster.yaml --main-cluster-only
--config /home/dbadmin/vertica_cluster.yaml --main-cluster-only \
--password "PASSWORD"
`,
[]string{dbNameFlag, hostsFlag, communalStorageLocationFlag, ipv6Flag,
configFlag, catalogPathFlag, passwordFlag, eonModeFlag, configParamFlag},
Expand Down
11 changes: 7 additions & 4 deletions commands/cmd_start_replication.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,25 @@ if any one of the following conditions are met:
Examples:
# Start database replication with config and connection file
vcluster replication start --config /opt/vertica/config/vertica_cluster.yaml \
--target-conn /opt/vertica/config/target_connection.yaml
--target-conn /opt/vertica/config/target_connection.yaml \
--password "PASSWORD"
# Replicate data from a sandbox in the source database to a target database
# specified in the connection file.
vcluster replication start --config /opt/vertica/config/vertica_cluster.yaml \
--target-conn /opt/vertica/config/target_connection.yaml --sandbox sand
--target-conn /opt/vertica/config/target_connection.yaml --sandbox sand \
--password "PASSWORD"
# Start database replication with user input and connection file
vcluster replication start --db-name test_db --hosts 10.20.30.40 \
--target-conn /opt/vertica/config/target_connection.yaml
--target-conn /opt/vertica/config/target_connection.yaml \
--password "PASSWORD"
# Start database replication with config and connection file
# tls option and tls-based authentication
vcluster replication start --config /opt/vertica/config/vertica_cluster.yaml \
--key-file /path/to/key-file --cert-file /path/to/cert-file \
--target-conn /opt/vertica/config/target_connection.yaml --source-tlsconfig test_tlsconfig
--target-conn /opt/vertica/config/target_connection.yaml --source-tlsconfig test_tlsconfig
# Start database replication with user input
# option and password-based authentication
Expand Down
6 changes: 4 additions & 2 deletions commands/cmd_start_subcluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ func makeCmdStartSubcluster() *cobra.Command {
Examples:
# Start a subcluster with config file
vcluster start_subcluster --subcluster sc1 \
--config /opt/vertica/config/vertica_cluster.yaml
--config /opt/vertica/config/vertica_cluster.yaml \
--password "PASSWORD"
# Start a subcluster with user input
vcluster start_subcluster --db-name test_db \
--hosts 10.20.30.40,10.20.30.41,10.20.30.42 --subcluster sc1
--hosts 10.20.30.40,10.20.30.41,10.20.30.42 --subcluster sc1 \
--password "PASSWORD"
`,
[]string{dbNameFlag, configFlag, hostsFlag, ipv6Flag, eonModeFlag, passwordFlag},
)
Expand Down
2 changes: 1 addition & 1 deletion commands/cmd_stop_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func makeCmdStopDB() *cobra.Command {
Examples:
# Stop a database with config file using password authentication
vcluster stop_db --password testpassword \
vcluster stop_db --password "PASSWORD" \
--config /opt/vertica/config/vertica_cluster.yaml
`,
[]string{dbNameFlag, hostsFlag, ipv6Flag, eonModeFlag, configFlag, passwordFlag},
Expand Down
6 changes: 4 additions & 2 deletions commands/cmd_stop_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ nodes will be set to read-only mode to prevent data loss.
Examples:
# Gracefully stop a node with config file
vcluster stop_node --stop-hosts 10.20.30.43 \
--config /home/dbadmin/vertica_cluster.yaml
--config /home/dbadmin/vertica_cluster.yaml \
--password "PASSWORD"
# Gracefully stop nodes with user input
vcluster stop_node --db-name test_db --stop-hosts 10.20.30.40,10.20.30.41 \
--hosts 10.20.30.40,10.20.30.41,10.20.30.42
--hosts 10.20.30.40,10.20.30.41,10.20.30.42 \
--password "PASSWORD"
`,
[]string{dbNameFlag, hostsFlag, ipv6Flag, configFlag, passwordFlag},
)
Expand Down
6 changes: 4 additions & 2 deletions commands/cmd_unsandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,13 @@ directory path_to_catalog_of_sc1/metadata/sandbox_name.
Examples:
# Unsandbox a subcluster with config file
vcluster unsandbox_subcluster --subcluster sc1 \
--config /opt/vertica/config/vertica_cluster.yaml
--config /opt/vertica/config/vertica_cluster.yaml \
--password "PASSWORD"
# Unsandbox a subcluster with user input
vcluster unsandbox_subcluster --subcluster sc1 \
--hosts 10.20.30.40,10.20.30.41,10.20.30.42 --db-name test_db
--hosts 10.20.30.40,10.20.30.41,10.20.30.42 --db-name test_db \
--password "PASSWORD"
`,
[]string{dbNameFlag, configFlag, ipv6Flag, passwordFlag, hostsFlag},
)
Expand Down

0 comments on commit 12b86bb

Please sign in to comment.