BOS database

Overview

All BOS data is stored in Redis databases.

Kubernetes deployment

(ncn-mw#) The BOS databases are a Kubernetes deployment in the services namespace.

kubectl get deployments -n services -l app.kubernetes.io/name=cray-bos-db

Example output:

NAME          READY   UP-TO-DATE   AVAILABLE   AGE
cray-bos-db   1/1     1            1           11d

(ncn-mw#) The database pod runs in the services namespace.

kubectl get pods -n services -l app.kubernetes.io/name=cray-bos-db

Example output:

NAME                           READY   STATUS    RESTARTS   AGE
cray-bos-db-58f4967657-rdj9l   2/2     Running   0          70d

Data organization

Within the Redis pod, the BOS data is divided into 6 databases:

Database Key
Components Component name (xname)
Boot artifacts (initrd, kernel, and kernel parameters) BSS token
Options options
Session templates Hash based on tenant and template name
Sessions Hash based on tenant and session name
Session statuses Hash based on tenant and session name
  • The options database has a single entry with a fixed key. This entry contains a dictionary of current BOS option values.
  • BOS sessions and session templates are name-spaced by tenant, which requires their corresponding database keys to include the tenant information.

Access

All access to the BOS databases is done by the BOS API server, with two exceptions:

  • The power-on operator directly writes to the boot artifacts database.
  • The migration job directly reads from and writes to most of the databases.
    • The migration job only runs when the cray-bos deployment is upgraded.

Source

The Helm chart for the BOS database is located in the Cray-HPE/bos open source GitHub repository.