From ea3438a025e1d4c9d1f3cfb4339dbeea19c22bca Mon Sep 17 00:00:00 2001 From: Roland Synnestvedt Date: Tue, 18 May 2021 11:34:06 -0700 Subject: [PATCH] Update xtrabackup package name for Ubuntu 20.04 Percona no longer includes the generic package name 'percona-xtrabackup' in their Ubuntu 20.04 focal fossa release of percona-xtrabackup. The package name 'percona-xtrabackup-24' must be used instead. This can be verified in the package names included by percona-release, listed at https://repo.percona.com/apt/dists/focal/main/binary-amd64/Packages --- manifests/params.pp | 1 + spec/classes/mysql_backup_xtrabackup_spec.rb | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index 5d5247a11..35ef37f95 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -248,6 +248,7 @@ $php_package_name = 'php5-mysql' } if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '16.04') < 0) or + ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '20.04') >= 0) or ($::operatingsystem == 'Debian') { $xtrabackup_package_name_override = 'percona-xtrabackup-24' } diff --git a/spec/classes/mysql_backup_xtrabackup_spec.rb b/spec/classes/mysql_backup_xtrabackup_spec.rb index 6caf49a2f..15ebab89d 100644 --- a/spec/classes/mysql_backup_xtrabackup_spec.rb +++ b/spec/classes/mysql_backup_xtrabackup_spec.rb @@ -40,7 +40,9 @@ class { 'mysql::server': } elsif facts[:operatingsystem] == 'Debian' 'percona-xtrabackup-24' elsif facts[:operatingsystem] == 'Ubuntu' - if Puppet::Util::Package.versioncmp(facts[:operatingsystemmajrelease], '16') >= 0 + if Puppet::Util::Package.versioncmp(facts[:operatingsystemmajrelease], '20') >= 0 + 'percona-xtrabackup-24' + elsif Puppet::Util::Package.versioncmp(facts[:operatingsystemmajrelease], '16') >= 0 'percona-xtrabackup' else 'percona-xtrabackup-24' @@ -125,7 +127,9 @@ class { 'mysql::server': } elsif facts[:operatingsystem] == 'Debian' 'percona-xtrabackup-24' elsif facts[:operatingsystem] == 'Ubuntu' - if Puppet::Util::Package.versioncmp(facts[:operatingsystemmajrelease], '16') >= 0 + if Puppet::Util::Package.versioncmp(facts[:operatingsystemmajrelease], '20') >= 0 + 'percona-xtrabackup-24' + elsif Puppet::Util::Package.versioncmp(facts[:operatingsystemmajrelease], '16') >= 0 'percona-xtrabackup' else 'percona-xtrabackup-24'