Boovan Rajendran 8edb19bdd5 Enhance k8s-container-cleanup.sh to operate during upgrade abort
This change is to add optional argument 'force-clean' to
stop all containers during 'system kube-upgrade-abort'.
The default usage of this script with no options only performs
cleanup during systemd 'stopping' phase.

Test-plan:
Pass: During 'system kube-upgrade-abort' process verify the puppet.log
and check '/usr/sbin/k8s-container-cleanup.sh  force-clean' is
executed successfully.
Pass: Manually execute '/usr/sbin/k8s-container-cleanup.sh force-clean'
verify all the containers have exited.
Pass: Manually execute the script by passing the wrong argument
"/usr/sbin/k8s-container-cleanup.sh clean-force" and verify it
gives the appropriate error message -
"usage: /usr/sbin/k8s-container-cleanup.sh { force-clean }"

Story: 2010565
Task: 48094

Change-Id: I8029e89b600cb644bfa4a83f3208e677878f19e7
Signed-off-by: Boovan Rajendran <boovan.rajendran@windriver.com>
2023-05-30 00:08:39 -04:00
..
2023-05-16 17:36:01 -04:00