Skip to content

Commit df91a8b

Browse files
committed
Remove support for EOL platforms Ubuntu 14.04 and Debian 8
1 parent 1fb7245 commit df91a8b

11 files changed

+44
-135
lines changed

.nodeset.yml

-20
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,3 @@ sets:
99
nodes:
1010
"main.foo.vm":
1111
prefab: 'centos-64-x64'
12-
'fedora-18-x64':
13-
nodes:
14-
"main.foo.vm":
15-
prefab: 'fedora-18-x64'
16-
'debian-607-x64':
17-
nodes:
18-
"main.foo.vm":
19-
prefab: 'debian-607-x64'
20-
'debian-70rc1-x64':
21-
nodes:
22-
"main.foo.vm":
23-
prefab: 'debian-70rc1-x64'
24-
'ubuntu-server-10044-x64':
25-
nodes:
26-
"main.foo.vm":
27-
prefab: 'ubuntu-server-10044-x64'
28-
'ubuntu-server-12042-x64':
29-
nodes:
30-
"main.foo.vm":
31-
prefab: 'ubuntu-server-12042-x64'

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ This example shows how to install the MariaDB client and all of the bindings at
367367
Specify the version of the package you want with the `package_ensure` parameter.
368368

369369
```puppet
370-
class {'::mysql::client':
370+
class { 'mysql::client':
371371
package_name => 'mariadb-client',
372372
package_ensure => '1:10.3.21+maria~xenial',
373373
bindings_enable => true,
@@ -376,7 +376,7 @@ class {'::mysql::client':
376376
# Dependency management. Only use that part if you are installing the repository as shown in the Preliminary step of this example.
377377
Apt::Source['mariadb'] ~>
378378
Class['apt::update'] ->
379-
Class['::mysql::client']
379+
Class['mysql::client']
380380
```
381381

382382
### Install MySQL Community server on CentOS
@@ -391,7 +391,7 @@ You can install MySQL Community Server on CentOS using the mysql module and Hier
391391
In Puppet:
392392

393393
```puppet
394-
include ::mysql::server
394+
include mysql::server
395395
396396
create_resources(yumrepo, hiera('yumrepo', {}))
397397
@@ -602,11 +602,11 @@ When the `/root/.mylogin.cnf` exists the environment variable `MYSQL_TEST_LOGIN_
602602
This is required if `create_root_user` and `create_root_login_file` are true. If `root_password` is 'UNSET', then `create_root_user` and `create_root_login_file` are assumed to be false --- that is, the MySQL root user and `/root/.mylogin.cnf` are not created.
603603

604604
```puppet
605-
class { '::mysql::server':
605+
class { 'mysql::server':
606606
root_password => 'password',
607607
create_root_my_cnf => false,
608608
create_root_login_file => true,
609-
login_file => "puppet:///modules/${module_name}/mylogin.cnf",
609+
login_file => 'puppet:///modules/mysql/mylogin.cnf',
610610
}
611611
```
612612

manifests/backup/mysqlbackup.pp

+1-3
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,7 @@
7373
}
7474

7575
if $install_cron {
76-
if $::osfamily == 'RedHat' and $::operatingsystemmajrelease == '5' {
77-
ensure_packages('crontabs')
78-
} elsif $::osfamily == 'RedHat' {
76+
if $::osfamily == 'RedHat' {
7977
ensure_packages('cronie')
8078
} elsif $::osfamily != 'FreeBSD' {
8179
ensure_packages('cron')

manifests/backup/mysqldump.pp

+1-3
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@
6767
}
6868

6969
if $install_cron {
70-
if $::osfamily == 'RedHat' and $::operatingsystemmajrelease == '5' {
71-
ensure_packages('crontabs')
72-
} elsif $::osfamily == 'RedHat' {
70+
if $::osfamily == 'RedHat' {
7371
ensure_packages('cronie')
7472
} elsif $::osfamily != 'FreeBSD' {
7573
ensure_packages('cron')

manifests/backup/xtrabackup.pp

+1-3
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@
5959
}
6060

6161
if $install_cron {
62-
if $::osfamily == 'RedHat' and $::operatingsystemmajrelease == '5' {
63-
ensure_packages('crontabs')
64-
} elsif $::osfamily == 'RedHat' {
62+
if $::osfamily == 'RedHat' {
6563
ensure_packages('cronie')
6664
} elsif $::osfamily != 'FreeBSD' {
6765
ensure_packages('cron')

manifests/params.pp

+25-72
Original file line numberDiff line numberDiff line change
@@ -123,28 +123,24 @@
123123
'Suse': {
124124
case $::operatingsystem {
125125
'OpenSuSE': {
126-
if versioncmp( $::operatingsystemmajrelease, '12' ) >= 0 {
127-
$client_package_name = 'mariadb-client'
128-
$server_package_name = 'mariadb'
129-
# First service start fails if this is set. Runs fine without
130-
# it being set, in any case. Leaving it as-is for the mysql.
131-
$basedir = undef
132-
} else {
133-
$client_package_name = 'mysql-community-server-client'
134-
$server_package_name = 'mysql-community-server'
135-
$basedir = '/usr'
136-
}
126+
$socket = '/var/run/mysql/mysql.sock'
127+
$log_error = '/var/log/mysql/mysqld.log'
128+
$pidfile = '/var/run/mysql/mysqld.pid'
129+
$ruby_package_name = 'rubygem-mysql'
130+
$client_package_name = 'mariadb-client'
131+
$server_package_name = 'mariadb'
132+
# First service start fails if this is set. Runs fine without
133+
# it being set, in any case. Leaving it as-is for the mysql.
134+
$basedir = undef
137135
}
138136
'SLES','SLED': {
139-
if versioncmp($::operatingsystemrelease, '12') >= 0 {
140-
$client_package_name = 'mariadb-client'
141-
$server_package_name = 'mariadb'
142-
$basedir = undef
143-
} else {
144-
$client_package_name = 'mysql-client'
145-
$server_package_name = 'mysql'
146-
$basedir = '/usr'
147-
}
137+
$socket = '/run/mysql/mysql.sock'
138+
$log_error = '/var/log/mysqld.log'
139+
$pidfile = '/var/lib/mysql/mysqld.pid'
140+
$ruby_package_name = 'ruby-mysql'
141+
$client_package_name = 'mariadb-client'
142+
$server_package_name = 'mariadb'
143+
$basedir = undef
148144
}
149145
default: {
150146
fail("Unsupported platform: puppetlabs-${module_name} currently doesn\'t support ${::operatingsystem}.")
@@ -153,31 +149,13 @@
153149
$config_file = '/etc/my.cnf'
154150
$includedir = '/etc/my.cnf.d'
155151
$datadir = '/var/lib/mysql'
156-
$log_error = $::operatingsystem ? {
157-
/OpenSuSE/ => '/var/log/mysql/mysqld.log',
158-
/(SLES|SLED)/ => '/var/log/mysqld.log',
159-
}
160-
$pidfile = $::operatingsystem ? {
161-
/OpenSuSE/ => '/var/run/mysql/mysqld.pid',
162-
/(SLES|SLED)/ => '/var/lib/mysql/mysqld.pid',
163-
}
164152
$root_group = 'root'
165153
$mysql_group = 'mysql'
166154
$mycnf_owner = undef
167155
$mycnf_group = undef
168156
$server_service_name = 'mysql'
169157
$xtrabackup_package_name_override = 'xtrabackup'
170158

171-
if $::operatingsystem =~ /(SLES|SLED)/ {
172-
if versioncmp( $::operatingsystemmajrelease, '12' ) >= 0 {
173-
$socket = '/run/mysql/mysql.sock'
174-
} else {
175-
$socket = '/var/lib/mysql/mysql.sock'
176-
}
177-
} else {
178-
$socket = '/var/run/mysql/mysql.sock'
179-
}
180-
181159
$ssl_ca = '/etc/mysql/cacert.pem'
182160
$ssl_cert = '/etc/mysql/server-cert.pem'
183161
$ssl_key = '/etc/mysql/server-key.pem'
@@ -188,34 +166,17 @@
188166
$perl_package_name = 'perl-DBD-mysql'
189167
$php_package_name = 'apache2-mod_php53'
190168
$python_package_name = 'python-mysql'
191-
$ruby_package_name = $::operatingsystem ? {
192-
/OpenSuSE/ => 'rubygem-mysql',
193-
/(SLES|SLED)/ => 'ruby-mysql',
194-
}
195169
$client_dev_package_name = 'libmysqlclient-devel'
196170
$daemon_dev_package_name = 'mysql-devel'
197171
}
198172

199173
'Debian': {
200-
if $::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9') >= 0 {
201-
$provider = 'mariadb'
202-
} else {
203-
$provider = 'mysql'
204-
}
205-
if $provider == 'mariadb' {
206-
$client_package_name = 'mariadb-client'
207-
$server_package_name = 'mariadb-server'
208-
$server_service_name = 'mariadb'
209-
$client_dev_package_name = 'libmariadbclient-dev'
210-
$daemon_dev_package_name = 'libmariadbd-dev'
211-
} else {
212-
$client_package_name = 'mysql-client'
213-
$server_package_name = 'mysql-server'
214-
$server_service_name = 'mysql'
215-
$client_dev_package_name = 'libmysqlclient-dev'
216-
$daemon_dev_package_name = 'libmysqld-dev'
217-
}
218-
174+
$provider = 'mariadb'
175+
$client_package_name = 'mariadb-client'
176+
$server_package_name = 'mariadb-server'
177+
$server_service_name = 'mariadb'
178+
$client_dev_package_name = 'libmariadbclient-dev'
179+
$daemon_dev_package_name = 'libmariadbd-dev'
219180
$basedir = '/usr'
220181
$config_file = '/etc/mysql/my.cnf'
221182
$includedir = '/etc/mysql/conf.d'
@@ -242,7 +203,7 @@
242203
}
243204
$perl_package_name = 'libdbd-mysql-perl'
244205
if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '16.04') >= 0) or
245-
($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9') >= 0) {
206+
($::operatingsystem == 'Debian') {
246207
$php_package_name = 'php-mysql'
247208
} else {
248209
$php_package_name = 'php5-mysql'
@@ -260,10 +221,8 @@
260221
}
261222

262223
$ruby_package_name = $facts['os']['release']['major'] ? {
263-
'8' => 'ruby-mysql', # jessie
264224
'9' => 'ruby-mysql2', # stretch
265225
'10' => 'ruby-mysql2', # buster
266-
'14.04' => 'ruby-mysql', # trusty
267226
'16.04' => 'ruby-mysql', # xenial
268227
'18.04' => 'ruby-mysql2', # bionic
269228
'20.04' => 'ruby-mysql2', # focal
@@ -487,13 +446,7 @@
487446

488447
case $::operatingsystem {
489448
'Ubuntu': {
490-
# lint:ignore:only_variable_string
491-
if versioncmp("${::operatingsystemmajrelease}", '14.10') > 0 {
492-
# lint:endignore
493-
$server_service_provider = 'systemd'
494-
} else {
495-
$server_service_provider = 'upstart'
496-
}
449+
$server_service_provider = 'systemd'
497450
}
498451
'Alpine': {
499452
$server_service_provider = 'rc-service'
@@ -579,6 +532,6 @@
579532

580533
## Additional graceful failures
581534
if $::osfamily == 'RedHat' and $::operatingsystemmajrelease == '4' and $::operatingsystem != 'Amazon' {
582-
fail("Unsupported platform: puppetlabs-${module_name} only supports RedHat 5.0 and beyond.")
535+
fail("Unsupported platform: puppetlabs-${module_name} only supports RedHat 6.0 and beyond.")
583536
}
584537
}

metadata.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454
{
5555
"operatingsystem": "Ubuntu",
5656
"operatingsystemrelease": [
57-
"14.04",
5857
"16.04",
59-
"18.04"
58+
"18.04",
59+
"20.04"
6060
]
6161
}
6262
],

provision.yaml

-7
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,16 @@ vagrant:
1111
travis_deb:
1212
provisioner: docker
1313
images:
14-
- litmusimage/debian:8
1514
- litmusimage/debian:9
1615
- litmusimage/debian:10
1716
travis_ub_5:
1817
provisioner: docker
1918
images:
20-
- litmusimage/ubuntu:14.04
2119
- litmusimage/ubuntu:16.04
2220
- litmusimage/ubuntu:18.04
2321
travis_ub_6:
2422
provisioner: docker
2523
images:
26-
- litmusimage/ubuntu:14.04
2724
- litmusimage/ubuntu:16.04
2825
- litmusimage/ubuntu:18.04
2926
- litmusimage/ubuntu:20.04
@@ -51,10 +48,8 @@ release_checks_5:
5148
- oracle-7-x86_64
5249
- scientific-6-x86_64
5350
- scientific-7-x86_64
54-
- debian-8-x86_64
5551
- debian-9-x86_64
5652
- debian-10-x86_64
57-
- ubuntu-1404-x86_64
5853
- ubuntu-1604-x86_64
5954
- ubuntu-1804-x86_64
6055
release_checks_6:
@@ -71,10 +66,8 @@ release_checks_6:
7166
- oracle-7-x86_64
7267
- scientific-6-x86_64
7368
- scientific-7-x86_64
74-
- debian-8-x86_64
7569
- debian-9-x86_64
7670
- debian-10-x86_64
77-
- ubuntu-1404-x86_64
7871
- ubuntu-1604-x86_64
7972
- ubuntu-1804-x86_64
8073
- ubuntu-2004-x86_64

spec/acceptance/mysql_backup_spec.rb

+7-18
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class { 'mysql::server::backup':
135135
end
136136

137137
context 'with xtrabackup enabled' do
138-
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 Layout/LineLength
138+
context 'should work with no errors', if: ((os[:family] == 'debian') || (os[:family] == 'ubuntu' && os[:release] =~ %r{^16\.04|^18\.04}) || (os[:family] == 'redhat' && os[:release].to_i > 6)) do
139139
pp = <<-MANIFEST
140140
class { 'mysql::server': root_password => 'password' }
141141
mysql::db { [
@@ -214,7 +214,7 @@ class { 'mysql::server::backup':
214214
end
215215
end
216216

217-
describe 'xtrabackup.sh', if: Gem::Version.new(mysql_version) < Gem::Version.new('5.7.0') && ((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 Layout/LineLength
217+
describe 'xtrabackup.sh', if: Gem::Version.new(mysql_version) < Gem::Version.new('5.7.0') && ((os[:family] == 'debian' && os[:release].to_i >= 9) || (os[:family] == 'ubuntu' && os[:release] =~ %r{^16\.04|^18\.04}) || (os[:family] == 'redhat' && os[:release].to_i > 6)) do # rubocop:disable Layout/LineLength
218218
before(:all) do
219219
pre_run
220220
end
@@ -263,7 +263,7 @@ class { 'mysql::server::backup':
263263
end
264264

265265
context 'with xtrabackup enabled and incremental backups disabled' do
266-
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 Layout/LineLength
266+
context 'should work with no errors', if: ((os[:family] == 'debian' && os[:release].to_i >= 9) || (os[:family] == 'ubuntu' && os[:release] =~ %r{^16\.04|^18\.04}) || (os[:family] == 'redhat' && os[:release].to_i > 6)) do # rubocop:disable Layout/LineLength
267267
pp = <<-MANIFEST
268268
class { 'mysql::server': root_password => 'password' }
269269
mysql::db { [
@@ -275,11 +275,7 @@ class { 'mysql::server': root_password => 'password' }
275275
}
276276
case $facts['os']['family'] {
277277
/Debian/: {
278-
if versioncmp($::operatingsystemmajrelease, '8') >= 0 {
279-
$source_url = "http://repo.percona.com/apt/percona-release_1.0-22.generic_all.deb"
280-
} else {
281-
$source_url = "http://repo.percona.com/apt/percona-release_latest.${facts['os']['distro']['codename']}_all.deb"
282-
}
278+
$source_url = "http://repo.percona.com/apt/percona-release_1.0-22.generic_all.deb"
283279
284280
file { '/tmp/percona-release_latest.deb':
285281
ensure => present,
@@ -299,15 +295,8 @@ class { 'mysql::server': root_password => 'password' }
299295
}
300296
}
301297
/RedHat/: {
302-
# RHEL/CentOS 5 is no longer supported by Percona, but older versions
303-
# of the repository are still available.
304-
if versioncmp($::operatingsystemmajrelease, '6') >= 0 {
305-
$percona_url = 'http://repo.percona.com/yum/percona-release-latest.noarch.rpm'
306-
$epel_url = "https://download.fedoraproject.org/pub/epel/epel-release-latest-${facts['os']['release']['major']}.noarch.rpm"
307-
} else {
308-
$percona_url = 'http://repo.percona.com/yum/release/5/os/noarch/percona-release-0.1-3.noarch.rpm'
309-
$epel_url = 'https://archives.fedoraproject.org/pub/archive/epel/epel-release-latest-5.noarch.rpm'
310-
}
298+
$percona_url = 'http://repo.percona.com/yum/percona-release-latest.noarch.rpm'
299+
$epel_url = "https://download.fedoraproject.org/pub/epel/epel-release-latest-${facts['os']['release']['major']}.noarch.rpm"
311300
ensure_packages('percona-release',{
312301
ensure => present,
313302
provider => 'rpm',
@@ -342,7 +331,7 @@ class { 'mysql::server::backup':
342331
end
343332
end
344333

345-
describe 'xtrabackup.sh', if: Gem::Version.new(mysql_version) < Gem::Version.new('5.7.0') && ((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 Layout/LineLength
334+
describe 'xtrabackup.sh', if: Gem::Version.new(mysql_version) < Gem::Version.new('5.7.0') && ((os[:family] == 'debian' && os[:release].to_i >= 9) || (os[:family] == 'ubuntu' && os[:release] =~ %r{^16\.04|^18\.04}) || (os[:family] == 'redhat' && os[:release].to_i > 6)) do # rubocop:disable Layout/LineLength
346335
before(:all) do
347336
pre_run
348337
end

spec/acceptance/mysql_mariadb_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require 'spec_helper_acceptance'
44

5-
describe 'mysql server class', if: ((os[:family] == 'debian' && os[:release].to_i > 8) || (os[:family] == 'redhat' && os[:release].to_i > 6)) do
5+
describe 'mysql server class', if: ((os[:family] == 'debian') || (os[:family] == 'redhat' && os[:release].to_i > 6)) do
66
describe 'mariadb' do
77
let(:pp) do
88
<<-MANIFEST

spec/acceptance/types/mysql_login_path_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
mysql_version = '5.7'
1313
end
1414

15-
describe 'mysql_login_path', unless: ("#{os[:family]}-#{os[:release].to_i}" =~ %r{redhat\-5|suse}) do
15+
describe 'mysql_login_path', unless: "#{os[:family]}-#{os[:release].to_i}".include?('suse') do
1616
before(:all) do
1717
run_shell("rm -rf #{support_bin_dir}")
1818
bolt_upload_file('spec/support/mysql_login_path', support_bin_dir)

0 commit comments

Comments
 (0)