Skip to content

Commit

Permalink
controllers: update storageclient connection fail log
Browse files Browse the repository at this point in the history
updated storageclient connetion fail log to show provider endpoint as
well

Signed-off-by: Rohan Gupta <[email protected]>
  • Loading branch information
rohan47 authored and openshift-cherrypick-robot committed Sep 23, 2024
1 parent 5a732f5 commit 11915d1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/controller/storageclaim_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func (r *StorageClaimReconciler) reconcilePhases() (reconcile.Result, error) {
10*time.Second,
)
if err != nil {
return reconcile.Result{}, fmt.Errorf("failed to create provider client: %v", err)
return reconcile.Result{}, fmt.Errorf("failed to create provider client with endpoint %v: %v", r.storageClient.Spec.StorageProviderEndpoint, err)
}

// Close client-side connections.
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/storageclient_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ func (r *StorageClientReconciler) newExternalClusterClient() (*providerClient.OC
ocsProviderClient, err := providerClient.NewProviderClient(
r.ctx, r.storageClient.Spec.StorageProviderEndpoint, time.Second*10)
if err != nil {
return nil, fmt.Errorf("failed to create a new provider client: %v", err)
return nil, fmt.Errorf("failed to create a new provider client with endpoint %v: %v", r.storageClient.Spec.StorageProviderEndpoint, err)
}

return ocsProviderClient, nil
Expand Down
2 changes: 1 addition & 1 deletion service/status-report/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func main() {
10*time.Second,
)
if err != nil {
klog.Exitf("Failed to create grpc client: %v", err)
klog.Exitf("Failed to create grpc client with endpoint %v: %v", storageClient.Spec.StorageProviderEndpoint, err)
}
defer providerClient.Close()

Expand Down

0 comments on commit 11915d1

Please sign in to comment.