Attribute Groups#

Attribute groups provide a way to apply the same attributes to a collection of nodes or switches. Attributes alter how a node boots, the settings the node has after booting, and so on. For example, all nodes in an attribute group could have the same boot configuration and network settings.

The cw-install script creates a default attribute group called DefaultAttribs. The DefaultAttribs attribute group assigns the initial boot configuration, DefaultBoot. All nodes and switches are part of the default attribute group. Any attribute group can be assigned to be the default group through the ICE ClusterWare ™ graphical user interface (GUI) or the cw-clusterctl command:

cw-clusterctl --set-group GroupNameOrUID

Where GroupNameOrUID is replaced with a different attribute group name or UID.

You can create an attribute group using the cw-attribctl command or via the Node Attributes Page in the ClusterWare GUI. Names must start with an alphabet character, not a number.

For example, run the following commands to create groups called dept_datasci, dept_engineering, and gpu:

cw-attribctl create name=dept_datasci
cw-attribctl create name=dept_engineering
cw-attribctl create name=gpu

To assign or remove one or more attribute groups to specific nodes, run:

cw-nodectl -i n[0-7] join dept_datasci
cw-nodectl -i n[8-11] join dept_engineering
cw-nodectl -i n[0-3,7-9] join gpu
cw-nodectl -i n7 leave gpu

These group assignments can be viewed by specific nodes. For example, for node n0:

[admin]$ cw-nodectl -i n0 ls -l
Nodes
n0
  attributes
    _boot_config: DefaultBoot
  groups
    dept_datasci
    gpu
  hardware
    boot_style: unknown
    cpu_count: 2
    cpu_model: Intel Core Processor (Broadwell)
    mode: UEFI
    product_name: KVM
    product_serial: n/a
    product_uuid: 2690ce2c-73f0-4fce-9688-86d12ffe4770
    ram_total: 7.8 GiB (8128740 KiB)
    vendor: Red Hat
  index: 0
  ip: 10.54.50.0
  mac: 52:54:00:c6:c3:0a
  name: n0
  power_uri: none
  type: compute

The group assignments can also be viewed as a table:

[admin]$ cw-nodectl --fields groups --table ls -l
Nodes |                       groups
------+-----------------------------
   n0 |      ['dept_datasci', 'gpu']
   n1 |      ['dept_datasci', 'gpu']
   n2 |      ['dept_datasci', 'gpu']
   n3 |      ['dept_datasci', 'gpu']
   n4 |             ['dept_datasci']
   n5 |             ['dept_datasci']
   n6 |             ['dept_datasci']
   n7 |             ['dept_datasci']
   n8 |  ['dept_engineering', 'gpu']
   n9 |  ['dept_engineering', 'gpu']
  n10 |         ['dept_engineering']
  n11 |         ['dept_engineering']
  n12 |                           []
  n13 |                           []
  n14 |                           []
  n15 |                           []

Commands that accept group lists can reference nodes by their group name(s) instead of their node names. Group names are expressed with a % prefix. For example:

cw-nodectl -i %dept_engineering
cw-nodectl -i %gpu
cw-nodectl -i %dept_datasci status -L

Both the Kubernetes cw-kube --init command and the Job Scheduler $slurm-cw.setup and $openpbs-scyld.setup init, reconfigure, and update-nodes actions accept --ids %<GROUP> as well as --ids <NODES>. For details, see Kubernetes.

For information about attribute inheritance order, see Node Attributes. See Reserved Attributes for list of all attributes that are reserved by the ClusterWare software.