Skip to content

Commit

Permalink
Merge pull request #2931 from openshift-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…2930-to-release-4.18

DFBUGS-1002: [release-4.18] provider: provide namespace for storage-client-mapping config
  • Loading branch information
openshift-merge-bot[bot] authored Dec 9, 2024
2 parents 8d650e6 + f4e552a commit 53ca370
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions services/provider/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 53ca370

Please sign in to comment.