Prestage directory cleanup on system load-delete

Remove prestage directory content on the system controller as part of
system load-delete

Approach:
- Modify the /etc/sysinv/upgrades/delete_load.sh script to cleanup
  the system controller prestage directory at
  /opt/platform/deploy/<version> if it exists.
- This directory will only exist on a DC system controller

Story: 2009799
Task: 44748

Test Plan:

PASS:
- verify /opt/platform/deploy/<version> directory is removed
  when system load-delete is invoked for a load with <version>
- verify /opt/platform/deploy/<version> directory is untouched
  when system load-delete is invoked for a load with different <version>

Signed-off-by: Kyle MacLeod <kyle.macleod@windriver.com>
Change-Id: Iab7fe29f5da39f05e5482496949665488e508201
This commit is contained in:
Kyle MacLeod 2022-03-10 22:11:28 -05:00
parent 7650919fb1
commit 19e17729db
1 changed files with 5 additions and 0 deletions

View File

@ -11,6 +11,7 @@
VERSION=$1
FEED_DIR=/var/www/pages/feed/rel-$VERSION
PRESTAGE_DIR=/opt/platform/deploy/$VERSION
rm -f /var/pxeboot/pxelinux.cfg.files/*-$VERSION
rm -rf /var/pxeboot/rel-$VERSION
@ -18,3 +19,7 @@ rm -rf /var/pxeboot/rel-$VERSION
rm -f /usr/sbin/pxeboot-update-$VERSION.sh
rm -rf $FEED_DIR
if [ -d $PRESTAGE_DIR ]; then
rm -rf $PRESTAGE_DIR
fi