-
-
Notifications
You must be signed in to change notification settings - Fork 58
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 ability to split config into 2 files #60
Conversation
manifests/install.pp
Outdated
@@ -27,6 +36,8 @@ | |||
} | |||
|
|||
class { '::mysql::client': | |||
package_name => 'mysql-client', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hardcoding like this will break for RedHat/CentOS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is also duplicated in #58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Answered in #58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove it from this PR and keep the fix in #58. Agreed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed, as will be changed to variable in #58
manifests/init.pp
Outdated
@@ -132,8 +143,11 @@ | |||
String $monitor_username = $::proxysql::params::monitor_username, | |||
Sensitive[String] $monitor_password = $::proxysql::params::monitor_password, | |||
|
|||
Boolean $split_config = $::proxysql::params::split_config, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove the leading ::
templates/proxysql.cnf.erb
Outdated
<% | ||
end | ||
else | ||
default_handler.call(k, v) | ||
end | ||
end | ||
-%> | ||
|
||
<% if scope.lookupvar('::proxysql::split_config') == true -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work as well:
if @proxysql::split_config == true
templates/proxysql_proxy.cnf.erb
Outdated
@@ -0,0 +1,56 @@ | |||
<% | |||
default_handler = Proc.new do |k, v| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b25c7ba
to
e1da828
Compare
Review notes applied - changed all |
@MaxFedotov can you rebase on the current master? |
e1da828
to
79ea7ea
Compare
Hi, |
now let's rebase this. I will try to find the issue in the tests... |
79ea7ea
to
5305e3c
Compare
done, but errors are the same |
manifests/install.pp
Outdated
ensure => 'present', | ||
} | ||
|
||
user { $::proxysql::sys_owner: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please do not add leading ::
@@ -158,6 +168,11 @@ | |||
String $monitor_username = $proxysql::params::monitor_username, | |||
Sensitive[String] $monitor_password = $proxysql::params::monitor_password, | |||
|
|||
Boolean $split_config = $proxysql::params::split_config, | |||
|
|||
String $proxy_config_file = $proxysql::params::proxy_config_file, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please use String[1]
? Otherwise empty string is allowed as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh this is a path. Please use Stdlib::Absolutepath here.
manifests/reload_config.pp
Outdated
SAVE MYSQL VARIABLES TO DISK; \" | ||
", | ||
subscribe => $subscribe, | ||
require => [ Service[$::proxysql::service_name] , File['root-mycnf-file'] ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not add leading ::
Still got this :( and + when using stdlib got: |
@bastelfreak were you able to fix problems with Travis? |
metadata.json
Outdated
@@ -12,6 +12,10 @@ | |||
"name": "puppetlabs-mysql", | |||
"version_requirement": ">= 2.5.0 < 7.0.0" | |||
}, | |||
{ | |||
"name": "puppetlabs-stdlib", | |||
"version_requirement": ">= 1.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to remove this now or wait for releases from puppetlabs: #65
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this for now and i will create another PR, which will add this and can be merged later :)
454c69a
to
ed2a8e5
Compare
made rebase on master. Still got errors |
@mcrauwel can you look into this? Is master broken? |
master is ok, so it must be something in the PR, it's only happening on deb based systems hence some tests (RHEL/CentOS) are successful |
I have no errors when installing it on centos. Will check PR one more time again tomorrow |
@MaxFedotov you can run the acceptance test locally for the deb env's I used this:
these env variables are coming from the |
current issue looks like a bug in the debian8 package for proxysql... |
created upstream issue sysown/proxysql#1679 |
should we, for now, remove debian 8 from .travis.yml/metadata.json? So we could merge this now and later add it back. This would allow us to do a new release finally. |
Let’s wait for a day or 2 to see if they can quickly fix it?
…Sent from my iPhone
On 8 Sep 2018, at 20:23, Tim Meusel ***@***.***> wrote:
should we, for now, remove debian 8 from .travis.yml/metadata.json? So we could merge this now and later add it back. This would allow us to do a new release finally.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
update: i found the error and opened an upstream PR sysown/proxysql#1680 |
Hooray! Thanks for your contributions @MaxFedotov and thanks for the help @bastelfreak! |
Added ability to create two different config files, if variable
$split_config
is set to true - one for admin\mysql variables (controlled by$config_file
and$manage_config_file
variables), another for servers\users\hostgroups\scheduler\rules params of ProxySQL (controlled by$proxy_config_file
andmanage_proxy_config_file
variables) . This was done to allow management of main config file by puppet and manage all proxy configuration settings by some external provider (for example, consul-template, bash script), as this file needs to be updated in more frequent intervals that actual puppet agent interval (e.g. for each failover)Also added creation of
sys_owner
user andsys_group
group in install.pp to fix possible errors if this groups doesn't exists.Added
package_name
andpackage_ensure
, because got problems with mariadb conflicting package trying to install during puppet run.Added
reload_config
manifest to allow dynamic config reload