Skip to content

Commit

Permalink
Fix Assisted Service cleanup script
Browse files Browse the repository at this point in the history
This PR fixes the script responsible for cleaning up the Assisted
Service deployment. It previously relied on the variable
`NODES_PLATFORM` that has a value of `libvirt` and is unrelated
to how the Assisted Service is deployed. With this change the
Make target `assisted_deployment_cleanup` works correctly again.

This PR changes the generic `clean` target as Assisted cleanup is
redundant at this point as underlying OCP cluster has already been
deleted.
  • Loading branch information
mkowalski committed Nov 4, 2022
1 parent 2c5cb67 commit 61ba548
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ocp_run:
gather:
./must_gather.sh

clean: ocp_cleanup ironic_cleanup proxy_cleanup host_cleanup assisted_deployment_cleanup agent_cleanup registry_cleanup oc_mirror_cleanup
clean: ocp_cleanup ironic_cleanup proxy_cleanup host_cleanup agent_cleanup registry_cleanup oc_mirror_cleanup

assisted_deployment_cleanup:
./assisted_deployment.sh delete_all
Expand Down
6 changes: 2 additions & 4 deletions assisted_deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,8 @@ function delete_hive() {
}

function delete_all() {
if [ "$NODES_PLATFORM" = "assisted" ]; then
delete_assisted
delete_hive
fi
delete_assisted
delete_hive

# Skipping LocalVolume cleanup on purpose.
}
Expand Down

0 comments on commit 61ba548

Please sign in to comment.