Question

Kanister Unsupported Location Type

  • 9 October 2023
  • 2 comments
  • 113 views

Userlevel 1

Hi Guys,

 

I have configured my cluster with Kasten k10 to take the backup of remote mysql server which is managed by oracle cloud.

  1. I created the Location Profile as Oracle Cloud Bucket which is object store
  2. Then Created Blue Print with extending support of Kanistar
  3. Created Policy and Run the backup its getting error with “Unsupported Localtion Type”

Profile:

apiVersion: config.kio.kasten.io/v1alpha1
kind: Profile
metadata:
  annotations:
  name: k10-dr-test-storage
  namespace: kasten-io
spec:
  location:
    credential:
      secret:
        apiVersion: v1
        kind: secret
        name: k10secret-ghtjh
        namespace: kasten-io
      secretType: AwsAccessKey
    objectStore:
      endpoint: ax28.compat.objectstorage.me-jeddah-1.oraclecloud.com
      name: k10-dr-test
      objectStoreType: S3
      path: k10/2a458b1e-5a94-4ab7-a6fe-b413b6fa73f6/migration
      pathType: Directory
      region: me-jeddah-1
    type: ObjectStore
  type: Location

 

BluePrint:

 

apiVersion: cr.kanister.io/v1alpha1
kind: Blueprint
metadata:
  name: mysql-blueprint
actions:
  backup:
    outputArtifacts:
      mysqlBackup:
        kopiaSnapshot: "{{ .Phases.dumpToStore.Output.kopiaOutput }}"
    phases:
    - func: KubeTask
      name: dumpToStore
      objects:
        mysqlSecret:
          kind: Secret
          name: 'mysql-cred'
          namespace: 'mysql-test'
      args:
        image: ghcr.io/kanisterio/mysql-sidecar:0.97.0
        namespace: 'mysql-test'
        command:
        - bash
        - -o
        - errexit
        - -o
        - pipefail
        - -c
        - |
          backup_file_path="dump.sql"
          root_password="{{ index .Phases.dumpToStore.Secrets.mysqlSecret.Data "password" | toString }}"
          mysql_username="{{ index .Phases.dumpToStore.Secrets.mysqlSecret.Data "username" | toString }}"
          host="{{ index .Phases.dumpToStore.Secrets.mysqlSecret.Data "host" | toString }}"
          dump_cmd="mysqldump --column-statistics=0 -u ${mysql_username} --password=${root_password} -h ${host} --set-gtid-purged=OFF --single-transaction --all-databases"
          ${dump_cmd} | kando location push --profile '{{ toJson .Profile }}' --path "${backup_file_path}" --output-name "kopiaOutput" -

 

Error:

            {\"File\":\"pkg/kando/kando.go\",\"Function\":\"github.\
            com/kanisterio/kanister/pkg/kando.Execute\",\"Line\":33,\"error\":\
            \"Unsupported Location type:
            \",\"hostname\":\"kanister-job-gpwx8\",\"level\":\"info\",\"msg\":\
            \"Kando failed to
            execute\",\"time\":\"2023-10-08T18:52:08.154489645Z\"}\r

 

Further, Oracle Bucket is S3 compatible as i am using. If any one can help on that.

 


2 comments

Userlevel 5
Badge +2

@krn-alraedah can you start the backup again and at the same time run the below command and share it’s output


while true; do kubectl logs -l createdBy=kanister -n <APP_NAMESpaCE> -f ; sleep 2 ; done

Userlevel 1

this is no resource wit this command 

 

No resources found in kasten namespace.

No resources found in kasten namespace.

No resources found in kasten namespace.

 

Comment