@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:
@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
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 ?
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.
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.
Puppet agent
[root@stdb01 ~]# puppet agent -tv
Info: Using configured environment ‘production’
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Info: Caching catalog for stdb01.stratos.xfusioncorp.com
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
Mariadb services
[root@stdb01 ~]# 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
└─migrated-from-my.cnf-settings.conf
Active: active (running) since Mon 2021-11-01 07:46:04 UTC; 27s ago
Docs: man:mariadbd(8) systemd - MariaDB Knowledge Base
Main PID: 3494 (mariadbd)
Status: “Taking your SQL requests now…”
CGroup: /docker/1c93d0e52ed874a09cda03d216cd1507629548631253af5d93741e6e8cbec770/system.slice/mariadb.service
└─3494 /usr/sbin/mariadbd
Able to connect to kodekloud_db2 databse
[root@stdb01 ~]# 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.