From ac49789f6bef3d7d95624877cfd24b9866f3e37e Mon Sep 17 00:00:00 2001 From: Rewant Soni Date: Fri, 6 Dec 2024 11:36:59 +0530 Subject: [PATCH] provider: provide namespace for storage-client-mapping config Signed-off-by: Rewant Soni --- services/provider/server/server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/provider/server/server.go b/services/provider/server/server.go index e7cf7596a3..5645eb872f 100644 --- a/services/provider/server/server.go +++ b/services/provider/server/server.go @@ -238,7 +238,7 @@ func (s *OCSProviderServer) GetStorageConfig(ctx context.Context, req *pb.Storag isConsumerMirrorEnabled, err := s.isConsumerMirrorEnabled(ctx, consumerObj) if err != nil { klog.Error(err) - return nil, status.Errorf(codes.Internal, "Failed to get maintenance mode status.") + return nil, status.Errorf(codes.Internal, "Failed to get mirroring status for consumer.") } desiredClientConfigHash := getDesiredClientConfigHash( @@ -1016,7 +1016,7 @@ func (s *OCSProviderServer) ReportStatus(ctx context.Context, req *pb.ReportStat isConsumerMirrorEnabled, err := s.isConsumerMirrorEnabled(ctx, storageConsumer) if err != nil { klog.Error(err) - return nil, status.Errorf(codes.Internal, "Failed to get maintenance mode status.") + return nil, status.Errorf(codes.Internal, "Failed to get mirroring status for consumer.") } desiredClientConfigHash := getDesiredClientConfigHash( @@ -1273,7 +1273,7 @@ func (s *OCSProviderServer) isSystemInMaintenanceMode(ctx context.Context) (bool func (s *OCSProviderServer) isConsumerMirrorEnabled(ctx context.Context, consumer *ocsv1alpha1.StorageConsumer) (bool, error) { clientMappingConfig := &corev1.ConfigMap{} clientMappingConfig.Name = util.StorageClientMappingConfigName - clientMappingConfig.Name = s.namespace + clientMappingConfig.Namespace = s.namespace if err := s.client.Get(ctx, client.ObjectKeyFromObject(clientMappingConfig), clientMappingConfig); err != nil { return false, client.IgnoreNotFound(err)