Add clients
This page describes how to add clients to a bare-metal cluster.
Cgroups configuration
Clients run applications that access the WEKA filesystem but do not contribute CPUs or drives to the cluster. They connect solely to use the filesystems.
By default, WEKA uses Cgroups to limit or isolate resources for its exclusive use, such as assigning specific CPUs.
Cgroups (Control Groups) is a Linux kernel feature that allows you to limit, prioritize, and isolate the resource usage (CPU, memory, disk I/O, network) of a collection of processes. It helps allocate resources among user-defined groups of tasks and manage their performance effectively.
Versions of Cgroups:
CgroupsV1: Uses multiple hierarchies for different resource controllers, offering fine-grained control but with increased complexity.
CgroupsV2: Combines all resource controllers into a single unified hierarchy, simplifying management and providing better resource isolation and a more consistent interface.
WEKA requirements:
Backends and clients serving protocols: Must run on an OS with CgroupsV1 (legacy) support. CgroupsV2 is supported on backends and clients but is incompatible with protocol cluster deployments.
Cgroups mode compatibility: When setting up Cgroups on clients or backends, ensure that the Cgroups configuration (whether using CgroupsV1 or CgroupsV2) aligns with the operating system's capabilities and configuration.
Cgroups configuration and compatibility
The configuration of Cgroups depends on the installed operating system, and it is important that the cluster server settings match the OS configuration to ensure proper resource management and compatibility.
Customers using a supported OS with CgroupsV2 or wanting to modify the Cgroups usage can set the cgroups usage during the agent installation or by editing the service configuration file. The specified mode must match the existing Cgroups configuration in the OS.
The Cgroups setting includes the following modes:
auto
: WEKA tries using CgroupsV1 (default). If it fails, the Cgroups is set to none automatically.force
: WEKA uses CgroupsV1. If the OS does not support it, WEKA fails.force_v2
: WEKA uses CgroupsV2. If the OS does not support it, WEKA fails. This mode is not supported in protocol cluster deployments.none
: WEKA never uses Cgroups, even if it runs on an OS with CgroupsV1.
Set the Cgroups mode during the client or backend installation
In the installation command line, specify the required Cgroups mode (WEKA_CGROUPS_MODE
).
Example:
Set the Cgroups mode in the service configuration file
You can set the Cgroups mode in the service configuration file for clients and backends.
Open the service configuration file
/etc/wekaio/service.conf
and add one of the following:cgroups_mode=auto
cgroups_mode=force
cgroups_mode=force_v2
cgroups_mode=none
Restart the WEKA agent service.
Verify the Cgroups setting by running the
weka local status
command.
Example:
Add stateless clients
To use the WEKA filesystems from a client, just call the mount command. The mount command automatically installs the software version, and there is no need to join the client to the cluster.
To mount a filesystem in this method, first, install the WEKA agent from one of the backend instances and then mount the filesystem.
Example:
Add stateful clients, which are always part of the cluster
1. Install the WEKA software
Install the WEKA software.
Run the
install.sh
command on each server, according to the instructions in the Install tab.
2. Join the cluster
Command: weka cluster container add
Once the client is in the stem mode (this is the mode defined immediately after running the install.sh
command), use the following command line on the client to add it to the cluster:
Parameters in the command line
backend-hostname
*
An existing hostname (IP or FQDN) of one of the existing backend instances in the cluster.
client-hostname
*
A unique hostname (IP or FQDN) of the client to add.
3. Configure the container as a client
Command: weka cluster container cores
To configure the new container as a client, run the following command:
Parameters in the command line
Name
Value
container-id
*
A valid identifier of the container to add to the cluster.
cores
*
The number of physical cores to allocate to the WEKA client.
frontend-dedicated-cores
*
The number of physical cores to be dedicated to frontend processes.
Mandatory to configure a container as a client.
Maximum 19 cores.
For clients, the number of total cores and frontend-dedicated-cores
must be equal.
4. Configure client networking
Command: weka cluster container net add
If a high-performance client is required and the appropriate network NIC is available, use the following command to configure the networking interface used by the client to communicate with the WEKA cluster:
Parameters
container-id
*
A valid identifier of the container to add to the cluster.
device
*
A valid network interface device name (for example, eth1
).
ips
*
A valid IP address of the new interface.
gateway
The IP address of the default routing gateway.
The gateway must reside within the same IP network of ips
(as described by netmask
).
Not relevant for IB / L2 non-routable networks.
netmask
The number of bits that identify a network ID (also known as CIDR). For example, the netmask of 255.255.0.0
has 16
netmask bits.
5. Apply the container configuration
Command: weka cluster container apply
After successfully configuring the container and its network device, run the following command to finalize the configuration by activating the container:
Parameters
container-id
*
A comma-separated string of valid identifiers of the containers to add to the cluster.
force
A boolean indicates not to prompt for confirmation. The default is not to force a prompt.
Last updated