Skip to content

Commit 44f7e9c

Browse files
Merge pull request #935 from Akrog/fix-network-edpm_deploy_cleanup
Remove network agents on cleanup
2 parents 9e5539f + bd943af commit 44f7e9c

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,7 @@ edpm_deploy_cleanup: namespace ## cleans up the edpm instance, Does not affect t
843843
$(eval $(call vars,$@,dataplane))
844844
oc kustomize ${DEPLOY_DIR} | oc delete --ignore-not-found=true -f -
845845
${CLEANUP_DIR_CMD} ${OPERATOR_BASE_DIR}/openstack-operator ${DEPLOY_DIR}
846+
bash scripts/cleanup-edpm_deploy.sh
846847

847848
.PHONY: edpm_deploy
848849
edpm_deploy: input edpm_deploy_prep ## installs the dataplane instance using kustomize. Runs prep step in advance. Set OPENSTACK_REPO and OPENSTACK_BRANCH to deploy from a custom repo.

scripts/cleanup-edpm_deploy.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
set -ex
3+
4+
# Remove all the networking agent entries in case we do another EDPM deploy
5+
AGENTS=$(oc rsh openstackclient bash -c 'openstack network agent list | grep -E "edpm-compute-.+\.ctlplane" | cut -d" " -f2 | xargs echo -n')
6+
if [[ -n "${AGENTS}" ]]; then
7+
oc rsh openstackclient bash -c "openstack network agent delete ${AGENTS}"
8+
fi

0 commit comments

Comments
 (0)