The Cluster Database

4.2. The Cluster Database

This section describes the SQL Database Schema used by the Rocks system. The free MySQL DBMS server manages the schema in a single database named cluster. This database forms the backbone of the Rocks system, coordinating tasks as diverse as kickstart, node typing, configuration file building, and versioning.

4.2.1. Relational Schema

This diagram describes the database relations in a simplified standard notation.

4.2.2. Tables

A subset of the Information Engineering (IE) notation method will be used to describe the database tables. Primary keys are marked with an asterisk (*), and foreign keys are designated by (@). Attempts have been made to ensure this schema is at least in the Second Normal Form (2NF).

For each table, we present its structure followed by an explanation of its columns.

4.2.2.1. Nodes

Describes nodes in the cluster. A central table in the schema. The nodes table holds one row for each node in the cluster, including frontend, compute, and other appliance types. The node's location in the physical cluster (which rack it lies in on the floor) is specified in this table as well.

Table 4-1. Nodes

Field Type
ID* int(11)
Name varchar(128)
Membership@ int(11)
CPUs int(11)
Rack int(11)
Rank int(11)
Comment varchar(128)

ID

A primary key integer identifier. Auto incremented.

Name

The name of the private network interface for this node. This violates the second normal form (2NF) of the schema (this name should only exist in the networks table), but serves as a hint for readability.

Membership

A link to the Memberships table; cannot be null. Specifies what type of node this is.

CPUs

The number of Processors in this node. Defaults to 1. Although this column violates the second normal form, it is more useful here than in a separate table.

Rack

The Y-axis coordinate of this node in euclidean space. Zero is the leftmost rack on the floor by convention. Note we only use a 2D matrix to locate nodes, the plane (Z-axis) is currently always zero.

Rank

The X-axis of this node in euclidean space. Zero is closest to the floor (the bottom-most node) by convention.

IP

The IPv4 Internet Protocol address of this node in decimal-dot notation.

Comment

A textual comment about this node.

4.2.2.2. Networks

The network interfaces for a node.

Table 4-2. Networks

Field Type
ID* int(11)
Node@ int(11)
MAC varchar(32)
IP varchar(32)
Netmask varchar(32)
Gateway varchar(32)
Name varchar(128)
Device varchar(32)
Module varchar(128)

ID

A primary key integer identifier. Auto incremented.

Node

A link to the nodes table. A foreign key, cannot be null.

MAC

The 6-byte Media Access Layer address (Layer 2) of this interface in hex-colon notation like "a6:45:34:0f:44:99".

IP

The IPv4 Internet Protocol address of this interface in decimal-dot notation like "10.255.255.254".

Netmask

The subnet mask of the IP address. Specified like "255.0.0.0".

Gateway

The IP gateway or router address for this interface.

Name

The hostname for this network interface. The Rocks convention is "compute-[Rack]-[Rank]" for compute nodes.

If the device name is "eth0" this is the "private" network interface for the node. The interface name is placed in the .local domain and served via DNS. All other hostnames must be fully-qualified.

Device

The Linux device name for this NIC. The private (primary) interface always has the name "eth0".

Module

The Linux device driver name for this interface. Hardware specific.

4.2.2.3. App_Globals

This table contains Key=Value pairs used for essential services such as Kickstart. Examples include the Keyboard layout, Public Gateway, Public Hostname, DNS servers, IP mask, Cluster Owner, Admin email, etc.

Table 4-3. App_Globals

Field Type
ID* int(11)
Membership@ int(11)
Service varchar(64)
Component varchar(64)
Value text

ID

A primary key integer identifier. Auto incremented.

Membership

A foreign key that references the ID column in the Membership table.

Service

The service name that will use this KEY=VALUE pair. Examples are "Kickstart" and "Info". This is essentially the first part of a two-level naming scheme.

Component

The second level name. Together the Service and Component names correspond to the name attribute of the <var name="Service_Component"/> XML tag used in the kickstart generation process.

Value

The value of this row. Can be any textual data.

4.2.2.4. Memberships

This table specifies the distribution version and appliance type for a set of nodes. An alternative name for this table would be groups, however that is a reserved word in SQL. The memberships table names a group of nodes in the cluster and allows multiple memberships to tie into one appliance type.

Table 4-4. Memberships

Field Type
ID* int(11)
Name varchar(64)
Appliance@ int(11)
Distribution@ int(11)
Compute enum('yes','no')

ID

A primary key integer identifier. Auto incremented.

Node

The name of this membership. A type of node in the cluster, like "Frontend", "Compute", "Power Unit" or similar. The software installed on nodes in a given membership is defined by an appliance ID.

Appliance

A foreign key that references the ID column in the Appliances table. Helps define the software installed on nodes in this membership, and therefore their behavior.

Distribution

A foreign key that references the ID column in the Distributions table. The second key used to define the software for nodes in this membership.

Compute

Either "yes" or "no". Specifies whether this type of node will be used to run parallel jobs.

4.2.2.5. Appliances

This table defines the available appliance types. Each node in the cluster may classify itself as a single appliance type. The Graph and Node attributes define the starting point in the Rocks software configuration graph (See Graph XML), which wholly specifies the software installed on a node.

Table 4-5. Appliances

Field Type
ID* int(11)
Name varchar(32)
ShortName varchar(32)
Graph varchar(64)
Node varchar(64)

ID

A primary key integer identifier. Auto incremented.

Name

The name of this appliance. Examples are "frontend" and "compute".

ShortName

A nickname for this appliance.

Graph

Specifies which software configuration graph to use when creating the kickstart file for this appliance. The default of default is generally used.

Node

Specifies the name of the root node in the configuration graph to use when creating the kickstart file for this appliance. The software packages for this appliance type is wholly defined by a traversal of the configuration graph beginning at this root node.

4.2.2.6. Distributions

This table connects a membership group to a versioned Rocks distribution, and plays an important role in the Rocks kickstart generation process. The Release relates to the RedHat distribution version, e.g. "7.2", while the Name specifies where to find both the Rocks configuration tree and RPM packages. The location of these resources will be under the /home/install/[Name]/[Release]/ directory.

Table 4-6. Distributions

Field Type
ID* int(11)
Name varchar(32)
Release varchar(32)
Lang varchar(32)

ID

A primary key integer identifier. Auto incremented.

Name

Specifies where to find the Rocks configuration tree graph files. The Name field of the configuration graph located in the /home/install/[Name]/[Release]/ directory.

Release

Gives the the RedHat distribution version this configuration tree is based on , e.g. "7.2". The Release field in the graph location "/home/install/[Name]/[Release]/" directory.

Lang

The language of this distribution. A two-letter language abbreviation like "en" or "fr".

4.2.2.7. Versions

This table is intended to provide database schema versioning. It is reserved for future use.

Table 4-7. Versions

Field Type
TableName varchar(64)
Major int(11)
Minor int(11)

TableName

The name of a table in this database schema.

Major

The major version number of this table. Usually the first integer in the version string.

Minor

The minor version number of this table. The second integer in the version string.

4.2.2.8. Aliases

This table contains any user-defined aliases for nodes.

Table 4-8. Aliases

Field Type
ID* int(11)
Node@ int(11)
Name varchar(32)

ID

A primary key integer identifier. Auto incremented.

Node

A foreign key that references the ID column in the Nodes table.

Name

The alias name. Usually a shorter version of the hostname.