VMware Cloud Community
WenshengLiu
Contributor
Contributor

can not delete Custom Resources in Advanced Services

Hi, All,

I encounter a problem when I try to delect a custom resources in advanced services.

Initially,

1。 I created Custom Resources named: Create DC, type:VC:datacenter

2。 Created a service blueprints named create datacenter with workflow (external vCO 5.5) - create a datacenter,provisioned resource with the above custom resources and published it.

3。created a service at Administration named test, add published service blueprints as catalog items.

4, created entitlements, add service:test, catalog items:create datacenter

5, I used Catalog request to create a datacenter OK

Then, I try to clear all of the service and its custom resources

1. I removed provisioned resource in service blueprints for create datacenter

2. delete any relational items in Administrator: services, entitlements...

3 try to delete custom resources : Create DC ,

but recevice an error :Service not found. If the problem persists, contact your system administrator.

Is there anyone can help me? tks

25 Replies
JCOEN
Enthusiast
Enthusiast

Thanks Jesse.

Can you point me in the direction of where in the DB these would be? I've connected to the database with pgAdmin, but nothing is sticking out to me as far as where to look after that.

0 Kudos
jlholbrook
Enthusiast
Enthusiast

I launched pgAdmin, connected to the vCAC postgres database instance on port 5432.

From there I browsed to the vcac database, in my case vcacdb01, then schemas -> public -> tables.

pgAdmin.PNG

Find the cat_resource table, and right-click to select View Data, then view top 100 rows.

View-data.PNG

From there, I browsed the data to collect the IDs of items that were listed in vCAC, in my case, AWS resources.(check the name column to help in identifying)

edit-data.PNG

From there, I followed the previous advice and updated the suspect items to a status of DELETED for the status column. You can do this using the following command once you identify the IDs you'd like to update:

Update cat_resource SET status='DELETED' WHERE id='66e651e6-bce6-4859-886d-44fcc33c83aa';

runsql.PNG

Hope this helps, and remember I don't work for VMware, so I can't speak to the impact on your support agreement or issues this change may cause.

0 Kudos
JCOEN
Enthusiast
Enthusiast

Jesse,

Thanks for the detailed breakdown. The missing piece for me was the cat_resource table. I was looking at all the work_item* tables, in an effort not to have to view all 125 tables to find what I was looking for ;-). Thanks again Jesse!

-Josh

0 Kudos
rszymczak
Hot Shot
Hot Shot

With vCAC 6.1 there is no need for manually deleting using PostGres  (as it was in 6.0.1). You can just create a new custom action (e.g. "delete my custom object") and tick the "delete resource" checkbox when specifing the action. The workflow you add to that action should take the object type you want to delete as input parameter and should be automaticly filled out by vCAC when running the action (== day 2 operation) on the provisioned custom object.

This will do whatever you want in vCO (e.g delete the vCO object) and mark the item as deleted from the vCAC database.

Oh, btw. I found out how vCAC (6.0.1) does reference the vCO objects: from the vCAC object you can use the request-id to find the link to the request object where you will find the external id - which is the vco object uuid (if I remember correctly - 2 months passed since I found out how the db model worked. However, I still remember it's done by using the request - if you check the tables you'll find it quickly)

jlholbrook
Enthusiast
Enthusiast

In our case, we attempted to remove the item cleanly using a resource action. During development efforts however we were left with a few ghost items that could not be delete in this manner. We did upgrade this environment from 6.0.1 to 6.1, and this could potentially explain the issue. Regardless, this was helpful for us to clean up prior to client demos.

Thanks for the additional information rszymczak!

0 Kudos
JCOEN
Enthusiast
Enthusiast

Very cool. Thank you for posting this, works like a charm!

0 Kudos