-
Notifications
You must be signed in to change notification settings - Fork 26
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
feat: add support config allow_connection and some things about read only routing #338
base: main
Are you sure you want to change the base?
feat: add support config allow_connection and some things about read only routing #338
Conversation
add support read_only_url and read_only_routing_url add support config ALLOW_CONNECTIONS
defalt/main.yml add new var
@zhuatuzilo that's a huge improvement, many thanks for your contributions. I need to cover these new variables with tests. What would be the verification steps to test that this setup works? Would you be able to come up with similar verification tasks? |
value: 30s | ||
ha_cluster_resource_clones: | ||
- resource_id: ag_cluster | ||
promotable: yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
promotable: yes | |
promotable: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know the README example uses yes
- but this fails ansible-lint - Ansible strongly prefers the use of true/false
@zhuatuzilo thank you for the submission. Can you please explain a bit more about why a user would need to use this new feature? |
Co-authored-by: Richard Megginson <[email protected]>
Co-authored-by: Richard Megginson <[email protected]>
we need
|
sorry |
Feature: add two variable in inventory:
mssql_ha_secondary_role_allow_connections
-READ_ONLY
orALL
orNO
- defaultALL
mssql_ha_read_only_routing_list
- e.g.('node-4','node-6')
- if undefined or empty value , will not set read only routing list - default is undefinedSee this for possible values and more info - https://learn.microsoft.com/en-us/sql/database-engine/availability-groups/windows/configure-read-only-routing-for-an-availability-group-sql-server?view=sql-server-ver16
add auto set read only routing url like 'tcp://node-4:1433', '1433' from var: mssql_tcp_port
it's work in my local, I test two example
1、the variable is defined as
mssql_ha_secondary_role_allow_connections: READ_ONLY
mssql_ha_read_only_routing_list: ('node-5','node-6')
result: as expected
2、the variable is undefined
result: allow connections be 'ALL', read only routing list be NULL, as expected
Reason: we need READ ONLY ROUTING LIST used to provide read write separation and load balance for read only (or priority of human control for read only), if need READ ONLY ROUTING LIST then must defined READ ONLY ROUTING URL at first.
SECONDARY_ROLE ( ALLOW_CONNECTION='READ_ONLY') used to verify attribute defined in the connection string on replica which is secondary role, like
ApplicationIntent=ReadOnly.
Result: Users can configure an Always On availability group to support read-only routing