Skip to content

Commit

Permalink
Merge pull request puppetlabs#1322 from carabasdaniel/rh-mysql
Browse files Browse the repository at this point in the history
[MODULES-10773] Fix for rh-mysql80
  • Loading branch information
david22swan authored and pmcmaw committed Sep 25, 2020
2 parents 253eb87 + c267951 commit a9c99e8
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
22 changes: 22 additions & 0 deletions examples/rh-mysql80-server.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
file {'/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo':
source => 'https://raw.githubusercontent.com/sclorg/centos-release-scl/master/centos-release-scl/RPM-GPG-KEY-CentOS-SIG-SCLo'
}

yumrepo { 'centos-sclo-rh':
ensure => present,
name => 'CentOS-SCLo-scl-rh',
enabled => true,
baseurl => 'http://mirror.centos.org/centos/7/sclo/$basearch/rh/',
mirrorlist => 'http://mirrorlist.centos.org?arch=$basearch&release=7&repo=sclo-rh',
descr => 'CentOS-7 - SCLo rh',
gpgcheck => true,
gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo',
}
class {'mysql::server':
package_name => 'rh-mysql80',
package_ensure => 'installed',
service_name => 'rh-mysql80-mysqld',
config_file => '/etc/my.cnf',
includedir => '/etc/my.cnf.d',
options => { mysqld => { log_error => '/var/log/mysqld.log', datadir => '/var/lib/mysql' } }
}
2 changes: 2 additions & 0 deletions lib/puppet/provider/mysql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class Puppet::Provider::Mysql < Puppet::Provider
'/opt/rh/rh-mysql56/root/usr/lib64',
'/opt/rh/rh-mysql57/root/usr/lib',
'/opt/rh/rh-mysql57/root/usr/lib64',
'/opt/rh/rh-mysql80/root/usr/lib',
'/opt/rh/rh-mysql80/root/usr/lib64',
'/opt/rh/rh-mariadb100/root/usr/lib',
'/opt/rh/rh-mariadb100/root/usr/lib64',
'/opt/rh/rh-mariadb101/root/usr/lib',
Expand Down
2 changes: 2 additions & 0 deletions lib/puppet/provider/mysql_datadir/mysql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
ENV['PATH'],
'/usr/libexec',
'/usr/share/mysql/scripts',
'/opt/rh/rh-mysql80/root/usr/bin',
'/opt/rh/rh-mysql80/root/usr/libexec',
'/opt/rh/rh-mysql57/root/usr/bin',
'/opt/rh/rh-mysql57/root/usr/libexec',
'/opt/rh/rh-mysql56/root/usr/bin',
Expand Down
6 changes: 6 additions & 0 deletions spec/acceptance/mysql_backup_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,12 @@ class { 'mysql::server::backup':

context 'with xtrabackup enabled and incremental backups disabled' do
context 'should work with no errors', if: ((os[:family] == 'debian' && os[:release].to_i >= 8) || (os[:family] == 'ubuntu' && os[:release] =~ %r{^16\.04|^18\.04}) || (os[:family] == 'redhat' && os[:release].to_i > 6)) do # rubocop:disable Metrics/LineLength
if (${::osfamily} == 'Debian') && (${::operatingsystemmajrelease}.to_i == 8) {
$source_url = "http://repo.percona.com/apt/percona-release_1.0-24.generic_all.deb"
} else {
$source_url = "http://repo.percona.com/apt/percona-release_latest.${facts['os']['distro']['codename']}_all.deb"
}

pp = <<-MANIFEST
class { 'mysql::server': root_password => 'password' }
mysql::db { [
Expand Down

0 comments on commit a9c99e8

Please sign in to comment.