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

New Module: proxysql_galera_hostgroups #6

Open
bmildren opened this issue Jul 7, 2020 · 14 comments
Open

New Module: proxysql_galera_hostgroups #6

bmildren opened this issue Jul 7, 2020 · 14 comments

Comments

@bmildren
Copy link
Collaborator

bmildren commented Jul 7, 2020

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
@bmildren bmildren changed the title New Module: New Module: proxysql_galera_hostgroups Jul 7, 2020
@futrix
Copy link

futrix commented Apr 14, 2021

Any ETA on that? It would be really useful.

@TheOignon
Copy link

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 ?

@Andersson007
Copy link
Contributor

Andersson007 commented Jan 21, 2022

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.

@TheOignon
Copy link

TheOignon commented Jan 22, 2022

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.

@Andersson007
Copy link
Contributor

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.)

@TheOignon
Copy link

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 !

@Andersson007
Copy link
Contributor

@TheOignon sounds great, thank you!

@Andersson007
Copy link
Contributor

@TheOignon here are a couple of docs you may be interested in:

@tompal3
Copy link
Contributor

tompal3 commented Nov 17, 2023

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.

@markuman
Copy link
Member

I've enabled the workflow again, but it looks like that it needs a push on your PR to get it run again @tompal3

@tompal3
Copy link
Contributor

tompal3 commented Nov 17, 2023

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 ?

@dpavlos
Copy link

dpavlos commented May 16, 2024

Hi all, any news on this? It would be very useful.

@tompal3
Copy link
Contributor

tompal3 commented May 16, 2024

@dpavlos my PR was approved #147 so its only need to be merged and new version should be released. @markuman any estimate on that?

@markuman
Copy link
Member

We had some trouble with the backport branch.
I'll be away some days and try do it next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants