edestecd / puppet-mariadb Goto Github PK
View Code? Open in Web Editor NEWPuppet Module for managing MariaDB
License: GNU General Public License v3.0
Puppet Module for managing MariaDB
License: GNU General Public License v3.0
Please document or provide examples of the following:
Should that not be false as default?
Add the following to the mariadb systemd service file
[Service]
TimeoutStartSec=0
The Puppet forge indicates that this module was released Aug 26th 2020 yet there is a newer tag (2.1.2) and even newer master code at Github.
wsrep_cluster_peers => delete(['192.168.1.1', '192.168.1.2', '192.168.1.3'], $::ipaddress)
in most other galera modules, peers are defined without the delete:
galera_servers => ['192.168.171.1', '192.168.171.2', '192.168.171.3'],
im not complaining, i am just curious
The recent merge of tls_options for mysql_user broke my setup
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: no parameter named 'tls_options' at /etc/puppetlabs/code/modules/mariadb/manifests/cluster/wsrep_sst_user.pp:13 on Mysql_user[wsrep_sst@%] at /etc/puppetlabs/code/modules/mariadb/manifests/cluster/wsrep_sst_user.pp:13 on node mariadb1
I have verified that I have the tls_options parameter for the mysql_user resource (the puppetlabs-mysql module, I sync the puppetlabs-mysql module against the github master branch and still spits out the same error).
Have I missed something? Thanks for any feedback.
mariadb::server does not accept a parameter matching puppetlabs/mysql::server::remove_default_accounts, and the default is not the same as the mysql module's default.
Hi I wonder how you manage systemd units tuning, today i have a wrapping class that add files under: /etc/systemd/system/mariadb.service.d/
Shouldn't we add this feature to this module? or keep it as the resposibility of the caller?
Required additional fix to issue #53
Cluster definition missing parameter
diff --git a/manifests/cluster.pp b/manifests/cluster.pp
index 989eda0..403f5c9 100644
--- a/manifests/cluster.pp
+++ b/manifests/cluster.pp
@@ -114,6 +114,7 @@ class mariadb::cluster (
users => $users,
grants => $grants,
databases => $databases,
+ remove_default_accounts => $remove_default_accounts,
}
-> class { 'mariadb::cluster::auth': }
-> class { 'mariadb::cluster::galera_config': }
When I try to install a server I get the error:
(File[/etc/locale.conf] => Class[Locales] => Stage[setup] => Stage[main] => Class[Mariadb::Repo::Yum] => Yumrepo[mariadb] => Package[glibc-common] => File[/etc/locale.conf])
The error happens no matter how I attemtp to use it
include mariadb::server
class { 'mariadb::server':
options
}
I am on rhel 7.5 with puppet 4.10. I have the mysql and its dependencies loaded into the puppet file. I cannot see any requirements for locales in the code, but this is a new error for me.
I found and maybe others have as well, that the dependency of <5.0.0 on puppetlabs-stdlib ends up making resolving dependencies across this and other packages near impossible. Is there any reason not to be able to use stlib > 5? I'm basically running into a huge road block as a result of this incompatibility
I'm running RSpec tests against a role of our control repository, and the test fails with a dependency cycle on Debian 9. This is what the test looks like:
require 'spec_helper'
describe 'role::server::customer_standalone' do
on_supported_os.each do |os, facts|
context "on #{os}" do
let(:facts) do
facts.merge(
service_provider: 'systemd',
)
end
it { is_expected.to compile.with_all_deps }
end
end
end
The tests are executed using PDK on a GitLab runner: (Interestingly, when I run the same command locally on my Ubuntu 17.04 Zesty development machine the tests pass. ๐)
$ pdk test unit 2> /dev/null
failed: rspec: ./spec/classes/role_server_customer_standalone_spec.rb:12: dependency cycles found: (Anchor[apt_key 177F4010FE56CA3336300305F1656F24C74CD1D8 present] => Apt::Key[Add key: 177F4010FE56CA3336300305F1656F24C74CD1D8 from Apt::Source mariadb] => Apt::Source[mariadb] => Class[Apt::Update] => Exec[apt_update] => Class[Apt::Update] => Package[dirmngr] => Apt::Key[Add key: 177F4010FE56CA3336300305F1656F24C74CD1D8 from Apt::Source mariadb] => Anchor[apt_key 177F4010FE56CA3336300305F1656F24C74CD1D8 present])
role::server::customer_standalone on debian-9-x86_64 should compile into a catalogue without dependency cycles
Failure/Error:
end
it { is_expected.to compile.with_all_deps }
end
end
In the role I only include the needed profiles, and the mariadb::server
profile only includes this module:
# Role for profiles that need to make a customer standalone host work
class role::server::customer_standalone {
# All roles should include the base profile
include profile::base
include profile::server
include profile::database::mariadb::server
include profile::webserver::apache
include profile::php
include profile::deployment::comsolit_deploy
include profile::monitoring::datadog
include profile::backup
include profile::ftp::server
}
# MariaDB database service profile (includes component modules for database server setup)
class profile::database::mariadb::server {
include 'mariadb::server'
}
Any idea what could be wrong?
The 8.0.0 mysql puppet module deprecated the deepmerge function.
Dependency says (>= 2.3.0 < 7.0.0) for puppetlabs/apt
I'm using 7.3.0 newest is 7.5.0
like this: https://gist.github.com/gmcmillan/2304284
basically the syntax for everything should come down to:
What do you think?
i mean yes, one could just create his own config and apply that, but where is the fun in that?
Use a puppetlabs module as an example and for god sakes use module sync!
I have tried just specifying the repo version, but in all attempted cases under all the permutations I can come up with I can't specify the correct package names for CentOS8, which ends up just always, without regard for any hiera config, using the default non-existant package names. The title says it all...
How does one install 10.4 using this puppet module.
The cluster config file potentially contains the wsrep password, yet is world readable.
Hello there,
Would you be willing to update the stdlib requirement to >= 4.16.0 < 8.4.0
, the mysql requirement to 9.0.0 < 12.0.1
and the apt requirement to >= 2.3.0 < 8.5.0
?
Currently you need to login to the first node you create and run something like:
[email protected]$ galera_new_cluster # systemd
[email protected]$ service mariadb bootstrap # init.d
After puppet runs.
On successive nodes you need to login and manually restart mariadb to join the cluster after puppet runs.
It would be nice if this module could do that automatically.
It would of course need to know which node is the first or when there is no existing cluster...
This seems somewhat complex, but I think it is doable and should probably be optional, or in an additional class that you can apply if you want this functionality.
Err:5 http://repo.percona.com/apt xenial InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9334A25F8507EFA5
Get:9 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
Get:10 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Reading package lists... Done
W: GPG error: http://repo.percona.com/apt xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9334A25F8507EFA5
In https://github.com/edestecd/puppet-mariadb/blob/master/manifests/repo/yum.pp line 18
Yumrepo['mariadb'] -> Package<| |>
should read something like Yumrepo['mariadb'] -> Package<| tag == 'mariadb'|>
Or else you have now required yumrepo to run prior to ALL packages in the entire repo, this includes packages not in the same stage as the class calls to this module. Thus creating dependency cycles
tag your package calls appropriately then add a tag to this dependency to fix
here is an example of the cycle from my codebase
(Anchor[::dnsmasq::end] => Class[Dnsmasq] => Stage[pre] => Stage[main] => Class[Mariadb::Repo::Yum] => Yumrepo[mariadb] => Package[puppet-agent] => Class[Puppet_agent::Install] => Stage[pre])\nCycle graph written to /opt/puppetlabs/puppet/cache/state/graphs/cycles.dot.
Error: Failed to apply catalog: One or more resource dependency cycles detected in graph
The package that is now required for YumRepo[mariadb]
has no association what so ever with this module
When running tests over the roles of our control repository that use the mariadb
module I get the following error for an unknown variable that refer to params.pp, line 16:
$ pdk test unit
[โ] Preparing to run the unit tests.
[โ] Running unit tests.
Evaluated 8 tests in 5.733688574 seconds: 2 failures, 0 pending.
[โ] Cleaning up after running unit tests.
failed: rspec: ./spec/classes/role_server_customer_standalone_spec.rb:10: error during compilation: Evaluation Error: Unknown variable: '::service_provider'. at /home/peter.bittner/Development/repos/puppet-control/spec/fixtures/modules/mariadb/manifests/params.pp:16:19 on node peter-pc.comsolit.local
role::server::customer_standalone on ubuntu-16.04-x86_64 should compile into a catalogue without dependency cycles
Failure/Error:
end
it { is_expected.to compile.with_all_deps }
end
end
failed: rspec: ./spec/classes/role_server_customer_standalone_spec.rb:10: error during compilation: Evaluation Error: Unknown variable: '::service_provider'. at /home/peter.bittner/Development/repos/puppet-control/spec/fixtures/modules/mariadb/manifests/params.pp:16:19 on node peter-pc.comsolit.local
role::server::customer_standalone on debian-8-x86_64 should compile into a catalogue without dependency cycles
Failure/Error:
end
it { is_expected.to compile.with_all_deps }
end
end
Where is $service_provider
supposed to come from? What is it supposed to contain?
I guess I will simply set it to 'systemd'
for the RSpec example on the affected roles to make the tests pass. Do I do the right thing?
When installing on RHEL 8, the /etc/yum.repos.d/mariadb.repo file points to a non-existent path:
[mariadb]
name=MariaDB
baseurl=http://yum.mariadb.org/10.1/rhel8-amd64
enabled=1
gpgcheck=1
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
The 10.1 path no longer exists on yum.mariadb.org. The "oldest" path is 10.3.
Hello,
I would like to send the log error in an other directory that /var/lib/mysql. But i can't change the value
Regards
Nicolas
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.