Subscribe Now

  • Twitter
  • Facebook Social Icon

Copyright © 2019 nukescloud

  • Arun Nukula

Manually deleting a directory in vRA 7.x


There might be situations where you would not be able to delete directory from vRA portal

Recently, was working on a issue where vRA directory deletion process throws an exception

First thing what come to one's mind when it's a vIDM or Directory Services issue in vRA is to check horizon.log

Checking horizon.log , did see following exception

2018-03-16 03:11:15,121 ERROR (Thread-132) [vsphere.local;3f2680e5-99e4-457d-a080-e3b692c9fd62;10.2.14.176;] com.vmware.horizon.connector.management.DirectoryConfigOperationsImpl - Directory Delete Exception :d025cfc3-3949-4c4b-b630-1beb4b7170bd

com.vmware.horizon.common.api.components.exceptions.GroupDeleteException: group.delete.error

at com.vmware.horizon.components.authorization.GroupServiceImpl.deleteGroupsByUserStore(GroupServiceImpl.java:1004)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.springframework.aop.support.AopUtils.invoke

vRA UI states it's System Exception and contact System Administrator

We did resolve this issue by connecting to database and manually removing the config

Pre-Requisites

Before you do this ensure you have a valid snapshot and a recent backup of vRA Postgres database. Click here to learn how to take backup of vPostgres vRA database

  1. Once you have satisfied all pre-requisites , take ssh to vRA appliance2

  2. . Connect to vRA database

  3. Execute su - postgres /opt/vmware/vpostgres/current/bin/psql vcac

  4. Now change schema to "saas" so that vIDM tables can be accessed

  5. set schema 'saas';

  6. Find idOrganization and domain name

  7. Select * from "Organizations";

  8. Select * from "Domain";

  9. DELETE from “GroupParent” where “groupUuid” in ( select “uuid” from “Group” where “idOrganization” = ‘<id_organization>’ and “domain” = ‘<domain>’);

  10. DELETE FROM “UserGroup” where “idGroup” in ( select id from “Group” where “idOrganization” = '<id_organization>' and “domain” = ‘<domain>’);

  11. DELETE from “Group” where “idOrganization” = '<id_organization>' and “domain”=‘<domain>’;

  12. update “DirectoryConfig” set “deleteInProgress”=‘f’ where “id”=‘<directory_config_id>’;

  13. Delete directory from UI

Ensure all of these steps are done in a proper manner.

#vRealizeAutomation