Management Nodes Rollout

This section updates the kernel running on management NCNs.

  1. Storage Nodes
  2. Worker Nodes
  3. Master Nodes
  4. References
  5. Next Steps

Important: csm-security includes kernel updates, this requires all node types to be rebooted into a new image. The standard docs-csm non-CSM-upgrade workflow (section 2.2) cannot be used here, because it only applies CFS configuration to master and storage nodes without rebooting them. To ensure that all management nodes are rebuilt to include these new csm-security fixes, follow the full image rollout procedures below for all management node types. Note: The rollout order below (Storage → Worker → Master) follows the full image rollout sequence used during CSM upgrades. Since csm-security includes kernel updates all management nodes are updated with the new kernel and CFS configuration.

1. Storage Nodes

Roll out the new image and CFS configuration to one storage node at a time. Wait for Ceph HEALTH_OK before proceeding to the next node.

Important: When a storage node is booted into a new node image, the storage node is not wiped. Because the storage node is not wiped, the rd.live.dir still exists when the node is rebooted. This is due to a change in how rd.live.overlay.reset works in CSM 1.5 and 1.6. If the rd.live.dir is not changed when booting a storage node to a new node image, the new image will not be pulled since the rd.live.dir still exists. This can cause cloud-init to fail on the storage node or the node will boot but will use the previous /run/initramfs/live/<CSM_version> directory that still contains the previous image. To avoid this issue and ensure the new node image is pulled, the rd.live.dir should be set to unique value. In this procedure, the STORAGE_NODE_IMAGE_ID is used as the unique value.

This issue is not hit when upgrading from one CSM major release to the next CSM major release because the rd.live.dir is changed on all NCNs to the new CSM major release version. This allows the node image to be pulled successfully during cloud-init

  1. Set the TOKEN variable.

    export TOKEN=$(curl -k -s -S -d grant_type=client_credentials \
    -d client_id=admin-client \
    -d client_secret=$(kubectl get secrets admin-client-auth -o jsonpath='{.data.client-secret}' | base64 -d) \
    https://api-gw-service-nmn.local/keycloak/realms/shasta/protocol/openid-connect/token | jq -r '.access_token')
    
  2. Determine the number of storage nodes on the system.

    STORAGE_NODES="$(ceph orch host ls | grep ncn-s | awk '{print $1}' | xargs echo)"
    echo "$STORAGE_NODES"
    

Important: Storage nodes use a different CFS configuration than worker nodes. Choose one storage node to be the canary and verify that the new kernel version and CFS configuration is applied successfully before proceeding to the remaining storage nodes.

  1. (ncn-m001#) Run below sequence of steps on the STORAGE_CANARY node.

    1. Record the existing kernel version on the first storage node.

      STORAGE_CANARY=ncn-s001
      OLDUNAME=$(ssh $STORAGE_CANARY uname -r)
      echo $OLDUNAME
      
    2. Record the xname of the STORAGE_CANARY node.

      XNAME=$(ssh $STORAGE_CANARY 'cat /etc/cray/xname')
      echo "${XNAME}"
      
    3. Record current image id and configuration name on the STORAGE_CANARY node

      OLD_CFG_NAME=$(cray cfs components describe $XNAME --format json | jq .desiredConfig)
      echo "${OLD_CFG_NAME}"
      OLD_IMAGE_NAME=$(ssh $STORAGE_CANARY "grep -oP 'metal\.server=.*?/boot-images/\K[^/]+' /proc/cmdline")
      echo "${OLD_IMAGE_NAME}"
      
    4. Assign the new image to BSS.

      /usr/share/doc/csm/scripts/operations/node_management/assign-ncn-images.sh \
        -p $STORAGE_IMAGE_ID $XNAME
      
    5. Set the rd.live.dir on the STORAGE_CANARY node to the STORAGE_IMAGE_ID. This ensures rd.live.dir will be a unique value.

      csi handoff bss-update-param --delete rd.live.dir --limit "${XNAME}"
      csi handoff bss-update-param --set rd.live.dir=${STORAGE_IMAGE_ID} --limit "${XNAME}"
      

    NOTE The ncn-upgrade-worker-storage-nodes.sh 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.

    Known Issue: If cloud-init fails on the storage node with a timed out error, see storage node cloud-init fails with ‘Timed out waiting for device’ error.

    1. Start a new storage node upgrade.

      Note: if a new CFS configuration is also necessary, append the argument --desired-cfs-conf <configuration> to the command below.

      /usr/share/doc/csm/upgrade/scripts/upgrade/ncn-upgrade-worker-storage-nodes.sh $STORAGE_CANARY --upgrade --image-id $STORAGE_IMAGE_ID
      
    2. Monitor the Argo Workflow using the Argo UI. See using the Argo UI for instructions to access the Argo UI.

    3. After the node boots, verify the node:

      1. Verify that the kernel version has changed.

        NEWUNAME=$(ssh $STORAGE_CANARY uname -r)
        echo "Old: $OLDUNAME"
        echo "New: $NEWUNAME"
        

        Important: Note that the kernel version NEWUNAME is the version based on the current CSM version and RRU version, as specified in Valid update paths.

      2. Verify CFS configuration name is changed to STORAGE_CFG_ID as set in the Prepare Images and the status shows configured.

        sat status --filter subrole=Storage --fields xname,aliases,desired,configuration | grep $STORAGE_CANARY
        

        Example Output:

        | x3000c0s7b0n0 | ncn-s001 | storage-26.3.0-rru-26.11.1 | configured           |
        

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

      3. Verify image name is changed.

      NEW_IMAGE_NAME=$(ssh $STORAGE_CANARY "grep -oP 'metal\.server=.*?/boot-images/\K[^/]+' /proc/cmdline")
      echo "${OLD_IMAGE_NAME}"
      echo "${NEW_IMAGE_NAME}"
      
      1. Verify Ceph health reports HEALTH_OK before continuing.

        ceph health
        

        Use this command to get more detail about Ceph health status.

        ceph -s
        
    4. Clean up old images on the node:

      ssh $STORAGE_CANARY /srv/cray/scripts/metal/cleanup-live-images.sh -y -o
      
  2. (ncn-m001#) Run the following sequence of steps on all storage nodes, excluding STORAGE_CANARY.

    1. Get OLDUNAME for all remaining storage nodes.
    STORAGE_NODES="$(ceph orch host ls | grep ncn-s | grep -v "$STORAGE_CANARY" | awk '{print $1}' | xargs echo)"
    echo "$STORAGE_NODES"
    for node in $STORAGE_NODES
    do
       OLDUNAME=$(ssh $node 'uname -r')
       echo $OLDUNAME
    done
    
    1. For all remaining storage nodes, assign the new image to BSS, set the rd.live.dir.

      export STORAGE_NODES=$(ceph orch host ls | grep ncn | egrep -v $STORAGE_CANARY | cut -f1 -d" " | xargs) 
      for node in $STORAGE_NODES
      do
        XNAME=$(ssh $node 'cat /etc/cray/xname')
        /usr/share/doc/csm/scripts/operations/node_management/assign-ncn-images.sh -p $STORAGE_IMAGE_ID $XNAME
        csi handoff bss-update-param --delete rd.live.dir --limit "${XNAME}"
        csi handoff bss-update-param --set rd.live.dir=${STORAGE_IMAGE_ID} --limit "${XNAME}"
      done
      
    2. Start a new storage node upgrade on all remaining storage nodes.

      Note: if a new CFS configuration is also necessary, append the argument --desired-cfs-conf <configuration> to the command below.

      /usr/share/doc/csm/upgrade/scripts/upgrade/ncn-upgrade-worker-storage-nodes.sh $(echo $STORAGE_NODES | sed 's/ /,/g') --upgrade --image-id $STORAGE_IMAGE_ID
      

      Known Issue: If cloud-init fails on the storage node with a timed out error, see storage node cloud-init fails with ‘Timed out waiting for device’ error.

    3. (ncn-m001#) Monitor the Argo Workflow using the Argo UI. See using the Argo UI for instructions to access the Argo UI.

  3. (ncn-m001#) Verify that all storage nodes booted successfully with new image and CFS configuration

    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
    
    for node in $STORAGE_NODES
    do
       NEWUNAME=$(ssh $node 'uname -r')
       echo $NEWUNAME
       NEW_IMAGE_NAME=$(ssh $node "grep -oP 'metal\.server=.*?/boot-images/\K[^/]+' /proc/cmdline")
       echo $NEW_IMAGE_NAME
    done
    

    Important: Note that the kernel version NEWUNAME is the version based on the current CSM version and RRU version, as specified in Valid update paths.

  4. (ncn-m001#) Verify Ceph health reports HEALTH_OK before continuing.

    ceph health
    

    Run below command to get more detail about Ceph health status.

    ceph -s
    
  5. (ncn-m001#) Clean up old images on the storage nodes:

    for node in $STORAGE_NODES
    do
       echo $node
       ssh $node /srv/cray/scripts/metal/cleanup-live-images.sh -y -o
    done
    

2. Worker Nodes

Roll out the new image and CFS configuration to one worker node first and validate the changes. Once validated, proceed with a second worker node, followed by the remaining worker nodes in batches.

  1. In CSM 1.6.2, when iSCSI is configured instead of DVS, all worker nodes are considered as iSCSI targets. So retrieve all worker nodes.

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

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.

    LABELLED_NODES=$(kubectl get nodes --show-labels | grep iuf-prevent-rollout | cut -d' ' -f1 | xargs)
    echo $LABELLED_NODES
    

    Example Output:

    ncn-w001 ncn-w002
    
  2. If any nodes appear in the output above, use kubectl to remove the iuf-prevent-rollout=true label from each of these nodes.

    kubectl label nodes ${LABELLED_NODES} --overwrite iuf-prevent-rollout-
    

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 ensure that certain iSCSI related operations are performed 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#) 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 
    
  3. (ncn-m001#) SSH to WORKER_CANARY and get the current/existing kernel version.

    OLDUNAME=$(ssh $WORKER_CANARY uname -r)
    echo $OLDUNAME
    
  4. (ncn-m001#) Record the xname of the WORKER_CANARY node.

    XNAME=$(ssh $WORKER_CANARY 'cat /etc/cray/xname')
    echo "${XNAME}"
    
  5. (ncn-m001#) Record current image id and configuration name on the WORKER_CANARY node.

    OLD_CFG_NAME=$(cray cfs components describe $XNAME --format json | jq .desiredConfig)
    echo "${OLD_CFG_NAME}"
    OLD_IMAGE_NAME=$(ssh $WORKER_CANARY "grep -oP 'metal\.server=.*?/boot-images/\K[^/]+' /proc/cmdline")
    echo "${OLD_IMAGE_NAME}"
    
  6. (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" 2>/dev/null | dshbak -c
    
  7. (ncn-m001#) Verify that the iSCSI session with WORKER_CANARY is logged out.

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

    This command should not list the session with WORKER_CANARY.

  8. (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
    
  9. (ncn-m001#) Verify that the node booted successfully with the desired image and CFS configuration.

    cray cfs components describe "${XNAME}"
    NEW_CFG_NAME=$(cray cfs components describe $XNAME --format json | jq .desiredConfig)
    echo "${OLD_CFG_NAME}"
    echo "${NEW_CFG_NAME}"
    NEW_IMAGE_NAME=$(ssh $WORKER_CANARY "grep -oP 'metal\.server=.*?/boot-images/\K[^/]+' /proc/cmdline")
    echo "${OLD_IMAGE_NAME}"
    echo "${NEW_IMAGE_NAME}"
    
  10. (ncn-m001#) Verify that the kernel version has changed.

    NEWUNAME=$(ssh $WORKER_CANARY uname -r)
    echo $OLDUNAME
    echo $NEWUNAME
    

    Important: Note that the kernel version NEWUNAME is the version based on the current CSM version and RRU version, as specified in Valid update paths.

  11. (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
    
  12. (ncn-m001#) Verify that the iSCSI session is logged in with WORKER_CANARY

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

    This command should list the session with WORKER_CANARY.

  13. (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_CANARY}" --overwrite iuf-prevent-rollout=true
    
  14. (ncn-m001#) Verify that the IUF node label is present on the worker canary node.

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

  16. (ncn-m001#) 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 
    
  17. (ncn-m001#) SSH to WORKER_CANARY2 and get the current/existing kernel version.

    OLDUNAME=$(ssh $WORKER_CANARY2 uname -r)
    echo $OLDUNAME
    
  18. (ncn-m001#) Record the xname of the WORKER_CANARY2 node.

    XNAME=$(ssh $WORKER_CANARY2 'cat /etc/cray/xname')
    echo "${XNAME}"
    
  19. (ncn-m001#) Record current image id and configuration name on the WORKER_CANARY node.

    OLD_CFG_NAME=$(cray cfs components describe $XNAME --format json | jq .desiredConfig)
    echo "${OLD_CFG_NAME}"
    OLD_IMAGE_NAME=$(ssh $WORKER_CANARY2 "grep -oP 'metal\.server=.*?/boot-images/\K[^/]+' /proc/cmdline")
    echo "${OLD_IMAGE_NAME}"
    
  20. (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
    
  21. (ncn-m001#) Verify that the iSCSI session with WORKER_CANARY2 is logged out.

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

    This command should not list the session with WORKER_CANARY2.

  22. (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
    
  23. (ncn-m001#) Verify that the node booted successfully with the desired image and CFS configuration.

    cray cfs components describe "${XNAME}"
    NEW_CFG_NAME=$(cray cfs components describe $XNAME --format json | jq .desiredConfig)
    echo "${OLD_CFG_NAME}"
    echo "${NEW_CFG_NAME}"
    NEW_IMAGE_NAME=$(ssh $WORKER_CANARY2 "grep -oP 'metal\.server=.*?/boot-images/\K[^/]+' /proc/cmdline")
    echo "${OLD_IMAGE_NAME}"
    echo "${NEW_IMAGE_NAME}"
    
  24. (ncn-m001#) Verify that the kernel version has changed.

    NEWUNAME=$(ssh $WORKER_CANARY2 uname -r)
    echo $OLDUNAME
    echo $NEWUNAME
    

    Important: Note that the kernel version NEWUNAME is the version based on the current CSM version and RRU version, as specified in Valid update paths.

  25. (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
    
  26. (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.

  27. (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
    
  28. (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
    
  29. (ncn-m001#) Verify the health of iSCSI target and initiator by following the steps in iSCSI SBPS Verification.

  30. (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"
      

      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
      
    6. (ncn-m001#) Verify that the iSCSI session with remaining worker nodes is logged in.

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

      This command should list the session with ISCSI_TARGET_NODES.

  31. (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
    
  32. (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-
    
  33. (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
    
  34. (ncn-m001#) Use kubectl to remove the iuf-prevent-rollout=true label from the node.

    kubectl label nodes ${LABELLED_NODES} --overwrite iuf-prevent-rollout-
    
  35. (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'
       NEW_IMAGE_NAME=$(ssh $ncn "grep -oP 'metal\.server=.*?/boot-images/\K[^/]+' /proc/cmdline")
       echo "${OLD_IMAGE_NAME}"
       echo "${NEW_IMAGE_NAME}"
    done
    
  36. (ncn-m001#) Verify the health of iSCSI target and initiator by following the steps in iSCSI SBPS Verification.

3. Master Nodes

Important: Master nodes require a full disk-wipe rebuild. A no-wipe reboot leaves stale kernels on BOOTRAID and mismatched etcd/Kubernetes PKI certificates from the original install.

Rebuild one master at a time: ncn-m003 → ncn-m002 → ncn-m001. The rebuild script handles first-master promotion automatically.

  1. (ncn-m001#) Verify /etc/cray/upgrade/csm/myenv exists and sets CSM_RELEASE and CSM_ARTI_DIR.

    . /etc/cray/upgrade/csm/myenv
    echo $CSM_RELEASE
    echo $CSM_ARTI_DIR
    
  2. (ncn-m001#) Update ncn-m003 and ncn-m002 while running commands on ncn-m001.

    1. Record the xname of the MASTER node.

      MASTER=ncn-m003
      XNAME=$(ssh $MASTER 'cat /etc/cray/xname')
      echo "${XNAME}"
      
    2. SSH to MASTER and get the current/existing kernel version.

      OLDUNAME=$(ssh $MASTER uname -r)
      echo $OLDUNAME
      
    3. Record current image id and configuration name on the MASTER node.

      OLD_CFG_NAME=$(cray cfs components describe $XNAME --format json | jq .desiredConfig)
      echo "${OLD_CFG_NAME}"
      OLD_IMAGE_NAME=$(ssh $MASTER "grep -oP 'metal\.server=.*?/boot-images/\K[^/]+' /proc/cmdline")
      echo "${OLD_IMAGE_NAME}"
      
    4. Assign the new image to BSS. The rebuild script sets rd.live.dir=${CSM_RELEASE} but relies on BSS having the correct S3 URLs for kernel, initrd, and rootfs.

      /usr/share/doc/csm/scripts/operations/node_management/assign-ncn-images.sh -p $MASTER_IMAGE_ID $XNAME
      
    5. Check for important files which are not backed up from the node.

      Warning: If there are any special local files customized, they will be removed when the storage on the node is wiped.

      Some master nodes have information in these files which is not placed there by CFS Ansible tasks and might disappear if not backed up.

      /etc/hosts
      /etc/motd
      /root/.bashrc
      /root/.config/cray
      /root/.config/sat
      /root/.screenrc
      /root/.ssh/authorized_keys
      /root/.ssh/config
      

      This list is not exhaustive and there might be other files important for some systems, such as crontab entries.

      If SDU and RDA are configured on this node, save the configuration information so it can be restored after the node has the new image.

    6. Rebuild the master node.

      /usr/share/doc/csm/upgrade/scripts/rebuild/ncn-rebuild-master-nodes.sh $MASTER
      

      Known Issue: If you see error while watching the console of ncn-m003, see Secret “kubeadm-certs” was not found in the “kube-system” Namespace.

    7. After the node boots,

      1. Update the node’s CFS configuration.

        cray cfs components update $XNAME --enabled true --desired-config $MASTER_CFG_ID
        
      2. Verify that the kernel version has changed.

        NEWUNAME=$(ssh $MASTER uname -r)
        echo "Old: $OLDUNAME"
        echo "New: $NEWUNAME"
        

        Important: Note that the kernel version NEWUNAME is the version based on the current CSM version and RRU version, as specified in Valid update paths.

      3. Verify the node booted successfully with the new image and CFS configuration.

        cray cfs components describe $XNAME
        

        If not configured wait until the node’s configurationStatus changes to configured state.

        NEW_IMAGE_NAME=$(ssh $MASTER "grep -oP 'metal\.server=.*?/boot-images/\K[^/]+' /proc/cmdline")
        echo "${OLD_IMAGE_NAME}"
        echo "${NEW_IMAGE_NAME}"
        
    8. Record the xname of the next MASTER node.

      MASTER=ncn-m002
      XNAME=$(ssh $MASTER 'cat /etc/cray/xname')
      echo "${XNAME}"
      
    9. SSH to MASTER and get the current/existing kernel version.

      OLDUNAME=$(ssh $MASTER uname -r)
      echo $OLDUNAME
      
    10. Record current image id and configuration name on the MASTER node.

      OLD_CFG_NAME=$(cray cfs components describe $XNAME --format json | jq .desiredConfig)
      echo "${OLD_CFG_NAME}"
      OLD_IMAGE_NAME=$(ssh $MASTER "grep -oP 'metal\.server=.*?/boot-images/\K[^/]+' /proc/cmdline")
      echo "${OLD_IMAGE_NAME}"
      
    11. Assign the new image to BSS. The rebuild script sets rd.live.dir=${CSM_RELEASE} but relies on BSS having the correct S3 URLs for kernel, initrd, and rootfs.

      /usr/share/doc/csm/scripts/operations/node_management/assign-ncn-images.sh -p $MASTER_IMAGE_ID $XNAME
      
    12. Check for important files which are not backed up from the node.

      Warning: If there are any special local files customized, they will be removed when the storage on the node is wiped.

      Some master nodes have information in these files which is not placed there by CFS Ansible tasks and might disappear if not backed up.

      /etc/hosts
      /etc/motd
      /root/.bashrc
      /root/.config/cray
      /root/.config/sat
      /root/.screenrc
      /root/.ssh/authorized_keys
      /root/.ssh/config
      

      This list is not exhaustive and there might be other files important for some systems, such as crontab entries.

      If SDU and RDA are configured on this node, save the configuration information so it can be restored after the node has the new image.

    13. Rebuild the master node.

      /usr/share/doc/csm/upgrade/scripts/rebuild/ncn-rebuild-master-nodes.sh $MASTER
      
    14. After the node boots:

      1. Update the node’s CFS configuration.

        cray cfs components update $XNAME --enabled true --desired-config $MASTER_CFG_ID
        
      2. Verify that the kernel version has changed.

        NEWUNAME=$(ssh $MASTER uname -r)
        echo "Old: $OLDUNAME"
        echo "New: $NEWUNAME"
        

        Important: Note that the kernel version NEWUNAME is the version based on the current CSM version and RRU version, as specified in Valid update paths.

      3. Verify the node booted successfully with the new image and CFS configuration.

        cray cfs components describe $XNAME
        

        If not configured wait until the node’s configurationStatus changes to configured state.

        NEW_IMAGE_NAME=$(ssh $MASTER "grep -oP 'metal\.server=.*?/boot-images/\K[^/]+' /proc/cmdline")
        echo "${OLD_IMAGE_NAME}"
        echo "${NEW_IMAGE_NAME}"
        
  3. Update ncn-m001.

    1. (ncn-m001#) Show the value of the MASTER_IMAGE_ID and MASTER_CFG_ID. This environment variable will need to be set after logging into ncn-m002.

      echo $MASTER_IMAGE_ID
      echo $MASTER_CFG_ID
      
    2. (ncn-m001#) Determine the SYSTEM_NAME for the system.

      SYSTEM_NAME=$(kubectl get secret site-init -n loftsman -o jsonpath='{.data.customizations\.yaml}' | base64 -d | grep "external:" | cut -f2 -d: | sed -e 's/ //')
      echo $SYSTEM_NAME
      

      Example Output:

      eniac.dev.hpe.com
      
    3. Logout of ncn-m001 and then login to ncn-m002 so ncn-m001 can be rebuilt.

      Note: Use the CMN hostname to login to ncn-m002 for the given external name of the system.

      exit
      ssh ncn-m002.cmn.eniac.dev.hpe.com
      
    4. (ncn-m002#) Once logged into ncn-m002, set the MASTER_IMAGE_ID and MASTER_CFG_ID for the new image to be used on ncn-m001.

      export MASTER_IMAGE_ID=<MASTER_IMAGE_ID>
      export MASTER_CFG_ID=<MASTER_CFG_ID>
      

      Note: MASTER_IMAGE_ID and MASTER_CFG_ID values should be replaced with the values captured in step 1 of Update ncn-m001.

    5. (ncn-m002#) Verify /etc/cray/upgrade/csm/myenv exists and sets CSM_RELEASE and CSM_ARTI_DIR.

      . /etc/cray/upgrade/csm/myenv
      echo $CSM_RELEASE
      echo $CSM_ARTI_DIR
      
    6. (ncn-m002#) Record the xname of the MASTER node.

      MASTER=ncn-m001
      XNAME=$(ssh $MASTER 'cat /etc/cray/xname')
      echo "${XNAME}"
      
    7. (ncn-m002#) SSH to MASTER and get the current/existing kernel version.

      OLDUNAME=$(ssh $MASTER uname -r)
      echo $OLDUNAME
      
    8. (ncn-m002#) Record current image id and configuration name on the MASTER node.

      OLD_CFG_NAME=$(cray cfs components describe $XNAME --format json | jq .desiredConfig)
      echo "${OLD_CFG_NAME}"
      OLD_IMAGE_NAME=$(ssh $MASTER "grep -oP 'metal\.server=.*?/boot-images/\K[^/]+' /proc/cmdline")
      echo "${OLD_IMAGE_NAME}"
      
    9. (ncn-m002#) Assign the new image to BSS. The rebuild script sets rd.live.dir=${CSM_RELEASE} but relies on BSS having the correct S3 URLs for kernel, initrd, and rootfs.

      /usr/share/doc/csm/scripts/operations/node_management/assign-ncn-images.sh -p $MASTER_IMAGE_ID $XNAME
      

      Known Issue: If the above command fails, see Master node assign-ncn-images.sh fails with ‘Error: Error received from server: 403 Forbidden’.

    10. Check for important files which are not backed up from the node.

      Warning: If there are any special local files customized, they will be removed when the storage on the node is wiped.

      Some master nodes have information in these files which is not placed there by CFS Ansible tasks and might disappear if not backed up.

      /etc/hosts
      /etc/motd
      /root/.bashrc
      /root/.config/cray
      /root/.config/sat
      /root/.screenrc
      /root/.ssh/authorized_keys
      /root/.ssh/config
      

      This list is not exhaustive and there might be other files important for some systems, such as crontab entries.

      If SDU and RDA are configured on this node, save the configuration information so it can be restored after the node has the new image.

    11. (ncn-m002#) Rebuild the master node.

      /usr/share/doc/csm/upgrade/scripts/rebuild/ncn-rebuild-master-nodes.sh $MASTER
      
    12. After the node boots:

      1. (ncn-m002#) Update the node’s CFS configuration.

        cray cfs components update $XNAME --enabled true --desired-config $MASTER_CFG_ID
        
      2. (ncn-m002#) Verify that the kernel version has changed.

        NEWUNAME=$(ssh $MASTER uname -r)
        echo "Old: $OLDUNAME"
        echo "New: $NEWUNAME"
        

        Important: Note that the kernel version NEWUNAME is the version based on the current CSM version and RRU version, as specified in Valid update paths.

      3. (ncn-m002#) Verify the node booted successfully with the new image and CFS configuration.

        cray cfs components describe $XNAME
        

        If not configured wait until the node’s configurationStatus changes to configured state.

        NEW_IMAGE_NAME=$(ssh $MASTER "grep -oP 'metal\.server=.*?/boot-images/\K[^/]+' /proc/cmdline")
        echo "${OLD_IMAGE_NAME}"
        echo "${NEW_IMAGE_NAME}"
        
  4. Restore the SDU and RDA configuration on the master node.

  5. (ncn-m002#) Verify that all master nodes have completed CFS configuration and the kernel version is updated

    for ncn in $(cray hsm state components list --subrole Master --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'
      ssh $ncn 'uname -r'
    done
    

4. References

5. Next steps