diff --git a/Makefile b/Makefile index 80bf8395b..2e801ca83 100644 --- a/Makefile +++ b/Makefile @@ -314,7 +314,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest ## Tool Versions CERT_MANAGER_VERSION ?= v1.9.1 KUSTOMIZE_VERSION ?= v4.5.7 -CONTROLLER_TOOLS_VERSION ?= v0.10.0 +CONTROLLER_TOOLS_VERSION ?= v0.11.4 cert-manager: ## Install cert-manager to the cluster kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/$(CERT_MANAGER_VERSION)/cert-manager.yaml diff --git a/config/crd/bases/config.k8ssandra.io_clientconfigs.yaml b/config/crd/bases/config.k8ssandra.io_clientconfigs.yaml index a7f29dfcc..e57ca23aa 100644 --- a/config/crd/bases/config.k8ssandra.io_clientconfigs.yaml +++ b/config/crd/bases/config.k8ssandra.io_clientconfigs.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.11.4 name: clientconfigs.config.k8ssandra.io spec: group: config.k8ssandra.io diff --git a/config/crd/bases/control.k8ssandra.io_k8ssandratasks.yaml b/config/crd/bases/control.k8ssandra.io_k8ssandratasks.yaml index ab2a7b1ba..c0ab9295e 100644 --- a/config/crd/bases/control.k8ssandra.io_k8ssandratasks.yaml +++ b/config/crd/bases/control.k8ssandra.io_k8ssandratasks.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.11.4 name: k8ssandratasks.control.k8ssandra.io spec: group: control.k8ssandra.io diff --git a/config/crd/bases/k8ssandra.io_k8ssandraclusters.yaml b/config/crd/bases/k8ssandra.io_k8ssandraclusters.yaml index 9bac4a8aa..b6e7305b1 100644 --- a/config/crd/bases/k8ssandra.io_k8ssandraclusters.yaml +++ b/config/crd/bases/k8ssandra.io_k8ssandraclusters.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.11.4 name: k8ssandraclusters.k8ssandra.io spec: group: k8ssandra.io diff --git a/config/crd/bases/medusa.k8ssandra.io_medusabackupjobs.yaml b/config/crd/bases/medusa.k8ssandra.io_medusabackupjobs.yaml index efd0afa6b..f23f2a9f8 100644 --- a/config/crd/bases/medusa.k8ssandra.io_medusabackupjobs.yaml +++ b/config/crd/bases/medusa.k8ssandra.io_medusabackupjobs.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.11.4 name: medusabackupjobs.medusa.k8ssandra.io spec: group: medusa.k8ssandra.io diff --git a/config/crd/bases/medusa.k8ssandra.io_medusabackups.yaml b/config/crd/bases/medusa.k8ssandra.io_medusabackups.yaml index 446d70241..9ffad32d9 100644 --- a/config/crd/bases/medusa.k8ssandra.io_medusabackups.yaml +++ b/config/crd/bases/medusa.k8ssandra.io_medusabackups.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.11.4 name: medusabackups.medusa.k8ssandra.io spec: group: medusa.k8ssandra.io diff --git a/config/crd/bases/medusa.k8ssandra.io_medusabackupschedules.yaml b/config/crd/bases/medusa.k8ssandra.io_medusabackupschedules.yaml index 2c8429268..bc1646f3a 100644 --- a/config/crd/bases/medusa.k8ssandra.io_medusabackupschedules.yaml +++ b/config/crd/bases/medusa.k8ssandra.io_medusabackupschedules.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.11.4 name: medusabackupschedules.medusa.k8ssandra.io spec: group: medusa.k8ssandra.io diff --git a/config/crd/bases/medusa.k8ssandra.io_medusarestorejobs.yaml b/config/crd/bases/medusa.k8ssandra.io_medusarestorejobs.yaml index 11ec1a489..5ee2e2402 100644 --- a/config/crd/bases/medusa.k8ssandra.io_medusarestorejobs.yaml +++ b/config/crd/bases/medusa.k8ssandra.io_medusarestorejobs.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.11.4 name: medusarestorejobs.medusa.k8ssandra.io spec: group: medusa.k8ssandra.io diff --git a/config/crd/bases/medusa.k8ssandra.io_medusatasks.yaml b/config/crd/bases/medusa.k8ssandra.io_medusatasks.yaml index c812c572f..3a72dfd37 100644 --- a/config/crd/bases/medusa.k8ssandra.io_medusatasks.yaml +++ b/config/crd/bases/medusa.k8ssandra.io_medusatasks.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.11.4 name: medusatasks.medusa.k8ssandra.io spec: group: medusa.k8ssandra.io diff --git a/config/crd/bases/reaper.k8ssandra.io_reapers.yaml b/config/crd/bases/reaper.k8ssandra.io_reapers.yaml index ed931fb7b..910012e2d 100644 --- a/config/crd/bases/reaper.k8ssandra.io_reapers.yaml +++ b/config/crd/bases/reaper.k8ssandra.io_reapers.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.11.4 name: reapers.reaper.k8ssandra.io spec: group: reaper.k8ssandra.io diff --git a/config/crd/bases/replication.k8ssandra.io_replicatedsecrets.yaml b/config/crd/bases/replication.k8ssandra.io_replicatedsecrets.yaml index b54e5269f..c17acc202 100644 --- a/config/crd/bases/replication.k8ssandra.io_replicatedsecrets.yaml +++ b/config/crd/bases/replication.k8ssandra.io_replicatedsecrets.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.11.4 name: replicatedsecrets.replication.k8ssandra.io spec: group: replication.k8ssandra.io diff --git a/config/crd/bases/stargate.k8ssandra.io_stargates.yaml b/config/crd/bases/stargate.k8ssandra.io_stargates.yaml index e15133bf4..758767d10 100644 --- a/config/crd/bases/stargate.k8ssandra.io_stargates.yaml +++ b/config/crd/bases/stargate.k8ssandra.io_stargates.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.10.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.11.4 name: stargates.stargate.k8ssandra.io spec: group: stargate.k8ssandra.io diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index cad228ac9..4e64e49e8 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -2,7 +2,6 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - creationTimestamp: null name: k8ssandra-operator namespace: k8ssandra rules: diff --git a/config/webhook/manifests.yaml b/config/webhook/manifests.yaml index faaa8a994..05581ee73 100644 --- a/config/webhook/manifests.yaml +++ b/config/webhook/manifests.yaml @@ -2,7 +2,6 @@ apiVersion: admissionregistration.k8s.io/v1 kind: MutatingWebhookConfiguration metadata: - creationTimestamp: null name: mutating-webhook-configuration webhooks: - admissionReviewVersions: @@ -29,7 +28,6 @@ webhooks: apiVersion: admissionregistration.k8s.io/v1 kind: ValidatingWebhookConfiguration metadata: - creationTimestamp: null name: validating-webhook-configuration webhooks: - admissionReviewVersions: diff --git a/controllers/medusa/medusabackupjob_controller.go b/controllers/medusa/medusabackupjob_controller.go index 15c320709..b1a9d16ba 100644 --- a/controllers/medusa/medusabackupjob_controller.go +++ b/controllers/medusa/medusabackupjob_controller.go @@ -20,7 +20,6 @@ import ( "context" "fmt" "net" - "sync" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" @@ -40,7 +39,6 @@ import ( "github.com/k8ssandra/k8ssandra-operator/pkg/config" "github.com/k8ssandra/k8ssandra-operator/pkg/medusa" "github.com/k8ssandra/k8ssandra-operator/pkg/shared" - "github.com/k8ssandra/k8ssandra-operator/pkg/utils" ) // MedusaBackupJobReconciler reconciles a MedusaBackupJob object @@ -105,10 +103,47 @@ func (r *MedusaBackupJobReconciler) Reconcile(ctx context.Context, req ctrl.Requ return ctrl.Result{RequeueAfter: r.DefaultDelay}, err } - // If there is anything in progress, simply requeue the request + // If there is anything in progress, simply requeue the request until each pod has finished or errored if len(backup.Status.InProgress) > 0 { - logger.Info("MedusaBackupJob is being processed already", "Backup", req.NamespacedName) - return ctrl.Result{RequeueAfter: r.DefaultDelay}, nil + logger.Info("There are backups in progress, checking them..") + progress := make([]string, 0, len(backup.Status.InProgress)) + patch := client.MergeFrom(backup.DeepCopy()) + + StatusCheck: + for _, podName := range backup.Status.InProgress { + for _, pod := range pods { + if podName == pod.Name { + status, err := backupStatus(ctx, backup.ObjectMeta.Name, &pod, r.ClientFactory, logger) + if err != nil { + return ctrl.Result{}, err + } + + if status == medusa.StatusType_IN_PROGRESS { + progress = append(progress, podName) + } else if status == medusa.StatusType_SUCCESS { + backup.Status.Finished = append(backup.Status.Finished, podName) + } else if status == medusa.StatusType_FAILED || status == medusa.StatusType_UNKNOWN { + backup.Status.Failed = append(backup.Status.Failed, podName) + } + + continue StatusCheck + } + } + } + + if len(backup.Status.InProgress) != len(progress) { + backup.Status.InProgress = progress + if err := r.Status().Patch(ctx, backup, patch); err != nil { + logger.Error(err, "failed to patch status") + return ctrl.Result{}, err + } + } + + if len(progress) > 0 { + logger.Info("MedusaBackupJob is still being processed", "Backup", req.NamespacedName) + return ctrl.Result{RequeueAfter: r.DefaultDelay}, nil + } + return ctrl.Result{Requeue: true}, nil } // If the backup is already finished, there is nothing to do. @@ -121,7 +156,7 @@ func (r *MedusaBackupJobReconciler) Reconcile(ctx context.Context, req ctrl.Requ if !backup.Status.StartTime.IsZero() { // If there is anything in progress, simply requeue the request if len(backup.Status.InProgress) > 0 { - logger.Info("Backups already in progress") + logger.Info("Backup is still in progress") return ctrl.Result{RequeueAfter: r.DefaultDelay}, nil } @@ -158,9 +193,6 @@ func (r *MedusaBackupJobReconciler) Reconcile(ctx context.Context, req ctrl.Requ patch := client.MergeFromWithOptions(backup.DeepCopy(), client.MergeFromWithOptimisticLock{}) backup.Status.StartTime = metav1.Now() - for _, pod := range pods { - backup.Status.InProgress = append(backup.Status.InProgress, pod.Name) - } if err := r.Status().Patch(ctx, backup, patch); err != nil { logger.Error(err, "Failed to patch status") @@ -169,43 +201,21 @@ func (r *MedusaBackupJobReconciler) Reconcile(ctx context.Context, req ctrl.Requ } logger.Info("Starting backups") - // Do the actual backup in the background - go func() { - wg := sync.WaitGroup{} - - // Mutex to prevent concurrent updates to the backup.Status object - backupMutex := sync.Mutex{} - patch := client.MergeFrom(backup.DeepCopy()) + patch = client.MergeFrom(backup.DeepCopy()) - for _, p := range pods { - pod := p - wg.Add(1) - go func() { - logger.Info("starting backup", "CassandraPod", pod.Name) - succeeded := false - if err := doMedusaBackup(ctx, backup.ObjectMeta.Name, backup.Spec.Type, &pod, r.ClientFactory, logger); err == nil { - logger.Info("finished backup", "CassandraPod", pod.Name) - succeeded = true - } else { - logger.Error(err, "backup failed", "CassandraPod", pod.Name) - } - backupMutex.Lock() - defer backupMutex.Unlock() - defer wg.Done() - backup.Status.InProgress = utils.RemoveValue(backup.Status.InProgress, pod.Name) - if succeeded { - backup.Status.Finished = append(backup.Status.Finished, pod.Name) - } else { - backup.Status.Failed = append(backup.Status.Failed, pod.Name) - } - }() - } - wg.Wait() - logger.Info("finished backup operations") - if err := r.Status().Patch(context.Background(), backup, patch); err != nil { - logger.Error(err, "failed to patch status", "Backup", fmt.Sprintf("%s/%s", backup.Name, backup.Namespace)) + for _, p := range pods { + logger.Info("starting backup", "CassandraPod", p.Name) + _, err := doMedusaBackup(ctx, backup.ObjectMeta.Name, backup.Spec.Type, &p, r.ClientFactory, logger) + if err != nil { + logger.Error(err, "backup failed", "CassandraPod", p.Name) } - }() + + backup.Status.InProgress = append(backup.Status.InProgress, p.Name) + } + // logger.Info("finished backup operations") + if err := r.Status().Patch(context.Background(), backup, patch); err != nil { + logger.Error(err, "failed to patch status", "Backup", fmt.Sprintf("%s/%s", backup.Name, backup.Namespace)) + } return ctrl.Result{RequeueAfter: r.DefaultDelay}, nil } @@ -249,15 +259,35 @@ func (r *MedusaBackupJobReconciler) createMedusaBackup(ctx context.Context, back return nil } -func doMedusaBackup(ctx context.Context, name string, backupType shared.BackupType, pod *corev1.Pod, clientFactory medusa.ClientFactory, logger logr.Logger) error { +func doMedusaBackup(ctx context.Context, name string, backupType shared.BackupType, pod *corev1.Pod, clientFactory medusa.ClientFactory, logger logr.Logger) (string, error) { addr := net.JoinHostPort(pod.Status.PodIP, fmt.Sprint(shared.BackupSidecarPort)) logger.Info("connecting to backup sidecar", "Pod", pod.Name, "Address", addr) if medusaClient, err := clientFactory.NewClient(addr); err != nil { - return err + return "", err } else { logger.Info("successfully connected to backup sidecar", "Pod", pod.Name, "Address", addr) defer medusaClient.Close() - return medusaClient.CreateBackup(ctx, name, string(backupType)) + resp, err := medusaClient.CreateBackup(ctx, name, string(backupType)) + if err != nil { + return "", err + } + + return resp.BackupName, nil + } +} + +func backupStatus(ctx context.Context, name string, pod *corev1.Pod, clientFactory medusa.ClientFactory, logger logr.Logger) (medusa.StatusType, error) { + addr := net.JoinHostPort(pod.Status.PodIP, fmt.Sprint(shared.BackupSidecarPort)) + logger.Info("connecting to backup sidecar", "Pod", pod.Name, "Address", addr) + if medusaClient, err := clientFactory.NewClient(addr); err != nil { + return medusa.StatusType_UNKNOWN, err + } else { + resp, err := medusaClient.BackupStatus(ctx, name) + if err != nil { + return medusa.StatusType_UNKNOWN, err + } + + return resp.Status, nil } } diff --git a/controllers/medusa/medusabackupjob_controller_test.go b/controllers/medusa/medusabackupjob_controller_test.go index 685819544..60018acfb 100644 --- a/controllers/medusa/medusabackupjob_controller_test.go +++ b/controllers/medusa/medusabackupjob_controller_test.go @@ -330,9 +330,9 @@ func (c *fakeMedusaClient) Close() error { return nil } -func (c *fakeMedusaClient) CreateBackup(ctx context.Context, name string, backupType string) error { +func (c *fakeMedusaClient) CreateBackup(ctx context.Context, name string, backupType string) (*medusa.BackupResponse, error) { c.RequestedBackups = append(c.RequestedBackups, name) - return nil + return &medusa.BackupResponse{BackupName: name, Status: medusa.StatusType_IN_PROGRESS}, nil } func (c *fakeMedusaClient) GetBackups(ctx context.Context) ([]*medusa.BackupSummary, error) { @@ -350,7 +350,9 @@ func (c *fakeMedusaClient) GetBackups(ctx context.Context) ([]*medusa.BackupSumm } func (c *fakeMedusaClient) BackupStatus(ctx context.Context, name string) (*medusa.BackupStatusResponse, error) { - return nil, nil + return &medusa.BackupStatusResponse{ + Status: medusa.StatusType_SUCCESS, + }, nil } func (c *fakeMedusaClient) PurgeBackups(ctx context.Context) (*medusa.PurgeBackupsResponse, error) { diff --git a/controllers/medusa/medusarestorejob_controller_test.go b/controllers/medusa/medusarestorejob_controller_test.go index eecbd65be..519de68d7 100644 --- a/controllers/medusa/medusarestorejob_controller_test.go +++ b/controllers/medusa/medusarestorejob_controller_test.go @@ -322,8 +322,8 @@ func (c *fakeMedusaRestoreClient) Close() error { return nil } -func (c *fakeMedusaRestoreClient) CreateBackup(ctx context.Context, name string, backupType string) error { - return nil +func (c *fakeMedusaRestoreClient) CreateBackup(ctx context.Context, name string, backupType string) (*medusa.BackupResponse, error) { + return nil, nil } func (c *fakeMedusaRestoreClient) GetBackups(ctx context.Context) ([]*medusa.BackupSummary, error) { diff --git a/pkg/medusa/grpc.go b/pkg/medusa/grpc.go index 74f7b0ce5..317b6d020 100644 --- a/pkg/medusa/grpc.go +++ b/pkg/medusa/grpc.go @@ -33,7 +33,7 @@ func (f *DefaultFactory) NewClient(address string) (Client, error) { type Client interface { Close() error - CreateBackup(ctx context.Context, name string, backupType string) error + CreateBackup(ctx context.Context, name string, backupType string) (*BackupResponse, error) GetBackups(ctx context.Context) ([]*BackupSummary, error) @@ -48,7 +48,7 @@ func (c *defaultClient) Close() error { return c.connection.Close() } -func (c *defaultClient) CreateBackup(ctx context.Context, name string, backupType string) error { +func (c *defaultClient) CreateBackup(ctx context.Context, name string, backupType string) (*BackupResponse, error) { backupMode := BackupRequest_DIFFERENTIAL if backupType == "full" { backupMode = BackupRequest_FULL @@ -58,9 +58,13 @@ func (c *defaultClient) CreateBackup(ctx context.Context, name string, backupTyp Name: name, Mode: backupMode, } - _, err := c.grpcClient.Backup(ctx, &request) - return err + resp, err := c.grpcClient.AsyncBackup(ctx, &request) + if err != nil { + return nil, err + } + + return resp, err } func (c *defaultClient) GetBackups(ctx context.Context) ([]*BackupSummary, error) { diff --git a/pkg/medusa/hostmap_test.go b/pkg/medusa/hostmap_test.go index ecf1e071b..67cffe818 100644 --- a/pkg/medusa/hostmap_test.go +++ b/pkg/medusa/hostmap_test.go @@ -56,8 +56,8 @@ func (c mockgRPCClient) Close() error { return nil } -func (c mockgRPCClient) CreateBackup(ctx context.Context, name string, backupType string) error { - return nil +func (c mockgRPCClient) CreateBackup(ctx context.Context, name string, backupType string) (*BackupResponse, error) { + return nil, nil } func (c mockgRPCClient) PurgeBackups(ctx context.Context) (*PurgeBackupsResponse, error) { diff --git a/pkg/medusa/medusa.pb.go b/pkg/medusa/medusa.pb.go index 2e9550506..09b39b8e9 100644 --- a/pkg/medusa/medusa.pb.go +++ b/pkg/medusa/medusa.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 -// protoc v3.17.3 +// protoc-gen-go v1.31.0 +// protoc v4.24.3 // source: pkg/medusa/medusa.proto package medusa diff --git a/pkg/medusa/medusa_grpc.pb.go b/pkg/medusa/medusa_grpc.pb.go index d7b491dda..8e9ee246c 100644 --- a/pkg/medusa/medusa_grpc.pb.go +++ b/pkg/medusa/medusa_grpc.pb.go @@ -1,4 +1,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.24.3 +// source: pkg/medusa/medusa.proto package medusa @@ -14,6 +18,16 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + Medusa_Backup_FullMethodName = "/Medusa/Backup" + Medusa_AsyncBackup_FullMethodName = "/Medusa/AsyncBackup" + Medusa_BackupStatus_FullMethodName = "/Medusa/BackupStatus" + Medusa_DeleteBackup_FullMethodName = "/Medusa/DeleteBackup" + Medusa_GetBackups_FullMethodName = "/Medusa/GetBackups" + Medusa_PurgeBackups_FullMethodName = "/Medusa/PurgeBackups" + Medusa_PrepareRestore_FullMethodName = "/Medusa/PrepareRestore" +) + // MedusaClient is the client API for Medusa service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -37,7 +51,7 @@ func NewMedusaClient(cc grpc.ClientConnInterface) MedusaClient { func (c *medusaClient) Backup(ctx context.Context, in *BackupRequest, opts ...grpc.CallOption) (*BackupResponse, error) { out := new(BackupResponse) - err := c.cc.Invoke(ctx, "/Medusa/Backup", in, out, opts...) + err := c.cc.Invoke(ctx, Medusa_Backup_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -46,7 +60,7 @@ func (c *medusaClient) Backup(ctx context.Context, in *BackupRequest, opts ...gr func (c *medusaClient) AsyncBackup(ctx context.Context, in *BackupRequest, opts ...grpc.CallOption) (*BackupResponse, error) { out := new(BackupResponse) - err := c.cc.Invoke(ctx, "/Medusa/AsyncBackup", in, out, opts...) + err := c.cc.Invoke(ctx, Medusa_AsyncBackup_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -55,7 +69,7 @@ func (c *medusaClient) AsyncBackup(ctx context.Context, in *BackupRequest, opts func (c *medusaClient) BackupStatus(ctx context.Context, in *BackupStatusRequest, opts ...grpc.CallOption) (*BackupStatusResponse, error) { out := new(BackupStatusResponse) - err := c.cc.Invoke(ctx, "/Medusa/BackupStatus", in, out, opts...) + err := c.cc.Invoke(ctx, Medusa_BackupStatus_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -64,7 +78,7 @@ func (c *medusaClient) BackupStatus(ctx context.Context, in *BackupStatusRequest func (c *medusaClient) DeleteBackup(ctx context.Context, in *DeleteBackupRequest, opts ...grpc.CallOption) (*DeleteBackupResponse, error) { out := new(DeleteBackupResponse) - err := c.cc.Invoke(ctx, "/Medusa/DeleteBackup", in, out, opts...) + err := c.cc.Invoke(ctx, Medusa_DeleteBackup_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -73,7 +87,7 @@ func (c *medusaClient) DeleteBackup(ctx context.Context, in *DeleteBackupRequest func (c *medusaClient) GetBackups(ctx context.Context, in *GetBackupsRequest, opts ...grpc.CallOption) (*GetBackupsResponse, error) { out := new(GetBackupsResponse) - err := c.cc.Invoke(ctx, "/Medusa/GetBackups", in, out, opts...) + err := c.cc.Invoke(ctx, Medusa_GetBackups_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -82,7 +96,7 @@ func (c *medusaClient) GetBackups(ctx context.Context, in *GetBackupsRequest, op func (c *medusaClient) PurgeBackups(ctx context.Context, in *PurgeBackupsRequest, opts ...grpc.CallOption) (*PurgeBackupsResponse, error) { out := new(PurgeBackupsResponse) - err := c.cc.Invoke(ctx, "/Medusa/PurgeBackups", in, out, opts...) + err := c.cc.Invoke(ctx, Medusa_PurgeBackups_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -91,7 +105,7 @@ func (c *medusaClient) PurgeBackups(ctx context.Context, in *PurgeBackupsRequest func (c *medusaClient) PrepareRestore(ctx context.Context, in *PrepareRestoreRequest, opts ...grpc.CallOption) (*PrepareRestoreResponse, error) { out := new(PrepareRestoreResponse) - err := c.cc.Invoke(ctx, "/Medusa/PrepareRestore", in, out, opts...) + err := c.cc.Invoke(ctx, Medusa_PrepareRestore_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -160,7 +174,7 @@ func _Medusa_Backup_Handler(srv interface{}, ctx context.Context, dec func(inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Medusa/Backup", + FullMethod: Medusa_Backup_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MedusaServer).Backup(ctx, req.(*BackupRequest)) @@ -178,7 +192,7 @@ func _Medusa_AsyncBackup_Handler(srv interface{}, ctx context.Context, dec func( } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Medusa/AsyncBackup", + FullMethod: Medusa_AsyncBackup_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MedusaServer).AsyncBackup(ctx, req.(*BackupRequest)) @@ -196,7 +210,7 @@ func _Medusa_BackupStatus_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Medusa/BackupStatus", + FullMethod: Medusa_BackupStatus_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MedusaServer).BackupStatus(ctx, req.(*BackupStatusRequest)) @@ -214,7 +228,7 @@ func _Medusa_DeleteBackup_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Medusa/DeleteBackup", + FullMethod: Medusa_DeleteBackup_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MedusaServer).DeleteBackup(ctx, req.(*DeleteBackupRequest)) @@ -232,7 +246,7 @@ func _Medusa_GetBackups_Handler(srv interface{}, ctx context.Context, dec func(i } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Medusa/GetBackups", + FullMethod: Medusa_GetBackups_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MedusaServer).GetBackups(ctx, req.(*GetBackupsRequest)) @@ -250,7 +264,7 @@ func _Medusa_PurgeBackups_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Medusa/PurgeBackups", + FullMethod: Medusa_PurgeBackups_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MedusaServer).PurgeBackups(ctx, req.(*PurgeBackupsRequest)) @@ -268,7 +282,7 @@ func _Medusa_PrepareRestore_Handler(srv interface{}, ctx context.Context, dec fu } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/Medusa/PrepareRestore", + FullMethod: Medusa_PrepareRestore_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MedusaServer).PrepareRestore(ctx, req.(*PrepareRestoreRequest))