Skip to main content

Hi Folks,

I’m having an backup issue with Kasten K10 and MySQL Blueprint from Kanister.
The job fails when it starts the kanister pod. After 1-2 seconds, this pod got killed and following error I get from Kasten K10.

Has someone from you guys an idea how I can fix this issue?

Regards,
Flavio

@flavio_bitstan , Thanks for posting the question here.

From the error I could see that the kanister-job pod did not transition to a running state.

If it errored out for some reason, You could find it in the kanister controller(kanister-svc pod in kasten-io namespace).

 

Are you using the same blueprint as specified in the example or do you have it customized based on the deployment ?

How did you deploy your mysql ? Is it using bitnami charts ?


Hello @jaiganeshjk 
Thanks for your response ;)

Yes I deployed a MySQL Cluster with Bitnami Charts → v9.4.1 and using the Blueprint from the example ;)

Here you can find the logs from kanister-svc pod.

Many thanks for your support.

Regards,
Flavio


Thanks @flavio_bitstan . Let me take a look at this


Thanks @flavio_bitstan . Let me take a look at this

Hi @jaiganeshjk
Did you had a chance to take a look into this issue?

Regards,
Flavio


Hi Flavio,

Sorry I got stuck in something else and this slipped my mind.

I will take a look at this today and definitely get back to you.

 

 


Thank you for your patience Flavio,

I could see that the dump command fails with below error from the logs that you have shared.

mysqldump: Got error: 2005: Unknown MySQL server host 'mysql' (-2) when trying to connect

It seems that the name resolution of the mysql service is problematic in your cluster.
The ActionSet gets the name of the service from the helm release name as per the blueprint. Logs says that it is mysql. 
So assuming your helm releaseName is mysql,

Can you confirm if there is a service with the name `mysql` ?

 

 


Hi @jaiganeshjk 

Thank you for your response ;)
Yes it is correct, my Helm releaseName is ‘mysql’ of my cluster but I don’t have a service called ‘mysql’.

Looks like that this Blueprint is not compatible with a MySQL Cluster.

 

Do you think it can be easily fixed? I’m not that familiar with Kanister Blueprints and the guys from Kanister told me in Slack, that their focus is in Kanister and not having a running solution in combination with Kasten K10.

Regards,
Flavio


Yes the example is designed for standalone mysql and not mysql replicated cluster.

That is just an example for the end users to understand the functionality and you can customise it based on your requirements.

In this case, It can be fixed easily.

All you need is to change the hostname in the dump and restore commands that has the hostname configured.

Currently it is pointing to this label value {{ index .Object.metadata.labels "app.kubernetes.io/instance" }} from the workload to get the service name.

Value of this label is `mysql` and hence the template is rendered and the dump command uses mysql as hostname.

You can actually edit the blueprint to add some other template which might render into `mysql-primary` or hardcode the hostname in the blueprint.

You will have to change templates after `-h` in the below places.

https://github.com/kanisterio/kanister/blob/master/examples/mysql/blueprint-v2/mysql-blueprint.yaml#L34

https://github.com/kanisterio/kanister/blob/master/examples/mysql/blueprint-v2/mysql-blueprint.yaml#L63

 

Please let me know if I answered your question.

 

 


i keep getting error template : labels not found ?

even thoug they do exist 

what am i misssing ? 


Job failed to be executed

 Failed snapshots for workload

 Failed to create backup Kanister phase

 ActionSet Failed

 could not render object reference {mysqlSecret}: Failed to render template: "labels" not found


im using offical blueprint :) 

 


@It-Prooffice 

How are you executing the blueprint ? Do you use hooks in the policy form from the UI or did you annotate the workload as mentioned in our documentation ?


Comment