VeeamON 2024 - Use Code "COMMUNITY10" for 10% Off!
Hi Geoff, in the kasten policy I have selected the minIO profile for the Kanister Actions but when I execute the policy I get the error above.I think that kasten is trying to export the kanister artifact both to minIO and VBR because, as written above, if I delete the PostgreSQL blueprint or equally if I don't delete it but I remove the export to VBR everything works fine.
Many thanks for replying Geoff, I’m currently using the CSI driver, but I don’t know why kasten is trying to export also the kanister artifact to the veeam backup repository
Hello @jaiganeshjk ,All is clear, I have now another question. I’ve created a new policy on Kasten without the prehook and posthook (for the mongodb blueprint)but I have created the blueprint and I have annotated the deployment with it, I have run the policy and this time the {{ toJson .Profile }} is correctly rendered but I’m facing an error with Kopia: cause:cause:cause:cause:cause:message: Cannot get tenantID from configfields:- name: storageTypevalue: ADfile: kasten.io/k10/kio/storage/azuredisk.go:37function: kasten.io/k10/kio/storage.newAzureDisklinenumber: 37message: Failed to initialize storage providerfile: kasten.io/k10/kio/exec/phases/phase/data_manager.go:81function: kasten.io/k10/kio/exec/phases/phase.(*NativeDataManager).DataManagerSetuplinenumber: 81message: Could not get storage provider. Validate that Storage providercredentials are configured correctlyI have executed “kopia repository connect s3” cli command specifying the correct endpoint, AWS access key and AWS secr
Hi jaiganeshjk, Ok, I understood. Maybe is there a way to execute blueprint within a kasten policy?I am trying to hardcode the Deployment name and namespace in the blueprint manifest so the kanister operator has not to resolve them, but in this case the kanister job pod is created in the correct namespace but it goes in error and I if I read pod logs (before it dies) I get the following error: time="2022-02-15T10:26:37.638419129Z" level=info msg="Kando failed to execute" File=cmd/kando/main.go Function=main.main Line=22 error="Unsupported Location type: " hostname=kanister-job-htfzr By reading this I think that the blueprint is correctly rendered but there is a problem with " --profile {{ toJson .Profile }}" in kando command.The Profile has to be deployed with kanctl and not with Kasten UI creation Location?
Hi jaiganeshjk, Actually I have put the blueprint as Pre Snapshot hook under the Advanced settings in the K10 UI policy form and I understood that in this case the object referenced is Namespace and not Deployment (Here's why {{ index .Object.metadata.name }} is equal to Namespace name and not to Deployment name). How I can target the Deployment through Advanced settings in the K10 UI policy form and use the {{ .Deployment.Namespace }}and {{ .Deployment.Name }} templates?
So right. With the updated blueprint, the templates are rendered correctly. But the secret with the name `mongo-logical` is not available in the namespace. Here the name under mongosecret denotes the name of the secret and it is derived from deployments name('{{ index .Object.metadata.name }}'). mongosecret: kind: Secret name: '{{ index .Object.metadata.name }}' namespace: '{{ .Namespace.Name }}' I assume your deployment name is `mongodb-logical` but your secret name is something else. You will have to construct the blueprint in such a way that the rendered value gives the name of the secret. The deployment name in my case is mongo-logical-mongodb and the namespace is mongodb-logical (these values are taken from mongodb’s bitnami chart). i’m just wondering why '{{ index .Object.metadata.name }}' = {{ .Deployment.Name }}
Hi Jaiganesh,I edited the blueprint YAML as you said:apiVersion: cr.kanister.io/v1alpha1kind: Blueprintmetadata: name: mongodb-blueprintactions: backup: outputArtifacts: mongoBackup: # Capture the kopia snapshot information for subsequent actions # The information includes the kopia snapshot ID which is essential for restore and delete to succeed # `kopiaOutput` is the name provided to kando using `--output-name` flag kopiaSnapshot: "{{ .Phases.takeConsistentBackup.Output.kopiaOutput }}" phases: - func: KubeTask name: takeConsistentBackup objects: mongosecret: kind: Secret name: '{{ index .Object.metadata.name }}' namespace: '{{ .Namespace.Name }}' args: namespace: "{{ .Deployment.Namespace }}" image: ghcr.io/kanisterio/mongodb:0.72.0 command: - bash - -o - errexit - -o - pipefail - -c - | host={{ i
If you can share the blueprint that you are using (redact any sensitive values if you are hard coding them in your blueprint), I will take a look at it. Also mention few details about your mongoDB installation(like installation source - If you are using any particular helm chart) Hi Jaiganesh, many thanks for replyingI have insert the wrong snippet of code, at the beginning i mistakenly wrote {{ .Deployment.metadata.Name }} and {{ .Deployment.metadata.Namespace }}in the blueprint resource but I have already tried to insert {{ .Deployment.Name }} and {{ .Deployment.Namespace }}but i get the following errorcause: cause: cause: fields: - name: message value: 'could not render object reference {mongosecret}: template: config:1:14: executing "config" at <.Deployment.Name>: nil pointer evaluating *param.DeploymentParams.Name'In the Template Parameters documentation (https://docs.kanister.io/templates.html?highlight=deploymen
The only thing I can see is that it can’t get at the Mongodb secret so it would not be able to run the freeze dump scripts. That is just a quick guess though. Let’s see what Kasten support say. I’ve put the MongoDB secret hardcoded in the blueprint manifest and when I ran again the policy I got aNIL pointer error in resolving GO template when we define host host='{{ .Deployment.Name }}-0.{{ .Deployment.Name }}-headless.{{ .Deployment.Namespace }}.svc.cluster.local'it seems that the kanister operator doesn’t resolve correctly the GO template
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.