Project

General

Profile

Bug #72957

Remove duplicate datastore entries from vm-snapshot in WebGUI

Added by Joshua Sirrine over 1 year ago. Updated over 1 year ago.

Status:
Done
Priority:
No priority
Assignee:
Waqar Ahmed
Category:
Middleware
Severity:
Low Medium
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
BUM-982-66500
Hardware Configuration:
ChangeLog Required:
Yes

Description

In the WebGUI of TrueNAS 11.1-U6.3 we get the attached screenshot. The duplicate names seem to be because the vcenter server is reporting the same datastore on multiple ESXi hosts and we aren't removing the duplicates. Please fix this so the list excludes duplicates.

Also please sort the list alphabetically for easier navigation.

Marking as public so the affected customer can monitor the progress of this issue.

Note: This used to not be a problem, so I'm guessing that ESXi has changed their responses to API queries to include all of the esxi hosts and datastores without considering the fact that duplicates may exist.

datastores vmware snapshot.jpg (42.7 KB) datastores vmware snapshot.jpg Joshua Sirrine, 01/30/2019 05:40 PM
51591

Related issues

Copied to FreeNAS - Bug #81480: Improve datastore listing in VMware-SnapshotsReady for Testing
Copied to FreeNAS - Bug #81489: Improve datastore listing in VMware-SnapshotsReady for Testing

Associated revisions

Revision d67b9129 (diff)
Added by Waqar Ahmed over 1 year ago

Improve datastore listing in vmware This commit removes duplicates and sorts the datastores which are fetched for vmware plugin in legacy UI. Ticket: #72957

Revision 607d3da9 (diff)
Added by Waqar Ahmed over 1 year ago

Sort vmware datastore choices This commit adds the following changes: 1) We make sure that there are no duplicates for vmware datastore choices we return. As datastore names are unique under a single vcenter server irrespective of the hosts they are connected, this is safe to implement. 2) Sort datastore choices Ticket: #72957

Revision 762a6340 (diff)
Added by Waqar Ahmed over 1 year ago

Sort vmware datastore choices This commit adds the following changes: 1) We make sure that there are no duplicates for vmware datastore choices we return. As datastore names are unique under a single vcenter server irrespective of the hosts they are connected, this is safe to implement. 2) Sort datastore choices Ticket: #72957

Revision 89ba92d4 (diff)
Added by Waqar Ahmed over 1 year ago

Sort vmware datastore choices This commit adds the following changes: 1) We make sure that there are no duplicates for vmware datastore choices we return. As datastore names are unique under a single vcenter server irrespective of the hosts they are connected, this is safe to implement. 2) Sort datastore choices Ticket: #72957

Revision 0920eaaa (diff)
Added by Waqar Ahmed over 1 year ago

Sort vmware datastore choices This commit adds the following changes: 1) We make sure that there are no duplicates for vmware datastore choices we return. As datastore names are unique under a single vcenter server irrespective of the hosts they are connected, this is safe to implement. 2) Sort datastore choices Ticket: #72957

Revision 55ca3bb0 (diff)
Added by Waqar Ahmed over 1 year ago

Sort vmware datastore choices This commit adds the following changes: 1) We make sure that there are no duplicates for vmware datastore choices we return. As datastore names are unique under a single vcenter server irrespective of the hosts they are connected, this is safe to implement. 2) Sort datastore choices Ticket: #72957

Revision 831a9a30 (diff)
Added by Waqar Ahmed over 1 year ago

Sort vmware datastore choices This commit adds the following changes: 1) We make sure that there are no duplicates for vmware datastore choices we return. As datastore names are unique under a single vcenter server irrespective of the hosts they are connected, this is safe to implement. 2) Sort datastore choices Ticket: #72957

Revision 7954c68b (diff)
Added by Waqar Ahmed over 1 year ago

Sort vmware datastore choices This commit adds the following changes: 1) We make sure that there are no duplicates for vmware datastore choices we return. As datastore names are unique under a single vcenter server irrespective of the hosts they are connected, this is safe to implement. 2) Sort datastore choices Ticket: #72957

Revision 4b2dab59 (diff)
Added by Waqar Ahmed over 1 year ago

Sort vmware datastore choices This commit adds the following changes: 1) We make sure that there are no duplicates for vmware datastore choices we return. As datastore names are unique under a single vcenter server irrespective of the hosts they are connected, this is safe to implement. 2) Sort datastore choices Ticket: #72957

Revision 33415024 (diff)
Added by Waqar Ahmed over 1 year ago

Sort vmware datastore choices This commit adds the following changes: 1) We make sure that there are no duplicates for vmware datastore choices we return. As datastore names are unique under a single vcenter server irrespective of the hosts they are connected, this is safe to implement. 2) Sort datastore choices Ticket: #72957

Revision 90dc1acd (diff)
Added by Waqar Ahmed over 1 year ago

Sort vmware datastore choices This commit adds the following changes: 1) We make sure that there are no duplicates for vmware datastore choices we return. As datastore names are unique under a single vcenter server irrespective of the hosts they are connected, this is safe to implement. 2) Sort datastore choices Ticket: #72957

Revision fdba7412 (diff)
Added by Waqar Ahmed over 1 year ago

Sort vmware datastore choices This commit adds the following changes: 1) We make sure that there are no duplicates for vmware datastore choices we return. As datastore names are unique under a single vcenter server irrespective of the hosts they are connected, this is safe to implement. 2) Sort datastore choices Ticket: #72957

Revision b3ac70bf (diff)
Added by Waqar Ahmed over 1 year ago

Sort vmware datastore choices This commit adds the following changes: 1) We make sure that there are no duplicates for vmware datastore choices we return. As datastore names are unique under a single vcenter server irrespective of the hosts they are connected, this is safe to implement. 2) Sort datastore choices Ticket: #72957

History

#1 Updated by Joshua Sirrine over 1 year ago

  • Seen in set to TrueNAS 11.1-U6.3

#2 Updated by Dru Lavigne over 1 year ago

  • Category changed from GUI (new) to Middleware
  • Assignee changed from Bill O'Hanlon to William Grzybowski
  • Target version changed from Backlog to 11.1-U8

#3 Updated by William Grzybowski over 1 year ago

  • Assignee changed from William Grzybowski to Waqar Ahmed
  • Severity changed from New to Low Medium

#4 Updated by Bug Clerk over 1 year ago

  • Status changed from Unscreened to In Progress

#5 Updated by Waqar Ahmed over 1 year ago

  • Status changed from In Progress to Blocked
  • Reason for Blocked set to Need additional information from Author

Hello Joshua, so i have gone through how we retrieve the list currently and it seems that this is not how it looks. The datastores being retrieved are from different esxi hosts meaning that they would not be exact duplicates ( if i am not wrong ? ). This brings us to the question that we can't identify datastores by their names only as it wouldn't be unique among different esxi hosts. We should store the esxi host as well with the name so we can target the correct esxi host with datastore. Could you please verify this or maybe tell me a little more about the setup of the esxi hosts and datastores. I can reproduce this and dig further of how to take care of this. Thank you

#6 Updated by Joshua Sirrine over 1 year ago

I'm not sure why we can't use the datastore names. If you have ESXi1 with a datastore named 'Test' and you mount that store on ESXi2, it will get the same name. I just tested renaming a datastore on one host, and the other hose picked up the new name on a rescan.

Changed the name:
2019-03-06T00:00:13.146Z cpu0:34136 opID=7632de90)HBX: 4164: 1 stale HB slot(s) owned by me have been garbage collected on vol 'Test_Test'
2019-03-06T00:00:13.179Z cpu0:34136 opID=7632de90)Vol3: 2909: 'Test_Test_Z20' (FS 5c7ef126-68660855-8f9f-000c2963f70e): FS rename succeeded, was Test_Test

Name showed up on other ESXi host:
2019-03-06T00:01:49.924Z cpu9:2103789)Vol3: 2545: vol 'Test_Test': Filesystem name change detected. New name: 'Test_Test_Z20'.

This is also going to be more confusing if we're connecting to a vcenter server that has a cluster of ESXi hosts (which is the common configuration for most of our TrueNAS users).

We should store the esxi host as well with the name so we can target the correct esxi host with datastore.

That is not an option if they are a cluster of ESXi hosts. That's why we let people connect to vcenter servers instead of esxi hosts. Then vcenter is supposed to do the heavy work and figure this stuff out. Also, as I demonstrated above, they should all have the same name because of how vmfs works.

Could you please verify this or maybe tell me a little more about the setup of the esxi hosts and datastores.

I'm not sure what you want to know. They have a vcenter server with several esxi hosts connected to it. The ESXi hosts all use storage from the TrueNAS, and a given datastore has a given name among all hosts. Unfortunately, the WebGUI of the TrueNAS lists multiple entries for what appears to be the same datastore, confusing the end-user, and making them question if this is even working properly. I presume its seeing each esxi host as a different datastore, which shouldn't be happening if they are all connecting to the same vcenter server.

If the TrueNAS is connecting to an esxi host specifically, there is no room for this bug ticket to apply as there is no way you can have a single esxi host with multiple datastores with the same name. ESXi does not allow that.

Does that clarify anything? If not we can do a phone call and I'll try to explain.

#7 Updated by Waqar Ahmed over 1 year ago

Thank you Joshua for the explanation. Yes that clarifies a lot of things. I have read a few docs on datastores as well and please confirm if the following findings are accurate:

1) Datastore names are unique under a single vcenter server.
2) When we have a vcenter server, same datastore can be used with more then one esxi host
3) Datastores are a separate entity and we can't have same names for datastores even when we talk about them being used with different hosts under a single server of course - ( meaning if we have same name of a datastore among different hosts, that means that it is only a single datastore which is being pointed at and is being used by multiple esxi hosts )
4) Reflecting on the above points, this means that a datastore name is enough to solely identify and use a datastore irrespective of the fact that the same datastore might be being used by different hosts ( it is still the same ).

I think we are on the same page, but for assurance please confirm if the above points are correct, and if yes, i'll have the necessary changes made to accommodate this. Thank you

#8 Updated by Waqar Ahmed over 1 year ago

Hello Joshua.
Just a reminder, please have a look at my earlier comment when you have some time.
Thank you

#9 Updated by Bug Clerk over 1 year ago

  • Copied to Bug #81480: Improve datastore listing in VMware-Snapshots added

#10 Updated by Bug Clerk over 1 year ago

  • Copied to Bug #81489: Improve datastore listing in VMware-Snapshots added

#11 Updated by Bug Clerk over 1 year ago

  • Status changed from Blocked to Ready for Testing

#12 Updated by Bug Clerk over 1 year ago

  • Target version changed from 11.1-U8 to 11.3-BETA1

#13 Updated by Dru Lavigne over 1 year ago

  • Status changed from Ready for Testing to Done
  • Target version changed from 11.3-BETA1 to Master - FreeNAS Nightlies
  • Reason for Blocked deleted (Need additional information from Author)
  • Needs QA changed from Yes to No
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

Also available in: Atom PDF