Closed julie-blake-verizon closed 2 years ago
@julie-blake-verizon Thanks for reporting this issue. Could you please do the following command on the esxi_hostname
# ls /vmfs/devices/disks/
This is the core functionality of the module:
The documentation isn't clear to me:
Scans all host bus adapters to obtain the current list of devices and device topology. The RescanAllHba method looks for new devices, removed devices, and path changes.
This method may update the following inventory elements:
- Devices and storage topology (HostSystem.Config.storageDevice).
- VMFS and NFS datastores (HostSystem.Datastore).
- File system volumes (HostSystem.Config.fileSystemVolume).
Scanning for devices and device topology doesn't sound like it scans for filesystems, but since it "may update VMFS and NFS datastores" sounds like it does.
Anyway:
The Server performs asynchronous updates to the inventory. Use the PropertyCollector.WaitForUpdatesEx method to obtain the property changes.
Since the scan or at least the inventory update is asynchronous, we might have to somehow wait for it to finish so later tasks can work with the new devices / datastores. Otherwise, they might run before the asynchronous scan finished.
It isn't working no matter how long I wait. I commented out the second part and just waited, and it didn't come up after 10 minutes. If I look in the vCenter Recent Tasks display during the ansible code run, it shows a task running "Rescan all HBAs", but no "Rescan VMFS" task ever starts.
@julie-blake-verizon Thanks for reporting this issue. Could you please do the following command on the
esxi_hostname
# ls /vmfs/devices/disks/
@julie-blake-verizon ^^^
Now, there is a module to gather information about the SCSI disk attached to the given ESXi - https://github.com/ansible-collections/community.vmware/blob/main/plugins/modules/vmware_host_iscsi_info.py.
@julie-blake-verizon This issue is waiting for your response. Please respond or the issue will be closed.
cc @Tomorrow9 @goneri @lparkes @michaeldeaton @pgbidkar @warthog9 click here for bot help
Its missing the line:
host.configManager.storageSystem.RescanVmfs()
after:
host.configManager.storageSystem.RescanAllHba()
@julie-blake-verizon You have not responded to information requests in this issue so we will assume it no longer affects you. If you are still interested in this, please create a new issue with the requested information.
Please consider reopening this issue. I can confirm the behavior @julie-blake-verizon is describing and can verify it in my own environment. Additionally I can confirm, that the patch @ghernandeza proposed in https://github.com/ansible-collections/community.vmware/issues/479#issuecomment-829119631 is working.
thank you for reopening. I created a pull request to adress this --> https://github.com/ansible-collections/community.vmware/pull/1137
I think this issue has been resolved by #1137. Please re-open it or open a new one if you think otherwise.
SUMMARY
The module vmware_host_scanhba seems to be missing the option to "Scan for new VMFS Volumes". When a host is added to an existing cluster, all the storage already has VMFS volumes, but using vmware_host_scanhba , even with refresh_storage: True does not see the datastores.
From the vCenter GUI: Rescan Storage [check mark] Scan for new Storage Devices Rescan all host bus adapters for new storage devices. Rescanning all adapters can be slow. Scan for new VMFS Volumes [check mark] Rescan all known storage devices for new VMFS volumes that have been added since the last scan. Rescanning known storage for new file systems is faster than rescanning for new storage.
ISSUE TYPE
COMPONENT NAME
vmware_host_scanhba
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
vCenter 6.7.0.42000, VMware ESXi, 6.7.0, 14320388
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS
Doesn't find the storage volumes and then the next step, which ensures that the datastores DO exist, fails.