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

changing the admin-admin_credentials results in failing puppet runs #22

Closed
mcrauwel opened this issue Mar 20, 2017 · 3 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@mcrauwel
Copy link
Member

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 4.5.1
  • Distribution: Any
  • Module version: master

How to reproduce (e.g Puppet code you use)

class { '::proxysql':
    listen_port              => 3306,
    admin_username           => 'admin',
    admin_password           => '987654321',
    ...
}

What are you seeing

It changes the configfiles but not the running config so the 'admin' interface doesn't work anymore.

What behaviour did you expect instead

The running config should be updated also.

Output log

Notice: /Stage[main]/Proxysql::Config/File[proxysql-config-file]/content: content changed '{md5}1aa0b0ff694a7637ab19d056f2570f3b' to '{md5}3f789d32711f70a0de1bbb1020c43f27'
Notice: /Stage[main]/Proxysql::Config/File[root-mycnf-file]/content: content changed '{md5}a0022951a26962843d3b6145315614b1' to '{md5}373119578d26cb27679f5e28355c5c89'
Error: Failed to apply catalog: Execution of '/usr/bin/mysql --defaults-extra-file=/root/.my.cnf -NBe SELECT username FROM mysql_users' returned 1: ERROR 1045 (28000): ProxySQL Error: Access denied for user 'admin'@'' (using password: YES)

@powercycleagain
Copy link

Got the "same" problem when changing interfaces:
mysql-interfaces | 0.0.0.0:3306;/tmp/proxysql.sock

Hiera:
'name': 'mysql-interfaces'
'value': '127.0.0.1:3306;/var/run/proxysql.sock'

Puppet module now: puppet change -> save to disk/load to runtime -> load to runtime fails
Right way in proxysql -> save to disk, restart proxysql (for mysql-interfaces, admin-mysql_ifaces, admin_credentials changes).

Quick/dirty fix:
Hiera:
'name': 'mysql-interfaces'
'value': '127.0.0.1:3306;/var/run/proxysql.sock'
'load_to_runtime': false

Restart proxysql manual.

@mcrauwel
Copy link
Member Author

I know! I have a fix in the pipeline for this... It is based on your quick/dirty fix. In config.pp I've added proxy_global_variable-resources admin-admin_credentials and admin-mysql_interfaces with load_to_runtime = false. And I give these a notify => Service[proxysql] and a before => File[root-my-cnf]...

Adding mysql-mysql_interfaces is a good idea, the proxy does need a restart when changing the sockets / listen-ip I thought...

@mcrauwel
Copy link
Member Author

On second thought, changing the mysql-interfaces does not break the admin interface or the puppet run... I try to avoid restarting the proxy daemon in an automated way as much as possible. If you want you can set the restart option to true so any config change will trigger a proxysql restart (with --reload)...

mcrauwel pushed a commit that referenced this issue Mar 21, 2017
@mcrauwel mcrauwel added the bug Something isn't working label Mar 21, 2017
@mcrauwel mcrauwel self-assigned this Mar 21, 2017
mcrauwel pushed a commit to mcrauwel/puppet-proxysql that referenced this issue May 29, 2017
cegeka-jenkins pushed a commit to cegeka/puppet-proxysql that referenced this issue Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants