Add reserve nodes to existing deployment

Learn 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

This operation must be carried out from a jump host that has SSH access to the cluster nodes.

Preparations

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 path is used.

In AWS native cloud deployments of Exasol, skip to Step 2: Connect to COS.

Download Exasol to the cloned node

If the deployment was created with the configuration parameter CCC_HOST_CLEANUP unset (empty) or explicitly set to true, you must download the software package of the currently installed Exasol version into the home directory of the node that you will clone.

If the deployment was created with the configuration parameter CCC_HOST_CLEANUP=false, the Exasol installation package should already be present on the cloned node. In this case you can skip this step.

Example:
  1. Check the value of CCC_HOST_CLEANUP

    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]
    ...      
  2. Check the Exasol version

    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  +∞
    ...
  3. Download Exasol to the node that you will clone (node 11 in this case)

    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.

Prepare the new hosts

Prepare the new physical or virtual host as needed depending on your existing deployment environment. For details about the hardware and operating system requirements, see System requirements.

The nodes in the cluster should be assigned consecutive and evenly spaced static IPv4 addresses in the same subnet.

Procedure

Step 1: Reserve the IP addresses in the configuration

On the jump host, run CCC_CONFIG=config c4 host reserve <PLAY_ID> with the following 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.

For example: --ccc-host-reserved-addrs <host_1> --ccc-host-reserved-addrs <host_2> ...

--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.

For example: --ccc-host-reserved-external-addrs <host_1> --ccc-host-reserved-external-addrs <host_2> ...

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 Deployment configuration parameters.

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 2: 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

To find the play ID, you can use c4 ps.

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

This procedure uses 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 3: Add the new 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 4: Add reserve 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: '[14, 15]'

Step 5: Update the configuration on the jump host

This step is required because the previous steps will not update the configuration on the jump host, only on the nodes.

In the configuration file on the jump host, add the private/public IP addresses of the new nodes in CCC_HOST_ADDRS, CCC_HOST_EXTERNAL_ADDRS, and add the number of reserve nodes to add in the parameter CCC_PLAY_RESERVE_NODES.

Example:

Original configuration

Copy
...
CCC_HOST_ADDRS="10.0.0.11 10.0.0.12 10.0.0.13"
CCC_HOST_EXTERNAL_ADDRS="203.0.113.11 203.0.113.12 203.0.113.13"
...

New configuration (adding two reserve nodes)

Copy
...
CCC_HOST_ADDRS="10.0.0.11 10.0.0.12 10.0.0.13 10.0.0.14 10.0.0.15"
CCC_HOST_EXTERNAL_ADDRS="203.0.113.11 203.0.113.12 203.0.113.13 203.0.113.14 203.0.113.15"
CCC_PLAY_RESERVE_NODES=2
...

If the deployment has the node IDs configured in CCC_HOST_NODE_IDS, the parameter in the configuration on the jump host must be updated to match the parameter in the deployment. You can find out the node IDs using the ConfD job node_list.

Example:
Copy
confd_client node_list | grep '^  id'
  id: '10'
  id: '11'
  id: '12'
  id: '13'
  id: '14'
  id: '15'
Copy
...
CCC_HOST_ADDRS="10.0.0.11 10.0.0.12 10.0.0.13 10.0.0.14 10.0.0.15"
CCC_HOST_EXTERNAL_ADDRS="203.0.113.11 203.0.113.12 203.0.113.13 203.0.113.14 203.0.113.15"
CCC_HOST_NODE_IDS="11 12 13 14 15"
...

Verification

To verify that the nodes are added, connect to COS and use the ConfD job node_list.

Example:
Copy
CCC_CONFIG=config ./c4 connect -i 3a4a7d8d -s cos
confd_client node_list