From e596f31cf09c0f01dfd1dc51cf6379b22a25f6fb Mon Sep 17 00:00:00 2001 From: Praveen M Date: Wed, 24 Jan 2024 15:14:57 +0530 Subject: [PATCH] csi: fix NetNamespaceFilePath generation Corrected the NetNamespaceFilePath generation in the subvolumegroup & radosnamespace controller by replacing the cephCluster.Name with cephCluster.Namespace. Signed-off-by: Praveen M (cherry picked from commit 67ff924b57033f54b0bd66b50f1cd5943c0ce331) --- pkg/operator/ceph/file/subvolumegroup/controller.go | 2 +- pkg/operator/ceph/pool/radosnamespace/controller.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/operator/ceph/file/subvolumegroup/controller.go b/pkg/operator/ceph/file/subvolumegroup/controller.go index dc9a18066..08757340b 100644 --- a/pkg/operator/ceph/file/subvolumegroup/controller.go +++ b/pkg/operator/ceph/file/subvolumegroup/controller.go @@ -292,7 +292,7 @@ func (r *ReconcileCephFilesystemSubVolumeGroup) updateClusterConfig(cephFilesyst // If the cluster has Multus enabled we need to append the network namespace of the driver's // holder DaemonSet in the csi configmap if cephCluster.Spec.Network.IsMultus() { - netNamespaceFilePath, err := csi.GenerateNetNamespaceFilePath(r.opManagerContext, r.client, cephCluster.Name, r.opConfig.OperatorNamespace, csi.CephFSDriverShortName) + netNamespaceFilePath, err := csi.GenerateNetNamespaceFilePath(r.opManagerContext, r.client, cephCluster.Namespace, r.opConfig.OperatorNamespace, csi.CephFSDriverShortName) if err != nil { return errors.Wrap(err, "failed to generate cephfs net namespace file path") } diff --git a/pkg/operator/ceph/pool/radosnamespace/controller.go b/pkg/operator/ceph/pool/radosnamespace/controller.go index 726aa63f1..908da9f1b 100644 --- a/pkg/operator/ceph/pool/radosnamespace/controller.go +++ b/pkg/operator/ceph/pool/radosnamespace/controller.go @@ -280,7 +280,7 @@ func (r *ReconcileCephBlockPoolRadosNamespace) updateClusterConfig(cephBlockPool if cephCluster.Spec.Network.IsMultus() { // Build the network namespace config to be injected into the csi config - netNamespaceFilePath, err := csi.GenerateNetNamespaceFilePath(r.opManagerContext, r.client, cephCluster.Name, r.opConfig.OperatorNamespace, csi.RBDDriverShortName) + netNamespaceFilePath, err := csi.GenerateNetNamespaceFilePath(r.opManagerContext, r.client, cephCluster.Namespace, r.opConfig.OperatorNamespace, csi.RBDDriverShortName) if err != nil { return errors.Wrap(err, "failed to generate rbd net namespace file path") }