Merge pull request #13663 from iPraveenParihar/fix/netNamespaceFilePath-generation

csi: Fix NetNamespaceFilePath generation with namespace instead of name
This commit is contained in:
Travis Nielsen
2024-02-01 09:32:33 -07:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
@@ -299,7 +299,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")
}
@@ -286,7 +286,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")
}