Skip to content

Commit

Permalink
CASM-3864: Clean up files in /tmp after execution
Browse files Browse the repository at this point in the history
  • Loading branch information
Srinivas-Anand-HPE committed Dec 2, 2024
1 parent 6017ff6 commit e529871
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions workflows/templates/base/ssh.template.argo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ spec:
else
scp -i /myssh/id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ${ts}.sh root@$HOST:/tmp/${ts}.sh
ssh -i /myssh/id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@$HOST "/tmp/${ts}.sh"
ssh -i /myssh/id_rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@$HOST "rm /tmp/${ts}.sh"
fi
volumeMounts:
- name: ssh
Expand Down
1 change: 1 addition & 0 deletions workflows/templates/storage.create-rgw-buckets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ spec:
if [[ ${TARGET_NCN} == "ncn-s001" ]]; then
scp /usr/share/doc/csm/upgrade/scripts/ceph/create_rgw_buckets.sh ${TARGET_NCN}:/tmp
ssh ${TARGET_NCN} '/tmp/create_rgw_buckets.sh'
ssh ${TARGET_NCN} 'rm /tmp/create_rgw_buckets.sh'
else
echo "Creating rgw-buckets only needs to be done once on ncn-s001. Skipping this task on ${TARGET_NCN}"
fi
2 changes: 2 additions & 0 deletions workflows/templates/storage.shutdown-services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ spec:
chmod +x "${basedir}/standdown.sh"
scp "${basedir}/standdown.sh" "${TARGET_NCN}:/tmp/standdown.sh"
ssh "${TARGET_NCN}" '/tmp/standdown.sh'
ssh "${TARGET_NCN}" 'rm /tmp/standdown.sh'
else
echo >&2 "${TARGET_NCN} has nothing to standdown! This is not expected."
exit 1
Expand Down Expand Up @@ -154,6 +155,7 @@ spec:
chmod +x "${basedir}/standdown.sh"
scp "${basedir}/standdown.sh" "${TARGET_NCN}:/tmp/standdown.sh"
ssh "${TARGET_NCN}" '/tmp/standdown.sh'
ssh "${TARGET_NCN}" 'rm /tmp/standdown.sh'
else
echo >&2 "${TARGET_NCN} has nothing to standdown! This is not expected."
exit 1
Expand Down
1 change: 1 addition & 0 deletions workflows/templates/wipe-and-reboot-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ spec:
chmod +x set-next-boot-to-pxe.sh
scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null set-next-boot-to-pxe.sh $TARGET_NCN:/tmp/set-next-boot-to-pxe.sh
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $TARGET_NCN '/tmp/set-next-boot-to-pxe.sh'
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $TARGET_NCN 'rm /tmp/set-next-boot-to-pxe.sh'
- name: "pxe-boot-node"
dependencies:
- get-bootscript-last-access-timestamp
Expand Down

0 comments on commit e529871

Please sign in to comment.