This section applies to all node types. The commands in this section assume the variables from the prerequisites section have been set.
Run the following commands from a node that has the Cray CLI initialized:
ncn-mw# cray bss bootparameters list --name $XNAME --format=json | jq .[] > ${XNAME}.json
Set the kernel parameters to wipe the disk.
"metal.no-wipe"
and ensure it is set to zero "metal.no-wipe=0"
.Get a token to interact with BSS using the REST API.
ncn-w# TOKEN=$(curl -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')
Do a PUT action for the new JSON file.
ncn-mw# curl -i -s -H "Content-Type: application/json" -H "Authorization: Bearer ${TOKEN}" \
"https://api-gw-service-nmn.local/apis/bss/boot/v1/bootparameters" -X PUT -d @./${XNAME}.json
IMPORTANT: Ensure a good response (HTTP CODE 200
) is returned in the output.
bss bootparameters list
command returns the expected informationExport the list from BSS to a file with a different name.
ncn-mw# cray bss bootparameters list --name ${XNAME} --format=json |jq .[]> ${XNAME}.check.json
Compare the new JSON file with what was PUT to BSS.
ncn-mw# diff ${XNAME}.json ${XNAME}.check.json
Proceed to the next step to Wipe Drives or return to the main Rebuild NCNs page.