Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean unused Floating IPs in Openstack, before creating new ones #881

Merged
merged 2 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ods_ci/tasks/Resources/Provisioning/Hive/OSP/create_fips.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ osp_dashboard="$(openstack catalog show keystone -c endpoints -c name -c type \

echo "Connected to Openstack: ${osp_dashboard}"

echo "Cleaning unused Floating IPs in Openstack Cloud '$OSP_CLOUD' (before creating new IPs in Network '$OSP_NETWORK')"
openstack floating ip list --status DOWN -c 'Floating IP Address' -f value | xargs -n1 -r --verbose openstack floating ip delete || rc=$?
if [[ -n "$rc" ]] ; then
echo -e "Failure [$rc] cleaning unused floating IPs"
exit ${rc:+$rc}
fi

echo "Allocating a floating IP for cluster's API"
cmd=(openstack floating ip create --description "$CLUSTER_NAME API" -f value -c floating_ip_address "$OSP_NETWORK")
echo "${cmd[@]}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ items:
- apiVersion: hive.openshift.io/v1
kind: ClusterImageSet
metadata:
name: rhods-imageset-ocp-${infrastructure_configurations}[ocp_version]
name: ${infrastructure_configurations}[image_set]
namespace: ${infrastructure_configurations}[hive_claim_ns]
spec:
releaseImage: quay.io/openshift-release-dev/ocp-release:${infrastructure_configurations}[ocp_version]-x86_64