/var/log/vmware/applmgmt/PatchRunner.log:[YYYY-MM-DDTHH:MM:SS] wcp:Patch ERROR wcp Failed to apply patch %s! Error: %s.[YYYY-MM-DDTHH:MM:SS] wcp:Patch ERROR wcp Not all patches were applied. Latest applied patch is 1[YYYY-MM-DDTHH:MM:SS] wcp:Patch ERROR vmware_b2b.patching.executor.hook_executor Patch hook 'wcp:Patch' failed.Traceback (most recent call last): File "/storage/updatemgr/software-update4vneeiai/stage/scripts/patches/py/vmware_b2b/patching/executor/hook_executor.py", line 74, in executeHook executionResult = systemExtension(args) File "/storage/updatemgr/software-update4vneeiai/stage/scripts/patches/libs/sdk/extensions.py", line 106, in __call__ result = self.extension(*args) File "/storage/updatemgr/software-update4vneeiai/stage/scripts/patches/libs/sdk/extensions.py", line 123, in _func return func(*args) File "/storage/updatemgr/software-update4vneeiai/stage/scripts/patches/payload/components-script/wcp/__init__.py", line 225, in doPatching doIncrementalPatching(current_version) File "/storage/updatemgr/software-update4vneeiai/stage/scripts/patches/payload/components-script/wcp/__init__.py", line 343, in doIncrementalPatching raise user_errorpatch_errors.UserError: Failed to apply patch roles_groups_users! Error: Role CNS-SUPERVISOR-DATASTORE (id: 1090) not found in VC..[YYYY-MM-DDTHH:MM:SS] WARNING root stopping status aggregation...[YYYY-MM-DDTHH:MM:SS] ERROR __main__ Patch vCSA failed[YYYY-MM-DDTHH:MM:SS] ERROR __main__ Discovery of vCSA patching components failedvar/log/vmware/vpxd-svcs/authz-event.log[YYYY-MM-DDTHH:MM:SS] [tomcat-exec-63 [] INFO AuthorizationService.AuditLog opId=] Action performed by principal(name=VSPHERE.LOCAL\Administrator,isGroup=false):Delete role 1090
[YYYY-MM-DDTHH:MM:SS] [authz-service-1 [] INFO AuthorizationService.AuditLog opId=6477e68b] Action performed by principal(name=VSPHERE.LOCAL\vpxd-3dc5806b-ff79-4ac3-a456-7f7642bfdd66,isGroup=false):Update role Id=1671862448,Name=CNS-SUPERVISOR-DATASTORE,Description=,Tenant=Privileges=nullvCenter Server 8.0 U3
This issue occurs when CNS role is deleted from the vCenter and manually created. This will cause the role ID to be random value and not what is pre-defined in vCenter for the all CNS roles.
ldapsearch -o ldif-wrap=no -LLL -h localhost -b "cn=RoleModel,cn=VmwAuthz,cn=Services,dc=vsphere,dc=local" -s sub -D "cn=Administrator,cn=Users,dc=vsphere,dc=local" -w 'Password' > /var/tmp/role.ldif # 1671862448, RoleModel, VmwAuthz, services, vsphere.localdn: cn=1671862448,cn=RoleModel,cn=VmwAuthz,cn=services,dc=vsphere,dc=localnTSecurityDescriptor:: AQAHhBQAAAA0AAAAAAAAAFQAAAABBgAAAAAABxUAAAA36Q9olfcOpBU NQwPGnOHx9AEAAAEGAAAAAAAHFQAAADfpD2iV9w6kFQ1DA8ac4fEgAgAAAgDAAAUAAAAAEygAMwAG IAEGAAAAAAAHFQAAADfpD2iV9w6kFQ1DA8ac4fH0AQAAABMoADMABiABBgAAAAAABxUAAAA36Q9ol fcOpBUNQwPGnOHxIAIAAAATKAAzAAYgAQYAAAAAAAcVAAAAN+kPaJX3DqQVDUMDxpzh8QACAAAAEy gAMwAGAAEGAAAAAAAHFQAAADfpD2iV9w6kFQ1DA8ac4fEDAgAAABMYADAAAAABAgAAAAAAByAAAAC aAgAAvmwAuthzRolePrivilegeId: System.AnonymousvmwAuthzRolePrivilegeId: System.ReadvmwAuthzRolePrivilegeId: System.ViewvmwAuthzRolePrivilegeId: Datastore.FileManagementvmwAuthzRolePrivilegeId: Datastore.AllocateSpacevmwAuthzRoleVersion: 0vmwAuthzRoleName: CNS-DatastorevmwAuthzRoleDescription:: QWxsb3dzIHBlcmZvcm1pbmcgcmVhZCwgd3JpdGUsIGRlbGV0ZSwg YW5kIHJlbmFtZSBvcGVyYXRpb25zIGluIHRoZSBkYXRhc3RvcmUgYnJvd3Nlci4gobjectClass: topobjectClass: vmwAuthzRolecn: 1671862448/usr/lib/vmware-wcp/csi-roles.xml has the CNS roles with the role IDs that are pre-defined.ldapdelete -H ldap://localhost -D "cn=administrator,cn=users,dc=vsphere,dc=local" -w "<password>" "cn=-1671862448,cn=RoleModel,cn=VmwAuthz,cn=services,dc=vsphere,dc=local"# cat <<EOF >>/usr/lib/vmware-wcp/py-modules/roles.pyimport featureStatefrom roles_groups_users_utils import Authzif __name__ == "__main__": authz_patch = Authz()authz_patch.ensure_roles_exist('/usr/lib/vmware-wcp/csi-roles.xml')csi-roles.xml instead of roles.xml