Question

Kanister Blueprint for MySQL fails


Userlevel 4

Hi all,

I’m having an backup issue with Kasten K10 when use mysql blueprint from kanister. 

the error from backupactions as below:

my blueprint contens like this:

my mysql is deployed by deployment, the status looks normal.

 

Can some one help me to fix the issue?


5 comments

Userlevel 4
Badge +2

Hello @meijianwei,

Thank you for using K10 community!

There are a few Blueprint templates at K10's official documentation that are supported, and can be used as an example for testing together with the supported helm charts. 

The blueprints for logical backups can be found here:

https://docs.kasten.io/latest/kanister/testing.html#logical-backups

MySQL:

https://docs.kasten.io/latest/kanister/mysql/install.html

MySQL Openshift:

https://docs.kasten.io/latest/kanister/mysql/install_logical_os.html

 

Have checked K10 MySQL Blueprints and followed the example in the page above and it is working.

I am not sure from the outputs you've sent, if you are using the blueprint from K10 docs and bitnami helm chart (https://charts.bitnami.com/bitnami) that this MySQL Blueprint supports, If you are using a different helm chart or blueprint, you might have to adapt it to the specific parameters, secrets and so on.

If you want to troubleshoot what is happening during the backup with the blueprint, please monitor the kanister logs while running the backup, it might point you to the issue:

kubectl get pods --no-headers -n kasten-io | grep kanister | awk '{print $1}' | xargs kubectl logs -n kasten-io -f

 

FRubens

Userlevel 4

 @FRubens Thanks for your reply.

Yes, I use the blueprint from k10 docs, but have not used bitnami helm chart to deploy mysql. I use k8s deployment to deploy application mysql and made some update to the blueprint. such as, change “{{ .DeploymentConfig.Namespace }}” to "{{ .Deployment.Namespace }}", change “{{ .DeploymentConfig.Name }}” to {{ index .Object.metadata.labels "app.kubernetes.io/instance" }}, and created mysqlsecret separately named mysql-password. those modifications are mentioned in the screenshot above.

Actually, from the logs kanister-svc-6b78b5df8d-zmrbb, I can see the the command mysqldump execute success and prompt the warning info shown as below screenshot. Does this mean that my blueprint is no problem?

but then the pod kanister-job-cf5qc failed,and it is not clear from the log what caused it fail?

Could you help me fix this problem?

Userlevel 4
Badge +2

Hello @meijianwei,

I would recommend checking the repository of mysql-sidecar image in your blueprint, it shows that you are using registry.example.com:8443 that is not a real repository, you might get it from ghcr.io as in the original Blueprint or if you have a private repo please replace registry.example.com with your image repository and try again:
 

 

Userlevel 4

Hi @FRubens, 

registry.example.com:8443  is my private repo.

Userlevel 4
Badge +2

@meijianwei ,Thanks for clarifying.

I would recommend trying to follow the blueprint steps manually and check if there are any issues.

Bash into the mysql pod/container and run the same command of the blueprint in the phase "dumptostore", and check the output, it might help to find if there is any issues with the commands.

Try to follow the steps and see if there is anything wrong, since you are not using bitnami chart where this Blueprint was designed and tested, I am not sure what else you must change or even add to make the blueprint work for your MySQL installation, you might need to find out if there is anything missing, or even write your own blueprint.

On K10 side, kanister logs would help you to find out what is happening, you can keep monitoring kanister logs while testing the blueprint, you can possibly monitor the pods in the MySQL namespace and try to get the logs from the kanister pod when it is created since it is running the BP commands, it might be for a short time, but if you manage it can help.

Comment