Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DFBUGS-1002: [release-4.18] provider: provide namespace for storage-client-mapping config #2931

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading