Add reserve nodes to existing deployment

This article explains how to add nodes to an existing deployment and define them as reserve nodes.

You can add one or more reserve nodes to an existing deployment by cloning one of the nodes in the deployment. The new nodes are automatically started up as inactive (database not running) and can then be added to the cluster as reserve nodes.

You cannot remove active nodes from an Exasol database. If you want to reduce the number of active nodes in a cluster, you must delete the database and the data volume and create a new deployment.

The following examples use the c4 and confd_client command-line tools in a Linux terminal. To learn more about these tools, see Exasol Deployment Tool (c4) and ConfD.

Prerequisites

Set the config path

When you make changes to an existing deployment you must use the same configuration that was used when creating the deployment. If the configuration file that was used is not named config and/or is not located in the current working directory (on the host where you run c4), you must prepend the c4 commands with the path to the configuration file using CCC_CONFIG=<path-to-config>.

Example:
Copy
CCC_CONFIG=./path_to_config/my_config c4 <command>

In the following examples, the default configuration file is used.

Check the CCC_HOST_CLEANUP parameter

The deployment must have been created with the configuration parameter CCC_HOST_CLEANUP set to false. To check this parameter, use CCC_CONFIG=<path-to-config> c4 config -K ccc_host_cleanup. The default value is true.

If the deployment has the configuration parameter CCC_HOST_CLEANUP=true, or if it is unset (empty), you must download the software package of the currently installed Exasol version into the home directory of the node that you will clone. To check which Exasol version is installed, use c4 ps.

Example:
Copy
CCC_CONFIG=config ./c4 config -K ccc_host_cleanup
Found 1 results for query `ccc_host_cleanup`:

    CCC_HOST_CLEANUP (bool)

      Default value : true
      Current value : [empty]
...      
Copy
CCC_CONFIG=config ./c4 ps
      N  PLAY_ID   NODE  MEDIUM  INSTANCE  DB_VERSION  EXTERNAL_IP     INTERNAL_IP  STAGE  STATE      UPTIME    TTL
  ┌─  1  c3275f84  11    host    -         8.34.0      203.0.113.11    10.0.0.11    d      running    04:35:16  +∞
...
Copy
CCC_CONFIG=config ./c4 connect -t 1.11/host
VERSION=8.34.0
curl https://x-up.s3.amazonaws.com/releases/exasol/linux/x86_64/$VERSION/exasol-$VERSION.tar.gz -O

When the Exasol package has been downloaded, use Control+D to disconnect from the host.

Procedure

Step 1: Prepare the hosts

Prepare the new host machines according to the hardware, network, and operating system requirements described in System Requirements.

Step 2: Reserve the nodes in the configuration

On a jump host that has SSH access to the cluster nodes, run the c4 command CCC_CONFIG=config c4 host reserve <PLAY_ID> with the following command-line parameters:

Parameter Description

--ccc-host-reserved-addrs

Private IP address of a host that you want to add to the cluster.

You must repeat the parameter for each additional host, separated by a space: --ccc-host-reserved-addrs <host_1> --ccc-host-reserved-addrs <host_2> and so on.

--ccc-host-reserved-external-addrs

Public IP address of a host that you want to add to the cluster.

You must repeat the parameter for each additional host, separated by a a space: --ccc-host-reserved-external-addrs <host_1> --ccc-host-reserved-external-addrs <host_2> and so on.

This parameter is only required if the existing data nodes were deployed with public IP addresses (CCC_HOST_EXTERNAL_ADDRS was set at deploy time).

These parameters must be defined on the command line as part of the c4 host reserve command. They cannot be defined in the configuration file or as environment variables before the command.

For more details about parameter formats, see Parameters in c4.

Example:

Get the play ID and other details for the deployment:

Copy
CCC_CONFIG=config c4 ps
      N  PLAY_ID   NODE  MEDIUM  INSTANCE  DB_VERSION  EXTERNAL_IP     INTERNAL_IP  STAGE  STATE      UPTIME    TTL
  ┌─  1  c3275f84  11    host    -         8.34.0      203.0.113.11    10.0.0.11    d      running    04:35:16  +∞
  │   1  c3275f84  12    host    -         8.34.0      203.0.113.12    10.0.0.11    d      running    04:35:16  +∞
  └─  1  c3275f84  13    host    -         8.34.0      203.0.113.13    10.0.0.13    d      running    04:35:15  +∞

Reserve private and public IP addresses for the new nodes:

Copy
CCC_CONFIG=config c4 host reserve --ccc-host-reserved-addrs 10.0.0.14 --ccc-host-reserved-addrs 10.0.0.15 --ccc-host-reserved-external-addrs 203.0.113.14 --ccc-host-reserved-external-addrs 203.0.113.15 c3275f84 

Step 3: Connect to COS

Connect to the cluster operating system (COS) using c4 connect -i PLAY_ID -s cos.

Example:
Copy
./c4 connect -i c3275f84 -s cos

For more information about how to use c4 connect, see How to use c4.

This procedure uses the command-line tool confd_client, which is available on all database nodes. You can also access ConfD through XML-RPC in your own Python programs. For more information, see ConfD.

Placeholder values are indicated with UPPERCASE characters. Replace the placeholders with your own values.

Step 4: Add the nodes to the deployment

To add the nodes to the deployment, use the ConfD job infra_instances_add with the following parameters:

Parameter name Data type Description
nid integer ID of an existing node. The configuration of this node will be cloned to create the new nodes.
num_nodes integer The number of nodes that you want to create.
Example:

This example adds two nodes by cloning the node with ID 11.

Copy
confd_client infra_instances_add nid: 11 num_nodes: 2

The added nodes will automatically start up and reach deployment stage c (COS service running, database not running). At this point the nodes are not yet part of the cluster.

Step 5: Add the nodes to the cluster

To add the new nodes to the cluster as reserve nodes, use the ConfD job db_add_reserve_nodes with the following parameters:

Parameter Name Data type Description
db_name string The name of the database
node_list list List of node IDs (integers) to add as reserve nodes
Example:
Copy
confd_client db_add_reserve_nodes db_name: MY_DATABASE node_list: '[15, 16]'

Step 6: Verify that the nodes are added

To verify that the nodes are added, use the ConfD job node_list.

Copy
confd_client node_list