CSI RBD Plugin Test Fails: DaemonSet Not Found
This article addresses a bug encountered during the execution of the test_update_strategy_config_change
test within the OpenShift Container Storage (OCS) test suite. Specifically, the test fails when attempting to update the configuration strategy for the CSI RBD (Ceph Block Device) plugin. This report provides a detailed overview of the issue, steps to reproduce, observed behavior, expected behavior, potential impact, and relevant environment information.
Description of the Issue
The core issue lies within the test tests/functional/upgrade/test_configuration.py::test_update_strategy_config_change[csi-rbdplugin-2-2]
, which is designed to verify that changes made to the rook-ceph-operator-config
ConfigMap are correctly reflected in the corresponding DaemonSet for the CSI RBD plugin. However, the test encounters a NotFound
error when attempting to retrieve the csi-rbdplugin
DaemonSet.
Detailed Error Log Analysis
Let's break down the error log to understand the sequence of events and the root cause:
- The test begins by patching the
rook-ceph-operator-config
ConfigMap in theopenshift-storage
namespace. Specifically, it attempts to set theCSI_RBD_PLUGIN_UPDATE_STRATEGY_MAX_UNAVAILABLE
parameter to a value of2
. This is a crucial step in controlling the number of CSI RBD plugin pods that can be unavailable during an update, ensuring minimal disruption to storage services.
14:22:18 - MainThread - ocs_ci.utility.utils - INFO - Executing command: oc --kubeconfig /opt/clusters/b3e09001/ocp4-workdir/auth/kubeconfig patch configmap -n openshift-storage rook-ceph-operator-config -p '{"data": {"CSI_RBD_PLUGIN_UPDATE_STRATEGY_MAX_UNAVAILABLE": "2"}}'
14:22:18 - MainThread - ocs_ci.ocs.ui.base_ui - INFO - CSI_RBD_PLUGIN_UPDATE_STRATEGY_MAX_UNAVAILABLE is set to 2
This part of the log indicates that the patch command was successfully executed, and the configuration value was set as intended. The **CSI_RBD_PLUGIN_UPDATE_STRATEGY_MAX_UNAVAILABLE** parameter plays a critical role in orchestrating updates to the CSI RBD plugin, allowing administrators to fine-tune the update process based on their specific availability requirements.
- The test then attempts to retrieve the
csi-rbdplugin
DaemonSet using theoc get DaemonSet
command. This is where the failure occurs.
14:22:18 - MainThread - ocs_ci.utility.utils - INFO - Executing command: oc --kubeconfig /opt/clusters/b3e09001/ocp4-workdir/auth/kubeconfig -n openshift-storage get DaemonSet csi-rbdplugin -n openshift-storage -o yaml
14:22:18 - MainThread - ocs_ci.utility.utils - WARNING - Command stderr: Error from server (NotFound): daemonsets.apps "csi-rbdplugin" not found
The error message `Error from server (NotFound): daemonsets.apps