community.proxysql
community.proxysql copied to clipboard
New Module: proxysql_galera_hostgroups
SUMMARY
Need to add a module to support changes to the proxysql_galera_hostgroups config, along with the associated integration tests.
ISSUE TYPE
- Feature Idea
COMPONENT NAME
- proxysql_galera_hostgroups
ADDITIONAL INFORMATION
ProxySQL Table:
mysql> show create table mysql_galera_hostgroups\G
*************************** 1. row ***************************
table: mysql_galera_hostgroups
Create Table: CREATE TABLE mysql_galera_hostgroups (
writer_hostgroup INT CHECK (writer_hostgroup>=0) NOT NULL PRIMARY KEY,
backup_writer_hostgroup INT CHECK (backup_writer_hostgroup>=0 AND backup_writer_hostgroup<>writer_hostgroup) NOT NULL,
reader_hostgroup INT NOT NULL CHECK (reader_hostgroup<>writer_hostgroup AND backup_writer_hostgroup<>reader_hostgroup AND reader_hostgroup>0),
offline_hostgroup INT NOT NULL CHECK (offline_hostgroup<>writer_hostgroup AND offline_hostgroup<>reader_hostgroup AND backup_writer_hostgroup<>offline_hostgroup AND offline_hostgroup>=0),
active INT CHECK (active IN (0,1)) NOT NULL DEFAULT 1,
max_writers INT NOT NULL CHECK (max_writers >= 0) DEFAULT 1,
writer_is_also_reader INT CHECK (writer_is_also_reader IN (0,1,2)) NOT NULL DEFAULT 0,
max_transactions_behind INT CHECK (max_transactions_behind>=0) NOT NULL DEFAULT 0,
comment VARCHAR,
UNIQUE (reader_hostgroup),
UNIQUE (offline_hostgroup),
UNIQUE (backup_writer_hostgroup))
Example usage:
- name: proxysql | config | add galera hostgroups
proxysql_galera_hostgroups:
login_user: 'admin'
login_password: 'admin'
writer_hostgroup: 1
reader_hostgroup: 2
state: present
Any ETA on that? It would be really useful.
Hi. I've made such a module (totally inspired from proxysql.proxysql_replication_hostgroups module). Even if I'm not a maintainer, am I able to propose a PR ?
Hi. I've made such a module (totally inspired from proxysql.proxysql_replication_hostgroups module). Even if I'm not a maintainer, am I able to propose a PR ?
Hi @TheOignon, sure, everyone can and should! Please do it:)
You can also be interested in some of our contributor guidelines listed in https://github.com/ansible-collections/community.proxysql/blob/main/README.md. You can find info on how to run sanity test locally / add integration tests for your module and run them locally before pushing. Though you can push it as it is now and fix everything later.
Thanks for the quick answer !
Though you can push it as it is now and fix everything later.
Even though I didn't added sanity nor integration tests, should I create a PR right now ? It's pushed on a fork I made following the guidelines you linked.
Thanks for the quick answer !
Though you can push it as it is now and fix everything later.
Even though I didn't added sanity nor integration tests, should I create a PR right now ? It's pushed on a fork I made following the guidelines you linked.
yep, sounds good, though we need to have integration tests eventually in the PR (no need to do anything for sanity tests, they are just checks for formatting compliance, standards, etc.)
we need to have integration tests eventually in the PR
Those tests will be added, it's been running on a role I developped using this plugin, just need to rewrite correctly everything. I also need to add some documentations. I will create the PR soon, thanks for your answers !
@TheOignon sounds great, thank you!
@TheOignon here are a couple of docs you may be interested in:
- https://github.com/ansible/community-docs/blob/main/create_pr_quick_start_guide.rst
- https://github.com/ansible/community-docs/blob/main/integration_tests_quick_start_guide.rst
Hi all, I have created a PR for this issue, so what's next ? I see that workflows of this repo have been disabled with message:
This scheduled workflow is disabled because there hasn't been activity in this repository for at least 60 days. Enable this workflow to resume scheduled runs.
How can it be enabled, and my PR get reviewed and merged ?
Thanks for any help.
I've enabled the workflow again, but it looks like that it needs a push on your PR to get it run again @tompal3
Thanks @markuman I did that, now need to wait for someone's approval for workflow to run I guess: https://github.com/ansible-collections/community.proxysql/actions/runs/6902866352 ?
Hi all, any news on this? It would be very useful.
@dpavlos my PR was approved https://github.com/ansible-collections/community.proxysql/pull/147 so its only need to be merged and new version should be released. @markuman any estimate on that?
We had some trouble with the backport branch.
I'll be away some days and try do it next week.