I encounter a problem when I try to delect a custom resources in advanced services.
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
After I provisioned a datacenter, I tried to delete the custom resource(name-Create DC, type-VC:Datacenter) which is associated with ASD blueprint create a datacenter, but I failed with the error ---A service blueprint or a resource action is associated with this custom resource. You cannot delete a custom resource associated with a service blueprint or a resource action.
So I unselected the Create DC from Provisioned Resource of service blueprint-create a datacenter and leave the drop-text no provisioning, then tried to delete custom resource again, but still met an error:Service not found. If the problem persists, contact your system administrator.
I think I have run into something similar here. I created a custom resource for VC:VirtualMachine and a workflow for deploying a vm. This all worked just fine. Now I have a tab for "vCenter Server" in my items list which shows the vm that I deployed. Now i want to remove that item but I don't see how I do this. Do I add a custom action for deletion? Can I just delete the vm through vCenter and expect that vCAC will see it no longer exists and will remove it from my items list?
OK... so what will happen if I go into vCenter and delete the vm manually? Will vCAC detect that item was removed? It sounds like it won't but I figured I would check. It is annoying because now I have this "vCenter Server" category on the item screen which is highlighted when I login as any user and it has nothing listed. I have to click on the "Machines" category to see my IaaS systems that were deployed. It threw me off at first. Is there any way to get rid of that item category or is that all part of this missing feature which is coming in 6.1?
so can you confirm that for the current version of vcac (6.0.1) there is no "recommended" way to delete a custom resource object from the "my items" list (or - in other words - to mark a custom resource vcac entity as deleted)?
If so, the only possible way atm would probably be editing the vcac database directy, right?
You are right. There is no recommended way to delete an item in My Items when we talk about a provisioned item form vCO (in vCAC 6.0.1). That issue is because of the cache in some of the vCO plugins. If the plugins that you are using do not have enabled caching, you will not have dead records in My Items.
Interesting. Do you maybe have some docs that i could look up that talk about how vco / vcac caching is related to eachother? I'm not quite sure what the vCO cache is used for or how it affects the vCAC entities. I'm using a custom plugin with custom types created - so i could disable caching if that would help. However, I'm not sure what it will cause.
Unfortunately I do not have a doc for that. The issue appears when right after a resource action execution, the vCAC asks vCO if a resource still exists. When plugin caching is enabled, sometimes the response is positive (not updated cache) even that the resource does not exist.
I see. So vCAC IS checking if a item exists after every action run? This means that, if i re-run the delete operation from vcac for the (within the vco inventory already deleted) item it should handle it and remove it from the item list? or atleast after restarting vco (== flushing the cache) and then vcac (== reload all items from vco) the items should be gone?
In the meantime I just did a search for "plugin caching" and found nothing about it 😕 Can you point me to the spring class that's handling the object caching?
I was able to sucessfully test the behaviour. When running a second workflow (which basicly does nothing and thus will always run successful) on the custom resource after the delete workflow, then the entity will be removed from the item list.
So, it really is related to the caching. However: within the plugin I never implemented a custom caching as mentioned in the vCO Plugin Dev Guide. I guess that vCO is using some "default" caching. Can you provide any information about how to disable that using the Spring vCO Plugin configuration?
Ok, thanks - I will watch this thread for any answers since disableing the cache would probaby be the best way to do it (also I'm quite interested what classes do handle that).
However, I guess for the most folks this wont work since they don't have a custom plugin nor can they control the caching and vcac 6.1 may still take some time to arrive. So here a quick and dirty solution that works for me:
You may add the vCAC PostGre SQL Database to the vCO SQL Plugin and then you may use the "__asd_targetResourceInternalId" send with every request from vCAC to vCO to mark the vCAC entity as deleted after you deleted the real resource from vCOs inventory.
Such a query may look like this: "UPDATE cat_resource SET status='DELETED' WHERE id='" + __asd_targetResourceInternalId + "';";
Don't try to really delete the DB entry since it would probaby mess up your database. Hope that helps anyone who comes around.
Also it would be quite interesting how vCAC is able to find the accosiated vCO resource. I searched the vCAC and vCO database dump for the unique ID used by vCAC (later on passed as __asd_targetResourceInternalId) and the unique object id used by vCO for it's inventory objects. There seems to be no way to find the vCO resource only given the vCAC resource and vise versa - so I'm wondering what's the trick here. How does vCAC uniquely reference a vCO object?
I'm running vCAC 6.1 and running into this exact problem. I created a custom resource and assigned it to a service blueprint for post-provisioning. I now have items showing up in my items list added from this service blueprint. How do I delete these items from the list? I can't find a workflow to do it or figure out which table in the database has these entries so I can manually purge.
This worked for me using pgAdmin to browse and identify the resources by hand, and then target them for deletion by id using the update method.
Thanks for taking the time to post this!