Failed: Puppet Setup Database

@Ayman @kodekloud-support3 @mmumshad @Inderpreet
I have been failed on this task. I think recently there is some validation issue for puppet tasks. This has happened to my two consecutive puppet tasks.


Mariadb server successfully Installed, running and enabled:



Verifications from the db server:


Please assist to confirm where I went wrong.

Well it says class mysql_database is not defined. Did you use the correct class/file name ?

@wael.sadek the class mysql_database was properly defined.

@Inderpreet any feedback on this post?

@Duncan Could you share your code you used ?

@Inderpreet I have just shared in message the manifest file contents.

@Duncan Your code seems fine. We can mark this Success for you. Before that could you please let me know if you already got your today’s task in your bucket ?

@Inderpreet thanks for your checks. I have not yet received today’s task.

@Duncan Let me know once you have your today’s task in your bucket after that I will mark this one Success

Hello ,
my puppet set up database has been failed and I’m trying to understand why because I think that I did it very well. So , can you help out ?

@bagam_fleury Just saw your answer and found that your manifests failed and never passed, this is the final error I saw

Hello, bagam_fleury
I have noticed only one case because of the task got failed. You need to use comma(,) after all resource parameters and attributes definitions.
In the service block, after ensure you didn’t specify comma.
You can get more information about puppet style guide.

Thanks for your reply

@Inderpreet I havent received a task for the last ~4 days. Can you assist to mark this as SUCCESS in the meantime?

@Inderpreet I have now received a new task. Please assist to mark this task as SUCCESS.

@Inderpreet please assist to mark this task as SUCCESS as you have already verified the shared manifest file. Cc @rahul456. Thank you.

hi @Duncan, this is marked success for you.

1 Like

thanks you @rahul456 for your action!!!

Hi @Duncan/@Inderpreet/@Tej-Singh-Rana,

My task is fail with this error “- package ‘mariadb-server’ is not installed on DB Server”, however my verification shows mariadb is run and managed to connect to db.

Pls advise, if it’s a bug or I did something wrong.

  1. Puppet agent

[[email protected] ~]# puppet agent -tv
Info: Using configured environment ‘production’
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Info: Caching catalog for
Info: Applying configuration version ‘1635752783’
Notice: /Stage[main]/Mysql_database/Exec[run_my_script]/returns: executed successfully
Notice: /Stage[main]/Mysql_database/Service[mysql]/ensure: ensure changed ‘stopped’ to ‘running’ (corrective)
Info: /Stage[main]/Mysql_database/Service[mysql]: Unscheduling refresh on Service[mysql]
Notice: /Stage[main]/Mysql_database/Mysql::Db[kodekloud_db2]/Mysql_database[kodekloud_db2]/charset: charset changed ‘utf8mb3’ to ‘utf8’ (corrective)
Notice: /Stage[main]/Mysql_database/Mysql::Db[kodekloud_db2]/Mysql_database[kodekloud_db2]/collate: collate changed ‘utf8mb3_general_ci’ to ‘utf8_general_ci’ (corrective)
Notice: Applied catalog in 2.00 seconds

  1. Mariadb services

[[email protected] ~]# systemctl status mariadb
● mariadb.service - MariaDB 10.6.4 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/mariadb.service.d
Active: active (running) since Mon 2021-11-01 07:46:04 UTC; 27s ago
Docs: man:mariadbd(8)
Main PID: 3494 (mariadbd)
Status: “Taking your SQL requests now…”
CGroup: /docker/1c93d0e52ed874a09cda03d216cd1507629548631253af5d93741e6e8cbec770/system.slice/mariadb.service
└─3494 /usr/sbin/mariadbd

  1. Able to connect to kodekloud_db2 databse

[[email protected] ~]# mysql -u kodekloud_tim -p kodekloud_db2 -h localhost
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 52
Server version: 10.6.4-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

MariaDB [kodekloud_db2]>