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

add support for PROXYSQL TLS RELOAD #84

Open
markuman opened this issue Oct 27, 2021 · 5 comments
Open

add support for PROXYSQL TLS RELOAD #84

markuman opened this issue Oct 27, 2021 · 5 comments
Labels
easyfix enhancement New feature or request good first issue Good for newcomers

Comments

@markuman
Copy link
Member

SUMMARY

with proxsql 2.3.0 command PROXYSQL TLS RELOAD is available

Added support for reloading TLS files at runtime, allowing ProxySQL to change its cert/key files used for client connections. This also introduces the command PROXYSQL TLS RELOAD
https://github.com/sysown/proxysql/releases/tag/v2.3.0

But where to include? maybe proxysql_manage_config?

ISSUE TYPE
  • Feature Idea
@markuman markuman added easyfix enhancement New feature or request good first issue Good for newcomers labels Oct 27, 2021
@markuman
Copy link
Member Author

It's not compatible with proxysql_manage_config, because it required 4 parameters, but we need only 3 parameters.

I can think of 2 options

  1. Implement community.proxysql.proxysql_query and use it to query PROXYSQL TLS RELOAD
  2. Implement community.proxysql.proxysql_tls

Instead of community.proxysql.proxysql_query we can use community.mysql.mysql_query.

proxysql_tls could be use to setup entire tls confirguration.
But that might be also overkill, because you only need to set some vars to some files.

Any more ideas @Andersson007 ?

@Andersson007
Copy link
Contributor

Andersson007 commented Nov 11, 2021

@markuman when reading the issue description, i was thinking about proxysql_query too. A separate module for TLS configuration seems to be overkill, yeah.
So mysql_query works with ProxySQL, right? There are 2 options i can see:

  1. Mention in the collection doc (README, NOTES sections, ..) that users can use mysql_query to run arbitrary queries in ProxySQL if they need.
  2. Copy the module from community.mysql and rename it to proxysql_query (i think slight code modifications will be needed).

For consistency, i would prefer to see proxysql_query module but it's a chunk of code that needs to be maintained (at least backport patches from c.mysql).
I don't see a lot of bugreports / patches for mysql_query module since it was introduced but c.proxysql maintainers will have to subscribe to c.mysql to track related changes.
So it's up to maintainers of c.proxysql collection to decide if they wanna maintain one more module;)
(If i have free time, i could help backport related patches, though I'm not against mentioning mysql_query in the doc).

@markuman
Copy link
Member Author

yes, this is working fine.

- name: reload proxysql tls certificates
  community.mysql.mysql_query:
    login_user: admin
    login_password: admin
    login_port: 6032
    query: PROXYSQL RELOAD TLS;
  register: out

results in

    "out": {
        "changed": false,
        "executed_queries": [
            "PROXYSQL RELOAD TLS;"
        ],
        "failed": false,
        "query_result": [
            []
        ],
        "rowcount": [
            0
        ]
    }

Mention in the collection doc (README, NOTES sections, ..) that users can use mysql_query to run arbitrary queries in ProxySQL if they need.

So where to add @Andersson007 ?
Is it possible to add here a note block? https://docs.ansible.com/ansible/latest/collections/community/proxysql/index.html

@Andersson007
Copy link
Contributor

Great question:) I've been thinking of where we could add this but have failed..
I'll ask in ansible-docs channel if it's possible or not to add the note block.
We could also add the SEEALSO section to each module referring to other modules including mysql_query but it would be an overkill i think..

@Andersson007
Copy link
Contributor

Done, will see.
Another (or additional) way could be mentioning it in README (though I agree that it would be nice to mention it on the doc site).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easyfix enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants