Last active
January 25, 2024 21:30
-
-
Save fmount/116af547d34ef007b7868b66cdf423e2 to your computer and use it in GitHub Desktop.
workaround provided by kcs 7025985
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TIME=5 | |
STORAGE_NETWORK=${STORAGE_NETWORK:-"172.17.3.0/24"} | |
cat <<EOF>rgw_spec | |
--- | |
service_type: rgw | |
service_id: rgw | |
service_name: rgw.rgw | |
placement: | |
hosts: | |
- controller-0 | |
- controller-1 | |
- controller-2 | |
networks: | |
- $STORAGE_NETWORK | |
spec: | |
rgw_frontend_port: 8080 | |
rgw_realm: default | |
rgw_zone: default | |
EOF | |
function patch_rgw() { | |
echo "Deploy the tripleo rgw" | |
sudo cephadm shell -m rgw_spec -- ceph orch apply -i /mnt/rgw_spec | |
sleep $TIME | |
echo "Delete the ceph-ansible adopted rgw" | |
for i in 0 1 2; do | |
sudo cephadm shell -- ceph orch rm rgw.controller-$i; | |
done | |
} | |
function restart_haproxy() { | |
echo "pcs unmanage haproxy" | |
sudo pcs resource unmanage haproxy-bundle | |
echo "pcs disable haproxy" | |
sudo pcs resource disable haproxy-bundle | |
echo "pcs manage haproxy" | |
sudo pcs resource manage haproxy-bundle | |
sleep $TIME | |
# Check RGW daemons have been deployed before enabling haproxy | |
#if [ -n "$(sudo cephadm shell -- ceph orch ps | grep rgw)" ]; then | |
echo "pcs enable haproxy" | |
sudo pcs resource enable haproxy-bundle | |
#fi | |
} | |
patch_rgw | |
sleep 20 | |
restart_haproxy | |
rm rgw_spec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment