puppetlabs/puppetlabs-mysql

Unable to locate package mariadb-server & mariadb-client on Ubuntu 22.04

saini01 opened this issue · 2 comments

Describe the Bug

After recent Upgrade of a host from Ubuntu 18.04 ->20.04 ->22.04 this module is trying to install mariadb server packages. So Puppet agent keeps failing with following errors:

Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install mariadb-server' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package mariadb-server
Error: /Stage[main]/Mysql::Server::Install/Package[mysql-server]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install mariadb-server' returned 100: Reading package lists...

Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install mariadb-client' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package mariadb-client
Error: /Stage[main]/Mysql::Client::Install/Package[mysql_client]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install mariadb-client' returned 100: Reading package lists...

Expected Behavior

It should install mysql-server-8.0 packages instead.

Steps to Reproduce

Test it on Ubuntu 22.04.1

Environment

Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy

sudo mysql --version
mysql  Ver 8.0.31-0ubuntu0.22.04.1 for Linux on x86_64 ((Ubuntu))

Module version: 13.0.1

I realized that sources.list file was messed up and that is why mariadb packages could not be found. Nonetheless I don't understand why you switched from mysql to mariadb on Ubuntu 22. It deleted existing mysql packages and Puppet ended up creating new databases! Thank god it was only a test host and I was able to restore all databases from daily backup. So I am closing this issue.

Thank you for following up on this one @saini01 👍