Comments (5)
I see that the problem here is my using the proxysql::override_config_settings:
hash to define the resources in the configuration file.
If I create the resources directly, using either the defined types or in hiera using the syntax:
proxysql::mysql_servers:
sql1:
address: 10.0.0.1
port: 3306
hostgroup: 0
sql2:
address: 10.0.0.2
port: 3306
hostgroup: 0
...then the resources are created, loaded to runtime, saved to the sqlite database, but they do not appear in the configuration file /etc/proxysql.cnf
.
Would it not be beneficial to keep the configuration file in sync with the resources, and vice versa?
from puppet-proxysql.
I have also that the resources are not being saved to disk either, so after making a change to the configuration, not only do I have to run:
Admin> load mysql servers from config;
Admin> load mysql servers to runtime;
...but I also have to run:
Admin> save mysql servers to disk;
from puppet-proxysql.
I'm not completely sure if this is the same problem, but I have a similar issue.
I have this hiera:
proxysql::admin_listen_socket: ''
proxysql::listen_socket: ''
which creates this /etc/proxysql.conf:
admin_variables = {
...
mysql_ifaces = "127.0.0.1:6032;"
}
mysql_variables = {
interfaces = "0.0.0.0:6033;"
...
}
This config is running, but now I want to add support for IPv6. As listen_ip
does not support IPv6 configuration (the interfaces
options is created with interfaces => "${listen_ip}:${listen_port};${listen_socket}"
) I have added the IPv6 in the listen_socket
parameter, as this in hiera:
proxysql::listen_socket: '[::]:6033'
With this hiera, then /etc/proxysql.conf is correctly created:
admin_variables = {
...
mysql_ifaces = "127.0.0.1:6032;"
}
mysql_variables = {
interfaces = "0.0.0.0:6033;[::]:6033"
...
}
The problem is that this config is not propagated to runtime.
I have checked the code at proxysql::reload_config
which run:
LOAD ADMIN VARIABLES FROM CONFIG; \
LOAD ADMIN VARIABLES TO RUNTIME; \
SAVE ADMIN VARIABLES TO DISK; \
LOAD MYSQL VARIABLES FROM CONFIG; \
LOAD MYSQL VARIABLES TO RUNTIME; \
SAVE MYSQL VARIABLES TO DISK; \"
and manually run it. What I have checked is that when you run LOAD MYSQL VARIABLES FROM CONFIG;
then the interfaces
option is correctly updated in global_variables
table (but not runtime table runtime_global_variables
), but when you run LOAD MYSQL VARIABLES TU RUNTIME;
then, instead of loading configuration to runtime_global_variables
then global_variables
is reset to configuration without IPv6 configuration.
So this new config is never loaded in runtime.
Any help? Is this a bug of the module? Or a bug in proxysql?
from puppet-proxysql.
@amateo - mysql-interfaces
is one of only 3 variables that can't be updated at runtime. See here.
If you need to change this configuration value, you need to restart proxysql. You can use restart => true
for this.
from puppet-proxysql.
We are also experiencing this problem
A Puppetrun output shows us that the file is being changed on disk and the reload_config is being triggered
Info: /Stage[main]/Proxysql::Config/File[proxysql-config-file]: Scheduling refresh of Exec[reload-config]
Notice: /Stage[main]/Proxysql::Reload_config/Exec[reload-config]: Triggered 'refresh' from 1 event
Info: Stage[main]: Unscheduling all events on Stage[main]
Notice: Applied catalog in 24.61 seconds
However before any of the settings are applied we have to use the ProxySQL Admin interface and issue the following commands
before the running process is aware of the change.
load mysql servers from config;
save mysql servers to disk;
load mysql servers to runtime;
the same is true for mysql query rules
and I suspect users.
It would appear that the problem is that proxysql::reload_config
only processes MYSQL and ADMIN variables
where the documentation states:
Moving config between layers
In order to persist configuration to disk or load configuration to runtime there is a set of different admin commands available which can be executed via the admin interface for each configuration item e.g.
mysql servers
,mysql users
,mysql query rules
.
from puppet-proxysql.
Related Issues (20)
- Debian 10 Buster support HOT 1
- Service management broken with ProxySQL 2 when `restart => true` HOT 1
- ProxySQL errors after 2.0.9 release HOT 4
- ProxySQL 2 gets restarted as root
- Acceptance tests on CentOS 6 stopped working HOT 2
- New release?
- proxy_mysql_user + ensure absent HOT 4
- Disabling Proxysql Conf Generation makes module fail
- Escape issue in .my.cnf on machine with specific characters inside password template(my.cnf.erb)
- Update dependency from camptocamp-systemd to puppet-systemd HOT 4
- Stop mysql_servers loading to runtime HOT 1
- ProxySQL 2.4.x not supported
- Next stable Release ?
- Ubuntu 18.04 Bionic Beaver support HOT 1
- Missing configuration directives HOT 8
- Package installed from coded URL when managed repo is off HOT 2
- Types redesign HOT 1
- Impossible to define a host in 2 different hostgroups HOT 2
- Problem with escaped Strings on query rules
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-proxysql.