CNS volume not found in-memory but exists in the database
Environment
- Red Hat OpenShift Container Platform 4.13
- Red Hat OpenShift Container Platform 4.14
- VMware vSphere 8
Issue
- After enabling the automatic CSI migration for vSphere I have volumes that fail to attach with the following error:
CSI ControllerPublishVolume is failing to set control flag due to "CNS: Failed to retrieve datastore for vol cb96305a-352a-4f3a-b22f-824e658f31d4"
Resolution
In order to avoid these known issues please ensure that you've updated to 8.0 Update 2 before initiating vSphere CSI migration in 4.13 or upgrading to OCP 4.14 where vSphere migration happens automatically.
If this wasn't done you can workaround this problem following the VMware recommendations:
- Make sure the upper layer application can tolerate temporary vsan-health downtime during the restart, or the administrator needs to pause the upper layer application manually.
- Restart vsan-health this will solve this issue as cns loads from database upon process restart.
Root Cause
This is a Content from kb.vmware.com is not included.VMware known issue where in rare cases, CNS in-memory cache could be purged by mistake yet the database information is correct and up-to-date.
This particular concern came into existence as of vCenter 8.0; thus, it remains inconsequential to vCenter 7.0 or any earlier releases.
During a migration when VMDKs get migrated to FCDs (first-class-disks), the attachment of converted volume fails (with the denoted error).
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.