After the vCenter upgrade from vCenter 7.0U3 to 8.0 U3, unable to create PODs, it is stuck in ContainerCreating State with the error "The input volume xxxxxxxx is not registered as a CNS volume".
AttachVolume.Attach failed for volume "pvc-xxxxxxxxxxxxxxxxxxxxx" : rpc error: code = Internal desc = failed to attach disk: "xxxxxxxxxxxxxxxxxxxxxxxxx" with .node: "xxxxxxxxxxxxxxxxxxx" err ServerFaultCode: The object or item referred to could not be found.
PV and PVC creation succeeds, volume attachments show Bound but failure in Sync.
The pvc or the volume ID are not available on the VCDB
Restarting pod:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedAttachVolume 58m attachdetach-controller AttachVolume.Attach failed for volume "pvc-xxxxxxxxxxxxxxx" : rpc error: code = Internal desc = failed to attach disk: "xxxxxxxxxxxxxxxxx" with node: "xxxxxxxxxxxxxxxxxxx" err failed to attach cns volume: "xxxxxxxxxxxxxxxxxxxxx" to node vm: "VirtualMachine:vm-63600 [VirtualCenterHost: xxxxxxxx, UUID: xxxxxxxxxxxxxxxxxxxx, Datacenter: Datacenter [Datacenter: Datacenter:datacenter-2, VirtualCenterHost: xxxxxxxxxxxxxxxxx]]". fault: "(*types.LocalizedMethodFault)(0xc0004e38a0)({\n DynamicData: (types.DynamicData) {\n },\n Fault: (types.BaseMethodFault) <nil>,\n LocalizedMessage: (string) (len=188) \"Volume with ID xxxxxxxxxxxx is not registered as CNS Volume. Error message: The input volume xxxxxxxxxxxxxxxxxx is not registered as a CNS volume.\"\n})\n". opId: "330d28cf"
vCenter 8.0.3 build-24262322
ESXi 7.0 U3
Column allocated_space is missing from cns.VPX_TABLE after vCenter upgrade from 7.0 U to 8.0 U3.
2024-10-16T00:25:06.445+07:00 info vsanvcmgmtd[46656] [vSAN@6876 sub=CnsSync] Sync ds:///vmfs/volumes/xxxxxxxxxxxxxxx/: startVClock = 10506, fullSync = true
2024-10-16T00:25:06.552+07:00 info vsanvcmgmtd[46656] [vSAN@6876 sub=CnsSync] Volume xxxxxxxxxxxxxx at vclock -1 is missing in a full sync result at vclock 1, deleting this stale entry
2024-10-16T00:25:06.553+07:00 info vsanvcmgmtd[46656] [vSAN@6876 sub=Default] [VdbSchemaLoader::LookupSchemaFromDB] Loaded cns schema and index information from DB
2024-10-16T00:25:06.553+07:00 error vsanvcmgmtd[46656] [vSAN@6876 sub=CnsSync] DB Error while deleting volume xxxxxxxxxxxxxx: Column ALLOCATED_SPACE does not exist in Table Defintion of table volume_info
2024-10-16T00:25:06.553+07:00 info vsanvcmgmtd[46656] [vSAN@6876 sub=CnsSync] Volume xxxxxxxxxxxx at vclock -1 is missing in a full sync result at vclock 1, deleting this stale entry
2024-10-16T00:25:06.562+07:00 info vsanvcmgmtd[46656] [vSAN@6876 sub=CnsSync] Record out-of-band delete/vMotion xxxxxxxxxxxxxxxxx in DB
Take an offline snapshot of vCenter appliance (or all vCenters in ELM environment) before performing database changes.
Truncate the cns.VPX_TABLE to refill it with the proper information and restart of the vsan health service following the below detailed steps.
TRUNCATE TABLE cns.VPX_TABLE;
vmon-cli -r vsan-health
SELECT * from cns.VPX_TABLE;