planetscale / planetscale/vitess-operator

vtctldclient backup not working with defined VitessBackupStorages in cluster

Open
#472 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
372
Forks
102
Avg merge
3d 5h
Merged PRs (30d)
15

Description

I run

./vtctldclient --server 192.168.100.103:31487 Backup --allow-primary zone1-30573399

I get:

E0914 01:23:16.047192 3349604 main.go:56] rpc error: code = Unknown desc = TabletManager.Backup on zone1-0030573399 error: unable to get backup storage: no registered implementation of BackupStorage: unable to get backup storage: no registered implementation of BackupStorage

However, in the cluster spec I have defined a hostpath for the backups - and I can see it show up in VitessBackupStorages

apiVersion: planetscale.com/v2
kind: VitessBackupStorage
metadata:
  creationTimestamp: '2023-09-14T00:52:24Z'
  generation: 1
  labels:
    backup.planetscale.com/location: ''
    planetscale.com/cluster: example
  managedFields:
    - apiVersion: planetscale.com/v2
      fieldsType: FieldsV1
      fieldsV1:
        f:metadata:
          f:labels:
            .: {}
            f:backup.planetscale.com/location: {}
            f:planetscale.com/cluster: {}
          f:ownerReferences:
            .: {}
            k:{"uid":"272e7a69-a91f-4196-ad2d-8930c88c2715"}: {}
        f:spec:
          .: {}
          f:location:
            .: {}
            f:volume:
              .: {}
              f:hostPath:
                .: {}
                f:path: {}
                f:type: {}
      manager: vitess-operator
      operation: Update
      time: '2023-09-14T00:52:24Z'
    - apiVersion: planetscale.com/v2
      fieldsType: FieldsV1
      fieldsV1:
        f:status:
          .: {}
          f:observedGeneration: {}
      manager: vitess-operator
      operation: Update
      subresource: status
      time: '2023-09-14T00:53:06Z'
  name: example-90089e05
  namespace: vitess
  ownerReferences:
    - apiVersion: planetscale.com/v2
      blockOwnerDeletion: true
      controller: true
      kind: VitessCluster
      name: example
      uid: 272e7a69-a91f-4196-ad2d-8930c88c2715
  resourceVersion: '233908598'
  uid: 24068990-be71-49b5-ad17-773f581170a9
spec:
  location:
    volume:
      hostPath:
        path: /mnt/minio-store/vitess-backups
        type: Directory
status:
  observedGeneration: 1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the vtctldclient Backup command and inspecting how the VitessBackupStorage resource with a hostPath is handled by the operator. Trace why the configured storage is not registered, then verify that the same backup command succeeds using the defined storage.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
database, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.