Skip to content

Conversation

@marcosdiez
Copy link

@marcosdiez marcosdiez commented Jul 30, 2025

SUMMARY

The plugins vmware_host_iscsi_info and vmware_host_iscsi were assuming there is only one iscsi device. They are now aware that there may be more then one.

That means vmware_host_iscsi_info will return a list of devices instead of only the first it finds. Also for each device, two new fields have been added: model and status.
On the other hand, vmware_host_iscsi could failing unnecessarily if multiple devices existed. This PR solves that as well.

ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME

vmware_host_iscsi_info
vmware_host_iscsi

ADDITIONAL INFORMATION

Since vmware_host_iscsi_info plugin now returns a list of iscsi devices instead of only one, the output has changed, which makes it incompatible with the current version. That being said, since the VmWare host I am working with has more than 10 ISCSI devices, I am not sure any medium size user could go very far with the previous version. Also, I did not change the output drastically. The previous returned object is now inside of a list with possible siblings. So yes, this is a breaking change, but not a horrible one.

…evices

SUMMARY
The plugin `vmware_host_iscsi_info` was assuming there is only one iscsi device.
It's now aware that there may be more then one and hence a list of devices is returned.
Also, for each device, two new fields have been added: `model` and `status`.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
tools/vmware_host_iscsi_info.yml
ADDITIONAL INFORMATION
WARNING: Output of the plugin changed. It's incompatible with the previous version.
@marcosdiez
Copy link
Author

The test is failing with "msg": "ESXi task failed to complete due to: License not available to perform the operation.". I am not sure what to do about that.

…iscsi devices

SUMMARY

Previously, `vmware_host_iscsi` would pick an arbitrary iSCSI device and
expect it's name to match `vmhba_name`,
which means it would only work as expected 100% of the time if there was only one
iSCSI device.

Now we explicitly search for an iSCSI device named `vmhba_name`, so we won't be
fiddling with the wrong device by mistake.

Since there was already this check later in the code (function `check_hba_name`), this means
this plugin was NOT attempting to modify the wrong device. It was just giving an error
and causing an unecessary failture. I.e. this commit is NOT preventing data loss,
for there wasn't any to begin with.
@marcosdiez marcosdiez changed the title fix: vmware_host_iscsi_info now shows information of multiple iscsi devices fix: vmware_host_iscsi_info and vmware_host_iscsi now work with multiple iscsi devices Jul 30, 2025
@marcosdiez
Copy link
Author

Once again, the test is failing with "ESXi task failed to complete due to: License not available to perform the operation.", so... not much I can do about it....

@mariolenz
Copy link
Collaborator

recheck

@mariolenz
Copy link
Collaborator

recheck

@softwarefactory-project-zuul
Copy link

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/88d5a7078a5b40baac146e67099c9e61

✔️ ansible-tox-linters SUCCESS in 5m 35s
✔️ ansible-galaxy-importer SUCCESS in 4m 24s (non-voting)
✔️ build-ansible-collection SUCCESS in 6m 46s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants