From b382becab136d2e8fe359a745eb08e3bb7cd55d9 Mon Sep 17 00:00:00 2001 From: Damien Ciabrini Date: Tue, 12 May 2020 09:32:49 +0200 Subject: [PATCH] Stop using deprecated function mysql_password Function mysql_password is deprecated and has been removed in recent puppetlabs-mysql [1]. It has been replaced with the equivalent, namespaced function mysql::password. Use it instead. [1] https://github.com/puppetlabs/puppetlabs-mysql/commit/5a706276741e05088ae596141f28b03e1030a948 Change-Id: I405a986f78f865d89b54dffea17e84d75c068ed7 Closes-Bug: #1878153 --- manifests/profile/base/database/mysql.pp | 2 +- manifests/profile/base/database/mysql/user.pp | 2 +- manifests/profile/pacemaker/database/mysql.pp | 2 +- manifests/profile/pacemaker/database/mysql_bundle.pp | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/manifests/profile/base/database/mysql.pp b/manifests/profile/base/database/mysql.pp index a3112cd5e..683b26ba2 100644 --- a/manifests/profile/base/database/mysql.pp +++ b/manifests/profile/base/database/mysql.pp @@ -218,7 +218,7 @@ class tripleo::profile::base::database::mysql ( # as well by creating a resource appropriately. mysql_user { 'root@%': ensure => present, - password_hash => mysql_password(hiera('mysql::server::root_password')), + password_hash => mysql::password(hiera('mysql::server::root_password')), } } if ($mysql_auth_ed25519) { diff --git a/manifests/profile/base/database/mysql/user.pp b/manifests/profile/base/database/mysql/user.pp index 225b92148..e125568e0 100644 --- a/manifests/profile/base/database/mysql/user.pp +++ b/manifests/profile/base/database/mysql/user.pp @@ -52,7 +52,7 @@ define tripleo::profile::base::database::mysql::user ( ::openstacklib::db::mysql { $title : user => $user, - password_hash => mysql_password($password), + password_hash => mysql::password($password), dbname => $dbname, host => $host, charset => $charset, diff --git a/manifests/profile/pacemaker/database/mysql.pp b/manifests/profile/pacemaker/database/mysql.pp index f166e6c4b..c74c444b0 100644 --- a/manifests/profile/pacemaker/database/mysql.pp +++ b/manifests/profile/pacemaker/database/mysql.pp @@ -280,7 +280,7 @@ class tripleo::profile::pacemaker::database::mysql ( # the other members. We also make sure that the permissions are the minimum necessary mysql_user { 'clustercheck@localhost': ensure => 'present', - password_hash => mysql_password(hiera('mysql_clustercheck_password')), + password_hash => mysql::password(hiera('mysql_clustercheck_password')), require => Exec['galera-ready'], } mysql_grant { 'clustercheck@localhost/*.*': diff --git a/manifests/profile/pacemaker/database/mysql_bundle.pp b/manifests/profile/pacemaker/database/mysql_bundle.pp index 4e40f1bdd..e7ed4c1d9 100644 --- a/manifests/profile/pacemaker/database/mysql_bundle.pp +++ b/manifests/profile/pacemaker/database/mysql_bundle.pp @@ -510,14 +510,14 @@ MYSQL_HOST=localhost\n", # .my.cnf is re-generated by puppet mysql_user { 'root@localhost': ensure => present, - password_hash => mysql_password($mysql_root_password), + password_hash => mysql::password($mysql_root_password), } Mysql_user['root@localhost'] -> File['/root/.my.cnf'] # make sure to update all root users in the mysql DB mysql_user { 'root@%': ensure => present, - password_hash => mysql_password($mysql_root_password), + password_hash => mysql::password($mysql_root_password), } # declare the clustercheck user resource to configure @@ -529,7 +529,7 @@ MYSQL_HOST=localhost\n", } } else { $clustercheck_resource_config = { - password_hash => mysql_password($clustercheck_password), + password_hash => mysql::password($clustercheck_password), } } mysql_user { 'clustercheck@localhost':