Management Rollout

This section updates the software running on management NCNs.

  1. Update management host firmware (FAS)
  2. Execute the IUF management-nodes-rollout stage
  3. Next steps

1. Update management host firmware (FAS)

NOTE This subsection is optional and can be skipped if upgrading only CSM through IUF.

Refer to Update Non-Compute Node (NCN) BIOS and BMC Firmware for details on how to upgrade the firmware on management nodes.

Once this step has completed:

  • Host firmware has been updated on management nodes

2. Execute the IUF management-nodes-rollout stage

Configure optional CSM features

If this IUF procedure is not part of an upgrade from CSM 1.6 to CSM 1.7, then this section should be skipped.

Several CSM features can be enabled and configured as part of the upgrade process. This has to be done at this point in the upgrade; unless otherwise noted in the specific section, these choices cannot be changed later.

Selective iSCSI worker node personalization

If this IUF procedure is not part of an upgrade from CSM 1.6 to CSM 1.7, then this section should be skipped.

In CSM 1.6, all the worker nodes are configured and enabled as iSCSI SBPS targets. Starting in CSM 1.7.0, selective worker node personalization is supported. All worker nodes are still configured for iSCSI, but selective node personalization gives administrators control over which worker nodes are actually enabled as iSCSI SBPS targets. The default behavior is still the same as in CSM 1.6, so if no action is taken to use this feature, then all worker nodes will remain enabled as iSCSI targets.

For administrators who do not wish to use this feature, no action is required, and this step can be skipped. Otherwise, before proceeding, follow the procedure in the CSM upgrade from 1.6 to 1.7 section of Managing Selective Node Personalization.

IPv6

If this IUF procedure is not part of an upgrade from CSM 1.6 to CSM 1.7, then this section should be skipped.

Optional IPv6 support is added in CSM 1.7. For more information, see IPv6 Configuration Guide.

If IPv6 support is not needed on the system, then skip the rest of this section. Otherwise, follow the procedures in Enabling IPv6 during CSM upgrade.

management-nodes-rollout overview

This section describes how to update software on management nodes. It describes how to test a new image and CFS configuration on a single node first to ensure they work as expected before rolling the changes out to the other management nodes. This initial test node is referred to as the “canary node”. Modify the procedure as necessary to accommodate site preferences for rebuilding management nodes. The images and CFS configurations used are created by the prepare-images and update-cfs-config stages respectively; see the prepare-images Artifacts created documentation for details on how to query the images and CFS configurations and see the update-cfs-config documentation for details about how the CFS configuration is updated.

NOTE Additional arguments are available to control the behavior of the management-nodes-rollout stage, for example --limit-management-rollout and -cmrp. See the management-nodes-rollout stage documentation for details and adjust the examples below if necessary.

NOTE When using the option --limit-management-rollout to pass the list of nodes for management-nodes-rollout, ensure that the label iuf-prevent-rollout=true is not set on any of the nodes passed in the list.

  1. (ncn-m001#) Verify if any nodes are labeled with iuf-prevent-rollout=true.

    kubectl get nodes --show-labels | grep iuf-prevent-rollout
    
  2. (ncn-m001#) Use kubectl to remove the iuf-prevent-rollout=true label from the node.

    kubectl label nodes "${NODE}" --overwrite iuf-prevent-rollout-
    

IMPORTANT There is a different procedure for management-nodes-rollout depending on whether or not CSM is being upgraded. The two procedures differ in the handling of NCN storage nodes and NCN master nodes. If CSM is not being upgraded, then NCN storage nodes and NCN master nodes will not be upgraded with new images and will be updated by the CFS configuration created in update-cfs-config only. If CSM is being upgraded, the NCN storage nodes and NCN master nodes will be upgraded with new images and the new CFS configuration. Both procedures use the same steps for rebuilding/upgrading NCN worker nodes. Select one of the following procedures based on whether or not CSM is being upgraded:

Note for CSM V1.7.0

Starting with CSM V1.7.0, administrators can use an IMS image and configuration from CFS built outside of IUF to perform the management-nodes-rollout stage. The image and configuration can be explicitly passed in the IUF CLI command.

(ncn-m001#) For example, to upgrade a storage node using an image and CFS configuration created outside of the prepare-images stage, the command could look like this:

iuf -a "${ACTIVITY_NAME}" -m "${MEDIA_DIR}" run \
    --set-management-config "configuration_name" \
    --set-management-image "image_ID" \
    -r management-nodes-rollout --limit-management-rollout ${STORAGE_CANARY}

(ncn-m001#) The CFS configuration can be described using the following command:

cray cfs configurations describe <cfs_configuration_name>

For example:

cray cfs configurations describe management-main-1.7-1715924 --format toml

Example output:

lastUpdated = "2025-04-14T19:22:00Z"
name = "management-main-1.7-1715924"
[[layers]]
cloneUrl = "https://api-gw-service-nmn.local/vcs/cray/csm-config-management.git"
commit = "c5b9a27fd4ab86bb38e03346b4ed464a04d3799c"
name = "csm-ncn-nodes-1.7.0-alpha.11"
playbook = "ncn_nodes.yml"

[[layers]]
cloneUrl = "https://api-gw-service-nmn.local/vcs/cray/slingshot-host-software-config-management.git"
commit = "caa82a0b793288aeedfa75f8804dd528cae08bcd"
name = "shs-mellanox_install-integration-12.0.0"
playbook = "shs_mellanox_install.yml"

(ncn-m001#) The IMS image can be described using the following command:

cray ims images describe <ims_image_ID>

For example:

cray ims images describe f9fb3b2b-5527-47cb-a2de-8fa9dec7cec6 --format toml

Example output:

arch = "x86_64"
created = "2025-04-14T19:44:21.862319"
id = "f9fb3b2b-5527-47cb-a2de-8fa9dec7cec6"
name = "master-secure-kubernetes-7.1.6-x86_64.squashfs-1715924"

[link]
etag = "b49ef59b6c0099cd6e237b1e44bf19e8"
path = "s3://boot-images/f9fb3b2b-5527-47cb-a2de-8fa9dec7cec6/manifest.json"
type = "s3"

[metadata]

Important: There is no built-in mechanism to validate the image and configuration being passed belong to the same role and subrole. Administrators must ensure that the correct image and configuration are used for the corresponding node and subrole.

For the new parameters added, refer to the command information in the IUF run command details documentation.

2.1 management-nodes-rollout with CSM upgrade

All management nodes will be upgraded to a new image because CSM itself is being upgraded. This section describes how to test a new image and CFS configuration on a single canary node first before rolling it out to the other management nodes of the same management type. Follow the steps below to upgrade all management nodes.

  1. The “Install and Upgrade Framework” section of each individual product’s installation document may contain special actions that need to be performed outside of IUF for a stage. The “IUF Stage Documentation Per Product” section of the HPE Cray EX System Software Stack Installation and Upgrade Guide for CSM (S-8052) provides a table that summarizes which product documents contain information or actions for the management-nodes-rollout stage. Refer to that table and any corresponding product documents before continuing to the next step.

  2. management-nodes-rollout prehook: A script named management-nodes-rollout-prehook.sh runs before management-nodes-rollout stage. This hook is only executed before the first NCN is upgraded(i.e STORAGE_CANARY). This hook executes operations including upgrading CSM applications and services and validating CSM health post-service upgrade. The specific scripts executed as part of this hook are /usr/share/doc/csm/upgrade/scripts/upgrade/csm-upgrade.sh and /opt/cray/tests/install/ncn/automated/ncn-k8s-combined-healthcheck iuf .

  3. Perform the NCN storage node upgrades. This upgrades a single storage node first to test the storage node image and then upgrades the remaining storage nodes.

    NOTE The management-nodes-rollout stage creates additional separate Argo workflows when rebuilding NCN storage nodes. The Argo workflow names will include the string ncn-lifecycle-rebuild. If monitoring progress with the Argo UI, remember to include these workflows.

    1. (ncn-m001#) Execute the management-nodes-rollout stage with a single NCN storage node.

      STORAGE_CANARY=ncn-s001
      iuf -a "${ACTIVITY_NAME}" -m "${MEDIA_DIR}" run -r management-nodes-rollout --limit-management-rollout ${STORAGE_CANARY}
      
    2. (ncn-m#) Verify that the storage canary node booted successfully with the desired CFS configuration.

      XNAME=$(ssh $STORAGE_CANARY 'cat /etc/cray/xname')
      echo "${XNAME}"
      cray cfs components describe "${XNAME}"
      

      The desired value for configuration_status is configured. If it is pending, then wait for the status to change to configured.

    3. Optional, only if Rack Resiliency is enabled and the Ceph dashboards in Grafana show no data: Follow Update Ceph manager endpoints for Grafana and then return here.

    4. (ncn-m001#) Upgrade the remaining NCN storage nodes once the first has upgraded successfully. This upgrades NCN storage nodes serially. Get the number of storage nodes based on the cluster and verify that it is correct. The storage canary node should not be in the list since it has already been upgraded. The list of storage nodes can be manually entered if it is not desired to upgrade all of the remaining storage nodes.

      STORAGE_NODES="$(ceph orch host ls | grep ncn-s | grep -v "$STORAGE_CANARY" | awk '{print $1}' | xargs echo)"
      echo "$STORAGE_NODES"
      iuf -a "${ACTIVITY_NAME}" -m "${MEDIA_DIR}" run -r management-nodes-rollout --limit-management-rollout ${STORAGE_NODES}
      
    5. (ncn-m001#) Verify that all storage nodes configured successfully.

      for ncn in $(cray hsm state components list --subrole Storage --type Node \
         --format json | jq -r .Components[].ID | grep b0n | sort); do cray cfs components describe \
         $ncn --format json | jq -r ' .id+" "+.desiredConfig+" status="+.configurationStatus'; done
      
  4. Perform the NCN master node upgrade of ncn-m002 and ncn-m003.

    NOTE If Kubernetes encryption has been enabled via the Kubernetes Encryption Documentation, then backup the /etc/cray/kubernetes/encryption directory on the master node before upgrading and restore the directory after the node has been upgraded.

    1. Invoke iuf run with -r to execute the management-nodes-rollout stage on ncn-m002. This will rebuild ncn-m002 with the new CFS configuration and image built in previous steps of the workflow.

      (ncn-m001#) Execute the management-nodes-rollout stage with ncn-m002.

      iuf -a "${ACTIVITY_NAME}" -m "${MEDIA_DIR}" run -r management-nodes-rollout --limit-management-rollout ncn-m002
      

      NOTE The /etc/cray/kubernetes/encryption directory should be restored if it was backed up. Once it is restored, the kube-apiserver on the rebuilt node should be restarted. See Kubernetes kube-apiserver Failing for details on how to restart the kube-apiserver.

    2. Verify that ncn-m002 booted successfully with the desired image and CFS configuration.

      XNAME=$(ssh ncn-m002 'cat /etc/cray/xname')
      echo "${XNAME}"
      cray cfs components describe "${XNAME}"
      
    3. Invoke iuf run with -r to execute the management-nodes-rollout stage on ncn-m003. This will rebuild ncn-m003 with the new CFS configuration and image built in previous steps of the workflow.

      (ncn-m001#) Execute the management-nodes-rollout stage with ncn-m003.

      iuf -a "${ACTIVITY_NAME}" -m "${MEDIA_DIR}" run -r management-nodes-rollout --limit-management-rollout ncn-m003
      

      NOTE The /etc/cray/kubernetes/encryption directory should be restored if it was backed up. Once it is restored, the kube-apiserver on the rebuilt node should be restarted.

    4. Verify that ncn-m003 booted successfully with the desired image and CFS configuration.

      XNAME=$(ssh ncn-m003 'cat /etc/cray/xname')
      echo "${XNAME}"
      cray cfs components describe "${XNAME}"
      
  5. Perform the NCN worker node upgrade. To upgrade worker nodes, follow the procedure in section 2.3 NCN worker nodes and then return to this procedure to complete the next step.

  6. Perform the NCN master node upgrade of ncn-m001.

    NOTE If Kubernetes encryption has been enabled via the Kubernetes Encryption Documentation, then backup the /etc/cray/kubernetes/encryption directory on the master node before upgrading and restore the directory after the node has been upgraded.

    1. Authenticate with the Cray CLI on ncn-m002.

      See Configure the Cray Command Line Interface for details on how to do this.

    2. Invoke iuf run with -r to execute the management-nodes-rollout stage on ncn-m001. This will rebuild ncn-m001 with the new CFS configuration and image built in previous steps of the workflow.

      (ncn-m002#) Upgrade ncn-m001. This must be executed on ncn-m002.

      1. Run upload-rebuild-templates.sh to update all the workflows that will be used by IUF and to ensure the correct CSM product versions will be used by IUF.

        (ncn-m002#) Execute the upload-rebuild-templates.sh script.

        /usr/share/doc/csm/workflows/scripts/upload-rebuild-templates.sh
        

      (ncn-m002#) Execute the management-nodes-rollout stage with ncn-m001.

      iuf -a "${ACTIVITY_NAME}" --media-host ncn-m002 run -r management-nodes-rollout --limit-management-rollout ncn-m001
      

      NOTE The /etc/cray/kubernetes/encryption directory should be restored if it was backed up. Once it is restored, the kube-apiserver on the rebuilt node should be restarted. See Kubernetes kube-apiserver Failing for details on how to restart the kube-apiserver.

    3. Verify that ncn-m001 booted successfully with the desired image and CFS configuration.

      XNAME=$(ssh ncn-m001 'cat /etc/cray/xname')
      echo "${XNAME}"
      cray cfs components describe "${XNAME}"
      

    NOTE After management-nodes-rollout stage for management NCNs is completed, re-initialize cray CLI. Refer to Configure the Cray Command Line Interface (cray CLI).

    Once this step has completed:

    • All management NCNs have been upgraded to the image and CFS configuration created in the previous steps of this workflow
    • Per-stage product hooks have executed for the management-nodes-rollout stage

2.2 management-nodes-rollout without CSM upgrade

This is the procedure to rollout management nodes if CSM is not being upgraded. NCN worker node images contain kernel module content from non-CSM products and need to be rebuilt as part of the workflow. Unlike NCN worker nodes, NCN master nodes and storage nodes do not contain kernel module content from non-CSM products. However, user-space non-CSM product content is still provided on NCN master nodes and storage nodes and thus the prepare-images and update-cfs-config stages create a new image and CFS configuration for NCN master nodes and storage nodes. The CFS configuration layers ensure the non-CSM product content is applied correctly for both image customization and node personalization scenarios. As a result, the administrator can update NCN master and storage nodes using CFS configuration only. Follow the following steps to complete the management-nodes-rollout stage.

  1. The “Install and Upgrade Framework” section of each individual product’s installation document may contain special actions that need to be performed outside of IUF for a stage. The “IUF Stage Documentation Per Product” section of the HPE Cray EX System Software Stack Installation and Upgrade Guide for CSM (S-8052) provides a table that summarizes which product documents contain information or actions for the management-nodes-rollout stage. Refer to that table and any corresponding product documents before continuing to the next step.

  2. Check whether the /etc/cray/upgrade/csm/myenv file is present before starting management rollout for worker nodes.

    cat /etc/cray/upgrade/csm/myenv
    

    If the file is not found, then follow the below procedure to create the file:

    1. Get the list of CSM versions:

      csm_version_list=$(sat showrev --products --filter product_name=csm --fields product_version --sort-by product_version --reverse --no-headings --no-borders)
      
    2. Find the latest CSM version from the list:

      CSM_RELEASE=$(echo "$csm_version_list" | head -n 1 | awk '{print $1}' | grep -Eo '^[^ ]+')
      
    3. Verify the latest CSM version:

      echo $CSM_RELEASE
      
    4. Write the CSM_RELEASE variable into myenv file:

      echo "export CSM_RELEASE=${CSM_RELEASE}" >> /etc/cray/upgrade/csm/myenv
      

    Example:

    root@ncn-m001# csm_version_list=$(sat showrev --products --filter product_name=csm --fields product_version --sort-by product_version --reverse --no-headings --no-borders)
    root@ncn-m001# CSM_RELEASE=$(echo "$csm_version_list" | head -n 1 | awk '{print $1}' | grep -Eo '^[^ ]+')
    root@ncn-m001# echo $CSM_RELEASE
    1.7.0
    root@ncn-m001# echo "export CSM_RELEASE=${CSM_RELEASE}" >> /etc/cray/upgrade/csm/myenv
    
  3. Rebuild the NCN worker nodes. Follow the procedure in section 2.3 NCN worker nodes and then return to this procedure to complete the next step.

  4. Configure NCN master nodes.

    1. (ncn-m#) Create a comma-separated list of the xnames for all NCN master nodes and verify they are correct.

      MASTER_XNAMES=$(cray hsm state components list --role Management --subrole Master --type Node --format json | jq -r '.Components | map(.ID) | join(",")')
      echo "Master node xnames: $MASTER_XNAMES"
      
    2. Get the CFS configuration created for management nodes during the prepare-images and update-cfs-config stages. Follow the instructions in the prepare-images Artifacts created documentation to get the value for configuration for the image with a configuration_group_name value matching Management_Master.

    3. (ncn-m#) Set CFS_CONFIG_NAME to the value for configuration found in the previous step.

      CFS_CONFIG_NAME=<appropriate configuration value>
      
    4. (ncn-m#) Apply the CFS configuration to NCN master nodes.

      /usr/share/doc/csm/scripts/operations/configuration/apply_csm_configuration.sh \
          --no-config-change --config-name "${CFS_CONFIG_NAME}" --xnames $MASTER_XNAMES --clear-state
      

      Sample output for configuring multiple management nodes is:

      Taking snapshot of existing management-23.11.0 configuration to /root/apply_csm_configuration.20240305_173700.vKxhqC backup-management-23.11.0.json
      Setting desired configuration, clearing state, clearing error count, enabling components in CFS
      desiredConfig = "management-23.11.0"
      enabled = true
      errorCount = 0
      id = "x3700c0s16b0n0"
      state = []
      
      [tags]
      
      desiredConfig = "management-23.11.0"
      enabled = true
      errorCount = 0
      id = "x3701c0s16b0n0"
      state = []
      
      [tags]
      
      desiredConfig = "management-23.11.0"
      enabled = true
      errorCount = 0
      id = "x3702c0s16b0n0"
      state = []
      
      [tags]
      
      Waiting for configuration to complete. 3 components remaining.
      Configuration complete. 3 component(s) completed successfully.  0 component(s) failed.
      
  5. Configure NCN storage nodes.

    1. (ncn-m#) Create a comma-separated list of the xnames for all NCN storage nodes and verify they are correct.

      STORAGE_XNAMES=$(cray hsm state components list --role Management --subrole Storage --type Node --format json | jq -r '.Components | map(.ID) | join(",")')
      echo "Storage node xnames: $STORAGE_XNAMES"
      
    2. Get the CFS configuration created for management storage nodes during the prepare-images and update-cfs-config stages. Follow the instructions in the prepare-images Artifacts created documentation to get the value for configuration for the image with a configuration_group_name value matching Management_Storage.

    3. (ncn-m#) Set CFS_CONFIG_NAME to the value for configuration found in the previous step.

      CFS_CONFIG_NAME=<appropriate configuration value>
      
    4. (ncn-m#) Apply the CFS configuration to NCN storage nodes.

      /usr/share/doc/csm/scripts/operations/configuration/apply_csm_configuration.sh \
          --no-config-change --config-name "${CFS_CONFIG_NAME}" --xnames $STORAGE_XNAMES --clear-state
      

      Sample output for configuring multiple management nodes is:

      Taking snapshot of existing minimal-management-23.11.0 configuration to /root/apply_csm_configuration.20240305_173700.vKxhqC backup-minimal-management-23.11.0.json
      Setting desired configuration, clearing state, clearing error count, enabling components in CFS
      desiredConfig = "minimal-management-23.11.0"
      enabled = true
      errorCount = 0
      id = "x3700c0s16b0n0"
      state = []
      
      [tags]
      
      desiredConfig = "minimal-management-23.11.0"
      enabled = true
      errorCount = 0
      id = "x3701c0s16b0n0"
      state = []
      
      [tags]
      
      desiredConfig = "minimal-management-23.11.0"
      enabled = true
      errorCount = 0
      id = "x3702c0s16b0n0"
      state = []
      
      [tags]
      
      Waiting for configuration to complete. 3 components remaining.
      Configuration complete. 3 component(s) completed successfully.  0 component(s) failed.
      

Once this step has completed:

  • Management NCN worker nodes have been rebuilt with the image and CFS configuration created in previous steps of this workflow
  • Management NCN storage and NCN master nodes have be updated with the CFS configuration created in the previous steps of this workflow.
  • Per-stage product hooks have executed for the management-nodes-rollout stage

2.3 NCN worker nodes

NCN worker node images contain kernel module content from non-CSM products and need to be rebuilt as part of the workflow. This section describes how to test a new image and CFS configuration on a single canary node (ncn-w001) first before rolling it out to the other NCN worker nodes. Modify the procedure as necessary to accommodate site preferences for rebuilding NCN worker nodes.

The images and CFS configurations used are created by the prepare-images and update-cfs-config stages respectively; see the prepare-images Artifacts created documentation for details on how to query the images and CFS configurations and see the update-cfs-config documentation for details about how the CFS configuration is updated.

NOTE when upgrading from CSM 1.6 to CSM 1.7.0 only

  • Before starting management rollout for worker nodes, manually check and remove the cos-prechecks-for-worker-reboots IUF hook from the cluster as a pre-check step by running the following commands:

    Verify the cos-prechecks-for-worker-reboots hook exists:

    kubectl get hooks -n argo cos-prechecks-for-worker-reboots
    

    Delete the hook:

    kubectl -n argo delete hook cos-prechecks-for-worker-reboots --ignore-not-found=true
    

    Example session:

    root@ncn-m001# kubectl -n argo get hooks
    NAME                               AGE
    cos-prechecks-for-worker-reboots   197d
    ...
    root@ncn-m001# kubectl -n argo delete hook cos-prechecks-for-worker-reboots --ignore-not-found=true
    hook.cray-nls.hpe.com "cos-prechecks-for-worker-reboots" deleted
    

NOTE The management-nodes-rollout stage creates additional separate Argo workflows when rebuilding NCN worker nodes. The Argo workflow names will include the string ncn-lifecycle-rebuild. If monitoring progress with the Argo UI, remember to include these workflows.

  • The “Install and Upgrade Framework” section of each individual product’s installation document may contain special actions that need to be performed outside of IUF for a stage. The “IUF Stage Documentation Per Product” section of the HPE Cray EX System Software Stack Installation and Upgrade Guide for CSM (S-8052) provides a table that summarizes which product documents contain information or actions for the management-nodes-rollout stage. Refer to that table and any corresponding product documents before continuing to the next step.

NOTE The below procedure to update NIC firmware on management nodes is required only if new “Slingshot NIC firmware” has been released.

  • If new Slingshot NIC firmware has been released, refer to the “200Gbps NIC Firmware Management” section of the HPE Slingshot Host Software Installation and Configuration Guide (S-9009) for CSM for details on how to update NIC firmware on management nodes.

    Locate the Slingshot NIC firmware rpms and ensure pdsh is installed on the target nodes.

    cd $MEDIA_DIR
    find . -name slingshot-firmware* | grep -v cassini2
    
    pdsh -V
    

    Copy the two new rpms to the target nodes

    pdsh -w $(kubectl get nodes | grep ncn-w | cut -f1 -d" " | xargs | sed 's/ /,/g') 'zypper --non-interactive install pdsh' | dshbak -c
    pdcp -w $(kubectl get nodes | grep ncn-w | cut -f1 -d" " | xargs | sed 's/ /,/g') slingshot-host-software-14.0.0-31-sle15-sp7_x86_64/rpms/cassini/sle15-sp7/ncn/slingshot-firmware-management-2.1.1-SHS14.0.0_20260202212512_382621c0bd58.noarch.rpm slingshot-host-software-14.0.0-31-sle15-sp7_x86_64/rpms/cassini/sle15-sp7/ncn/slingshot-firmware-cassini-1.5.61-SHS14.0.0_20260127140241_068a29ca68b1.noarch.rpm /tmp/
    

    Install the new rpms on the target nodes

    pdsh -w $(kubectl get nodes | grep ncn-w | cut -f1 -d" " | xargs | sed 's/ /,/g') 'rpm -Uvh /tmp/slingshot-firmware*rpm' | dshbak -c
    

    check and update firmware version if needed.

    pdsh -w $(kubectl get nodes | grep ncn-w | cut -f1 -d" " | xargs | sed 's/ /,/g') slingshot-firmware query | dshbak -c
    pdsh -w $(kubectl get nodes | grep ncn-w | cut -f1 -d" " | xargs | sed 's/ /,/g') slingshot-firmware update | dshbak -c
    pdsh -w $(kubectl get nodes | grep ncn-w | cut -f1 -d" " | xargs | sed 's/ /,/g') slingshot-firmware query | dshbak -c
    

    After updating management host Slingshot NIC firmware, all NCN worker nodes where the firmware has been updated must be power cycled. This is done as part of management nodes rebuild procedure.

Important: After a worker node rebuild, the iSCSI LUNs previously mapped to rootfs/PE images may get reassigned to different images and receive different LUN numbers. However, iSCSI client nodes may continue sending I/O requests using the LUN mappings established before the rebuild. Since these LUN numbers may no longer exist or may point to different images after the rebuild, this can result in I/O failures. To prevent this issue, we need to run certain iSCSI related operations on compute and application nodes against their iSCSI targets.

  1. (ncn-m001#) Set iscsid.safe_logout=No for iSCSI clients (application and compute nodes).

    1. Determine the hostnames of the application nodes.

      APPNODES="$(sat status --filter role=application --filter Enabled=true --fields aliases --no-borders --no-headings | xargs | sed 's/ /,/g')"
      echo $APPNODES
      
    2. Determine the hostnames for the compute nodes.

      Note: The compute node hostnames should have -nmn as the suffix so that they can be reached from a master node using the NMN. The master nodes are not on the HSN.

      COMPUNODES="$(sat status --filter role=compute --filter Enabled=true --fields aliases --no-borders --no-headings | xargs | sed 's/ /-nmn,/g' | sed 's/$/-nmn/')"
      echo $COMPUNODES
      
    3. Prepare the application and compute nodes to logout of their iSCSI session with the worker nodes.

      pdsh -t10 -f256 -w "$APPNODES,$COMPUNODES" "sed -ri 's/^iscsid.safe_logout =.*/iscsid.safe_logout = No/' /etc/iscsi/iscsid.conf &&
      grep -q '^iscsid.safe_logout = No$' /etc/iscsi/iscsid.conf && echo 'Configuration update: Success' || { echo 'Configuration update: Fail'; exit 1; }
      systemctl restart iscsid.service && echo 'iscsid restart: Success' || { echo 'iscsid restart: Fail'; exit 1; }" 2>/dev/null | dshbak -c
      
  2. (ncn-m001#) Check whether the iscsi_worker group exists. If the group exists, selective iSCSI worker node personalization is enabled. Otherwise, all worker nodes are enabled as iSCSI targets by default.

    Identify which worker nodes are configured as iSCSI targets.

    cray hsm groups list | grep iscsi_worker
    

    Example Output:

    label = "iscsi_worker"  # Output with label iscsi_worker present. If not present then there will be no output
    
    1. If the iscsi_worker label is not found, the above command will produce no output. This indicates that all worker nodes are enabled as iSCSI targets.

      ISCSI_TARGET_NODES=$(kubectl get node | grep -P 'ncn-w\d+' | awk '{print $1}' | xargs)
      echo $ISCSI_TARGET_NODES
      

      Example Output:

      "x3000c0s7b0n0" "x3000c0s9b0n0" "x3000c0s11b0n0" "x3000c0s4b0n0" "x3000c0s5b0n0"
      
    2. If the iscsi_worker label is found, then use the below command to get the list of worker nodes that are enabled as iSCSI targets.

      ISCSI_TARGET_XNAMES=$(cray hsm groups members list iscsi_worker --format json | jq .ids[])
      echo $ISCSI_TARGET_XNAMES
      

      Example Output:

      "x3000c0s7b0n0" "x3000c0s9b0n0" "x3000c0s11b0n0"
      

      Map the ISCSI_TARGET_XNAMES to worker node name

      ISCSI_TARGET_NODES=''
      for node in $ISCSI_TARGET_XNAMES
      do
        worker_node=$(sat status --fields alias --filter xname=$node --no-borders --no-headings | sed 's/ //g')
        if [[ $ISCSI_TARGET_NODES == '' ]]
        then
           ISCSI_TARGET_NODES=$worker_node
        else
           ISCSI_TARGET_NODES="$ISCSI_TARGET_NODES $worker_node"
        fi
      done
      echo $ISCSI_TARGET_NODES
      

      Example Output:

      ncn-w001 ncn-w002 ncn-w003
      
  3. (ncn-m001#) If the iscsi_worker group is present, select a node from its member list as WORKER_CANARY. If the group is not present, select any worker node as WORKER_CANARY. This node can be any worker node and does not have to be ncn-w001.

    Note: Choose the canary node wisely, don’t use the one running slingshot-fabric-manager or nexus.

    WORKER_CANARY=ncn-w001
    
  4. (ncn-m001#) On the application and compute nodes, logout of their iSCSI session with the worker node, WORKER_CANARY.

    IQN=iqn.2023-06.csm.iscsi:$WORKER_CANARY
    PORTAL=$(host $(sat status --fields xname --filter alias=$WORKER_CANARY --no-borders --no-headings | sed 's/ //g')h0 | cut -f4 -d" "):3260
    pdsh -t10 -f256 -w $APPNODES,$COMPUNODES "iscsiadm -m node -T ${IQN} -p ${PORTAL} -u && echo Success || echo Fail; iscsiadm -m session" 2>/dev/null | dshbak -c
    
  5. (ncn-m001#) Verify that the iSCSI session with WORKER_CANARY is logged out.

    pdsh -t10 -f256 -w $APPNODES,$COMPUNODES "iscsiadm -m session" 2>/dev/null | dshbak -c
    

    This should not list the iSCSI session with WORKER_CANARY.

  6. (ncn-m001#) Execute the management-nodes-rollout stage of IUF with the WORKER_CANARY.

    Warning: To maintain health of the iSCSI clients on application and compute nodes, watch the rebuild workflow for each node including the console log for the node being rebuilt with a new image.

    iuf -a ${ACTIVITY_NAME} -m ${MEDIA_DIR} run -r management-nodes-rollout --limit-management-rollout $WORKER_CANARY
    
  7. (ncn-m001#) Verify that the node booted successfully with the desired image and CFS configuration.

    XNAME=$(ssh $WORKER_CANARY 'cat /etc/cray/xname')
    echo "${XNAME}"
    cray cfs components describe "${XNAME}"
    
  8. (ncn-m001#) Perform iSCSI discovery on the application and compute nodes, then login to the iSCSI session on the worker node, WORKER_CANARY.

    pdsh -t10 -f256 -w $APPNODES,$COMPUNODES "iscsiadm -m discovery -t sendtargets -p ${PORTAL} && echo Success || echo Fail" 2>/dev/null | dshbak -c
    pdsh -t10 -f256 -w $APPNODES,$COMPUNODES "iscsiadm -m node -T ${IQN} -p ${PORTAL} -l && echo Success || echo Fail" 2>/dev/null | dshbak -c
    
  9. (ncn-m001#) Verify that the iSCSI session is logged in with WORKER_CANARY

    pdsh -t10 -f256 -w $APPNODES,$COMPUNODES "iscsiadm -m session" 2>/dev/null | dshbak -c
    

    This command should list the session with WORKER_CANARY.

  10. (ncn-m001#) Use kubectl to apply the iuf-prevent-rollout=true label to the canary node to prevent it from unnecessarily rebuilding again.

    kubectl label nodes "${WORKER_CANARY}" --overwrite iuf-prevent-rollout=true
    
  11. (ncn-m001#) Verify that the IUF node labels are present on the worker canary node.

    kubectl get nodes "${WORKER_CANARY}" --show-labels | grep iuf-prevent-rollout
    
  12. (ncn-m001#) Verify the health of iSCSI targets and iSCSI initiators by following the steps in iSCSI SBPS Verification.

  13. (ncn-m001#) If the iscsi_worker group is present, select a second node from its member list as WORKER_CANARY2. If the group is not present, select any second worker node as WORKER_CANARY2. This node can be any worker node and does not have to be ncn-w002.

    NOTE During the worker node rollout, ensure that at least two worker nodes (iSCSI SBPS targets) remain healthy after each rollout batch to maintain high availability for iSCSI SBPS. You can rollout one more worker node other than the worker canary node to be labeled with iuf-prevent-rollout=true followed by rolling out the rest of the worker nodes. Note: Choose the canary node wisely, don’t use the one running slingshot-fabric-manager or nexus.

    WORKER_CANARY2=ncn-w002
    
  14. (ncn-m001#) On the application and compute nodes logout of their iSCSI session with the worker node, WORKER_CANARY2

    IQN=iqn.2023-06.csm.iscsi:$WORKER_CANARY2
    PORTAL=$(host $(sat status --fields xname --filter alias=$WORKER_CANARY2 --no-borders --no-headings | sed 's/ //g')h0 | cut -f4 -d" "):3260
    pdsh -t10 -f256 -w $APPNODES,$COMPUNODES "iscsiadm -m node -T ${IQN} -p ${PORTAL} -u && echo Success || echo Fail" 2>/dev/null | dshbak -c
    
  15. (ncn-m001#) Verify that the iSCSI session with WORKER_CANARY2 is logged out.

    pdsh -t10 -f256 -w $APPNODES,$COMPUNODES "iscsiadm -m session" 2>/dev/null | dshbak -c
    

    This command should not list the session with WORKER_CANARY2.

  16. (ncn-m001#) Execute the management-nodes-rollout stage of IUF with the WORKER_CANARY2.

    Warning: To maintain health of the iSCSI clients on application and compute nodes, watch the rebuild workflow for each node including the console log for the node being rebuilt with a new image.

    iuf -a ${ACTIVITY_NAME} -m ${MEDIA_DIR} run -r management-nodes-rollout --limit-management-rollout $WORKER_CANARY2
    
  17. (ncn-m001#) Verify that the node booted successfully with the desired image and CFS configuration.

    XNAME=$(ssh $WORKER_CANARY2 'cat /etc/cray/xname')
    echo "${XNAME}"
    cray cfs components describe "${XNAME}"
    
  18. (ncn-m001#) Perform iSCSI discovery on the application and compute nodes, then login to the iSCSI session on the worker node, WORKER_CANARY2.

    pdsh -t10 -f256 -w $APPNODES,$COMPUNODES "iscsiadm -m discovery -t sendtargets -p ${PORTAL} && echo Success || echo Fail" 2>/dev/null | dshbak -c
    pdsh -t10 -f256 -w $APPNODES,$COMPUNODES "iscsiadm -m node -T ${IQN} -p ${PORTAL} -l && echo Success || echo Fail" 2>/dev/null | dshbak -c
    
  19. (ncn-m001#) Verify that the iSCSI session is logged in with WORKER_CANARY2

    pdsh -t10 -f256 -w $APPNODES,$COMPUNODES "iscsiadm -m session"
    

    This command should list the session with WORKER_CANARY2.

  20. (ncn-m001#) Use kubectl to apply the iuf-prevent-rollout=true label to the node to prevent it from unnecessarily rebuilding again.

    kubectl label nodes "${WORKER_CANARY2}" --overwrite iuf-prevent-rollout=true
    
  21. (ncn-m001#) Verify that the IUF node label is present on the worker canary node.

    kubectl get nodes "${WORKER_CANARY2}" --show-labels | grep iuf-prevent-rollout
    
  22. (ncn-m001#) Verify the health of iSCSI targets and iSCSI initiators by following the steps in iSCSI SBPS Verification.

  23. (ncn-m001#) Execute the management-nodes-rollout stage on all remaining worker nodes.

    NOTE For this step, the argument to –limit-management-rollout can be Management_Worker or a list of worker node names separated by spaces. If Management_Worker is supplied, all worker nodes that are not labeled with iuf-prevent-rollout=true will be rebuilt/upgraded. If a list of worker node names is supplied, then those worker nodes will be rebuilt/upgraded.

    Warning: To maintain health of the iSCSI clients on application and compute nodes, watch the rebuild workflow for each node including the console log for the node being rebuilt with a new image.

    1. Determine the remaining worker nodes which are iSCSI targets by excluding the WORKER_CANARY and WORKER_CANARY2.

      ISCSI_TARGET_NODES=$(echo "$ISCSI_TARGET_NODES" | sed "s/$WORKER_CANARY//; s/$WORKER_CANARY2//")
      echo $ISCSI_TARGET_NODES
      
    2. On the application and compute nodes logout of their iSCSI session with the iSCSI target worker nodes, ISCSI_TARGET_NODES.

      for node in $ISCSI_TARGET_NODES
      do
        IQN=iqn.2023-06.csm.iscsi:$node
        PORTAL=$(host $(sat status --fields xname --filter alias=$node --no-borders --no-headings | sed 's/ //g')h0 | cut -f4 -d" "):3260
        pdsh -t10 -f256 -w $APPNODES,$COMPUNODES "iscsiadm -m node -T ${IQN} -p ${PORTAL} -u && echo Success || echo Fail" 2>/dev/null | dshbak -c
      done
      
    3. (ncn-m001#) Verify that the iSCSI session with remaining worker nodes is logged out.

      pdsh -t10 -f256 -w $APPNODES,$COMPUNODES "iscsiadm -m session" 2>/dev/null | dshbak -c
      

      This command should not list the session with ISCSI_TARGET_NODES.

    4. Choose one of the following two options. The difference between the options is the limit-management-rollout argument, but the two options do the same thing.

      1. Option 1:

        iuf -a "${ACTIVITY_NAME}" -m "${MEDIA_DIR}" run -r management-nodes-rollout --limit-management-rollout Management_Worker
        
      2. Option 2:

        Execute management-nodes-rollout on a group of worker nodes. The list of worker nodes can be manually edited if it is undesirable to rebuild/upgrade all of the workers with one execution.

        WORKER_NODES=$(kubectl get node | grep -P 'ncn-w\d+' | grep -vE "$WORKER_CANARY|$WORKER_CANARY2" | awk '{print $1}' | xargs)
        echo $WORKER_NODES
        iuf -a "${ACTIVITY_NAME}" -m "${MEDIA_DIR}" run -r management-nodes-rollout --limit-management-rollout $WORKER_NODES
        
    5. Perform iSCSI discovery on the application and compute nodes, then login to the iSCSI session on the worker nodes, ISCSI_TARGET_NODES.

      for node in $ISCSI_TARGET_NODES
      do
        echo $node
        IQN=iqn.2023-06.csm.iscsi:$node
        echo $IQN
        PORTAL=$(host $(sat status --fields xname --filter alias=$node --no-borders --no-headings | sed 's/ //g')h0 | cut -f4 -d" "):3260
        echo $PORTAL
        pdsh -t10 -f256 -w $APPNODES,$COMPUNODES "iscsiadm -m discovery -t sendtargets -p ${PORTAL} && echo Success || echo Fail" 2>/dev/null | dshbak -c
        pdsh -t10 -f256 -w $APPNODES,$COMPUNODES "iscsiadm -m node -T ${IQN} -p ${PORTAL} -l && echo Success || echo Fail" 2>/dev/null | dshbak -c
      done
      
  24. (ncn-m001#) Verify that the iSCSI session with remaining worker nodes is logged in.

    pdsh -t10 -f256 -w $APPNODES,$COMPUNODES "iscsiadm -m session" 2>/dev/null | dshbak -c
    

    This command should list the session with ISCSI_TARGET_NODES.

  25. (ncn-m001#) After all worker nodes have finished their image rollout, set iscsid.safe_logout=Yes again and restart iscsid.service on all application and compute nodes.

    pdsh -t10 -f256 -w $APPNODES,$COMPUNODES "sed -ri 's/^iscsid.safe_logout =.*/iscsid.safe_logout = Yes/g' /etc/iscsi/iscsid.conf &&
    grep -q '^iscsid.safe_logout = Yes$' /etc/iscsi/iscsid.conf && echo 'Configuration update: Success' || { echo 'Configuration update: Fail'; exit 1; }
    systemctl restart iscsid.service" || "{ echo 'iscsid restart: Fail'; exit 1; }" 2>/dev/null | dshbak -c
    
  26. (ncn-m001#) Use kubectl to remove the iuf-prevent-rollout=true label from the canary nodes.

    kubectl label nodes ${WORKER_CANARY} ${WORKER_CANARY2} --overwrite iuf-prevent-rollout-
    
  27. (ncn-m001#) Verify that no nodes are labeled with iuf-prevent-rollout=true.

    LABELLED_NODES=$(kubectl get nodes --show-labels | grep iuf-prevent-rollout | cut -d' ' -f1 | xargs)
    echo $LABELLED_NODES
    
  28. (ncn-m001#) Use kubectl to remove the iuf-prevent-rollout=true label from the node.

    kubectl label nodes ${LABELLED_NODES} --overwrite iuf-prevent-rollout-
    
  29. (ncn-m001#) Verify that all worker nodes booted successfully with the desired image and CFS configuration.

    for ncn in $(cray hsm state components list --subrole Worker --type Node \
        --format json | jq -r .Components[].ID | grep b0n | sort)
    do
        cray cfs components describe $ncn --format json | jq -r ' .id+" "+.desiredConfig+" status="+.configurationStatus'
    done
    
  30. (ncn-m001#) Verify the health of iSCSI targets by following the steps in iSCSI SBPS Verification.

Once this step has completed:

  • Management NCN worker nodes have been rebuilt with the image and CFS configuration created in previous steps of this workflow
  • Per-stage product hooks have executed for the management-nodes-rollout stage

Return to the procedure that was being followed for management-nodes-rollout to complete the next step: either Management-nodes-rollout with CSM upgrade or Management-nodes-rollout without CSM upgrade.

3. Next steps