Enhance High Availability and SSL Configuration for OpenGauss Cluster#19
Merged
liubao68 merged 7 commits intoHuaweiCloudDeveloper:masterfrom Sep 8, 2025
Merged
Conversation
added 7 commits
September 6, 2025 19:28
…balancing, and primary node discovery in GaussDB clusters
… permissions step in workflow, improve code formatting, add type hints, and enhance string literals in cluster_ha_showcase.py
…ssions to include directory creation, add null checks for database queries, and improve error handling in connect_with_retry
…ig permissions step, use tee for file creation, simplify string quoting in postgresql.conf and pg_hba.conf, and fix string literal consistency in get_node_role
…ership and permissions fix step for opengauss directory
…ership and permissions fix step for opengauss directory
…dd cluster_opengauss_docker.sh for OpenGauss cluster deployment, and include cluster_opengauss_docker_readme.md for setup instructions; set executable permissions for modified and new files
liubao68
reviewed
Sep 8, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces enhancements to the OpenGauss database setup, focusing on high availability (HA). It adds a new Python script,
cluster_ha_showcase.py, to demonstrate HA capabilities such as disaster recovery, load balancing, and automatic primary node discovery. Additionally, it improves thetests-ssl.ymlworkflow by refining configuration file creation and permissions, and includes a Docker setup script (cluster_opengauss_docker.sh) along with its documentation (cluster_opengauss_docker_readme.md) for streamlined cluster deployment.Changes Made
Added
cluster_ha_showcase.py:Updated
tests-ssl.yml:teewithcatfor creatingpostgresql.confandpg_hba.confto simplify file creation.opengauss/confownership command.Added
cluster_opengauss_docker.sh:Added
cluster_opengauss_docker_readme.md:Why
These changes aim to:
cluster_ha_showcase.pyscript provides a robust way to test and demonstrate OpenGauss's high availability features, improving reliability in production environments.tests-ssl.ymlstreamline the configuration process, making it more maintainable and less error-prone.cluster_ha_showcase.pyensures sensitive information is not exposed in logs, aligning with best practices for secure logging.Testing
cluster_ha_showcase.py:tests-ssl.yml:catinstead oftee.postgresql.confandpg_hba.conf.cluster_opengauss_docker.sh.gsqlcommands.SLAVE_COUNTvalues to ensure scalability.cluster_opengauss_docker_readme.mdfor clarity and completeness by following the setup instructions on a fresh environment.