csi: remove inline panic handler from CreateDefaultClientProfile

remove inline defer that catches and logs panics since it is already handled by pr#16150

Signed-off-by: Oded Viner <oviner@redhat.com>
This commit is contained in:
Oded Viner committed 2025-08-13 19:01:32 +03:00
1 parent 47d01f8812
commit 7f0be04773
1 file changed
-9
-9
View File
@@ -20,7 +20,6 @@ import (
"context"
"os"
"reflect"
"runtime/debug"
"strings"
cephv1 "github.com/rook/rook/pkg/apis/ceph.rook.io/v1"
@@ -140,14 +139,6 @@ func generateProfileSubVolumeGroupSpec(clusterInfo *cephclient.ClusterInfo, ceph
// CreateDefaultClientProfile creates a default client profile for csi-operator to connect driver
func CreateDefaultClientProfile(c client.Client, clusterInfo *cephclient.ClusterInfo) error {
logger.Info("Creating ceph-csi clientProfile default CR")
defer func() {
if r := recover(); r != nil {
logger.Errorf("Panic when creating the default client profile: %+v", r)
logger.Errorf("Stack trace:")
logger.Errorf("%s", string(debug.Stack()))
}
}()
csiOpClientProfile := &csiopv1.ClientProfile{}
csiOpClientProfile.Name = clusterInfo.Namespace
csiOpClientProfile.Namespace = os.Getenv(k8sutil.PodNamespaceEnvVar)