Bug 1467989 - Unable to delete VirtualCenter Datastore, sub-resource validation check
Summary: Unable to delete VirtualCenter Datastore, sub-resource validation check
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: cfme-future
Assignee: Harpreet Kataria
QA Contact: Mike Shriver
URL:
Whiteboard: ui:infra:datastore:vsphere
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-05 17:58 UTC by Mike Shriver
Modified: 2020-04-14 03:52 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-07 22:07:52 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screenshot of the Datastore Details Page with disabled Configuration Option (171.07 KB, image/png)
2017-07-05 17:58 UTC, Mike Shriver
no flags Details

Description Mike Shriver 2017-07-05 17:58:16 UTC
Created attachment 1294682 [details]
Screenshot of the Datastore Details Page with disabled Configuration Option

Description of problem:
Datastore delete validation is incorrectly applied. I am unable to delete a datastore that only shows VM template relationships, which cannot be removed.

After removing the VMs and Hosts from a virtualcenter datastore (vsphere55 in testing), the COnfiguration dropdown option to delete the datastore is disabled, with alt-test stating it cannot have any VM/Host associations.


Version-Release number of selected component (if applicable):
Behavior is present in both active CFME streams:
5.8.1.0
5.7.3.2

How reproducible:
100%

Steps to Reproduce:
1. Configure Virtual Center provider with a datastore that has associated Hosts and VMs
2. Note the datastore cannot be deleted while the associations are present
3. Remove datastore hosts and vms from the VMDB (not delete from provider, just remove in CFME)
4. Navigate to the details page for the datastore that was just 'cleared' of its associated resources.


Actual results:
Note that the Configuration option, 'Remove Datastore', is never enabled even when the 'Relationships' table shows 0 for all elements other than 'Managed VM Templates' (which cannot be removed).

Expected results:
The configuration option to remove the datastore is enabled once the VM and host counts for the selected datastore are 0

Additional info:

Comment 4 Mike Shriver 2017-07-24 14:00:07 UTC
Harpreet,

As stated in the original PR description, CFME doesn't support removing these VM Templates. I can view them, but am unable to make any changes.

Is this included in the design? Once there are VM Template relationships on the provider, it becomes impossible to affect the datastore configuration through CFME?

Comment 5 Harpreet Kataria 2017-11-07 22:07:52 UTC
Mike,

That is correct, by design Datastore can not be deleted if they have any Hosts or VM/Templates associated with them. All other operations such as Smartstate Analysis, tagging, timelines etc should be available depending upon user's RBAC access.

Closing this BZ as not a bug.

Thanks,
~Harpreet

Comment 6 Mike Shriver 2017-11-08 13:52:29 UTC
I understand the design of subresource validation.

You're telling me it is intentional that once a datastore is added, if it has templates, those templates cannot be removed, and the customer has to go to the provider directly to clear these sub resources?  As a user this looks like an oversight in the design.

If that's the case, I'll be opening an RFE to allow for removing these templates.  If that wasn't the original intent then I still think this is an actual bug.


Note You need to log in before you can comment on or make changes to this bug.