From dff04494fee798e6542d0753701cbc3731bed3c4 Mon Sep 17 00:00:00 2001 From: Sonny Sasaka Date: Wed, 15 Apr 2026 16:38:04 -0700 Subject: [PATCH] csi: fix swapped provisionerPriorityClassName with pluginPriorityClassName Previously provisionerPriorityClassName config is applied to node plugin but pluginPriorityClassName is applied to controller plugin. This causes a misconfiguration since the default values for provisionerPriorityClassName is system-cluster-critical and pluginPriorityClassName is system-node-critical. The default priority for node plugin ought to be system-node-critical so we can leverage this information to kill the pods in this priority last, allowing other pods that may mount RBD-backed volume to unmount cleanly first, otherwise the shutdown sequence may hang due to failure unmounting RBD-backed volume when the node plugin pod is already killed. Signed-off-by: Sonny Sasaka --- pkg/operator/ceph/csi/operator_config.go | 4 ++-- pkg/operator/ceph/csi/operator_driver.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/operator/ceph/csi/operator_config.go b/pkg/operator/ceph/csi/operator_config.go index 0e09404ba..c8c86679c 100644 --- a/pkg/operator/ceph/csi/operator_config.go +++ b/pkg/operator/ceph/csi/operator_config.go @@ -95,7 +95,7 @@ func (r *ReconcileCSI) generateCSIOpConfigSpec(cluster cephv1.CephCluster, opCon FsGroupPolicy: k8scsiv1.FileFSGroupPolicy, NodePlugin: &csiopv1.NodePluginSpec{ PodCommonSpec: csiopv1.PodCommonSpec{ - PrioritylClassName: &CSIParam.ProvisionerPriorityClassName, + PrioritylClassName: &CSIParam.PluginPriorityClassName, Affinity: &v1.Affinity{ NodeAffinity: getNodeAffinity(pluginNodeAffinityEnv, &v1.NodeAffinity{}), }, @@ -112,7 +112,7 @@ func (r *ReconcileCSI) generateCSIOpConfigSpec(cluster cephv1.CephCluster, opCon }, HostNetwork: &controllerPluginHostNetwork, PodCommonSpec: csiopv1.PodCommonSpec{ - PrioritylClassName: &CSIParam.PluginPriorityClassName, + PrioritylClassName: &CSIParam.ProvisionerPriorityClassName, Affinity: &v1.Affinity{ NodeAffinity: getNodeAffinity(provisionerNodeAffinityEnv, &v1.NodeAffinity{}), }, diff --git a/pkg/operator/ceph/csi/operator_driver.go b/pkg/operator/ceph/csi/operator_driver.go index bb34ed7cc..ae84cfdb4 100644 --- a/pkg/operator/ceph/csi/operator_driver.go +++ b/pkg/operator/ceph/csi/operator_driver.go @@ -273,7 +273,7 @@ func (r *ReconcileCSI) generateDriverSpec(cluster cephv1.CephCluster) (csiopv1.D FsGroupPolicy: k8scsiv1.FileFSGroupPolicy, NodePlugin: &csiopv1.NodePluginSpec{ PodCommonSpec: csiopv1.PodCommonSpec{ - PrioritylClassName: &CSIParam.ProvisionerPriorityClassName, + PrioritylClassName: &CSIParam.PluginPriorityClassName, Affinity: &corev1.Affinity{ NodeAffinity: getNodeAffinity(pluginNodeAffinityEnv, &corev1.NodeAffinity{}), }, @@ -285,7 +285,7 @@ func (r *ReconcileCSI) generateDriverSpec(cluster cephv1.CephCluster) (csiopv1.D }, ControllerPlugin: &csiopv1.ControllerPluginSpec{ PodCommonSpec: csiopv1.PodCommonSpec{ - PrioritylClassName: &CSIParam.PluginPriorityClassName, + PrioritylClassName: &CSIParam.ProvisionerPriorityClassName, Affinity: &corev1.Affinity{ NodeAffinity: getNodeAffinity(provisionerNodeAffinityEnv, &corev1.NodeAffinity{}), },