Skip to content

Commit

Permalink
cleanup: return true on the ps so script doesn't exit on failure
Browse files Browse the repository at this point in the history
When no containerd-nydus-grpc pid is found, script will exit on this line.

Signed-Off-By: Ryan Savino <ryan.savino@amd.com>
  • Loading branch information
ryansavino committed Jul 27, 2024
1 parent f71498d commit 7708a79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion misc/snapshotter/snapshotter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ function deploy_snapshotter() {
function cleanup_snapshotter() {
echo "cleaning up snapshotter"

pid=$(ps -ef | grep containerd-nydus-grpc | grep -v grep | awk '{print $1}')
pid=$(ps -ef | grep containerd-nydus-grpc | grep -v grep | awk '{print $1}' || true)
if [ ! -z "$pid" ]; then
local ctr_args=""
if [[ " k3s k3s-agent rke2-agent rke2-server " =~ " ${CONTAINER_RUNTIME} " ]]; then
Expand Down

0 comments on commit 7708a79

Please sign in to comment.