Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vmware_host_vmnic_info: Fix issue with offline / disconnected / shut down hosts #1337

Conversation

mariolenz
Copy link
Collaborator

SUMMARY

vmware_host_vmnic_info breaks if a host is offline / disconnected / shut down.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

vmware_host_vmnic_info

ADDITIONAL INFORMATION

this comment

@softwarefactory-project-zuul
Copy link

@softwarefactory-project-zuul
Copy link

@mariolenz
Copy link
Collaborator Author

recheck

@softwarefactory-project-zuul
Copy link

@mariolenz mariolenz changed the title [WIP] vmware_host_vmnic_info: Fix issue with offline / disconnected / shut down hosts vmware_host_vmnic_info: Fix issue with offline / disconnected / shut down hosts Jun 2, 2022
@mariolenz
Copy link
Collaborator Author

@anxstj Could you please test this PR? I hope it fixes the issue with vmware_host_vmnic_info you've mentioned in #318.

@anxstj
Copy link

anxstj commented Jun 2, 2022

Yes, it fixes the issue. Great.

This is the result I get if the host is powered-off:

"hosts_vmnics_info": {
            "test-esx0103.test01.dev": {
                "all": [
                    "vmnic0",
                    "vmnic1",
                    "vmnic2",
                    "vmnic3"
                ],
                "available": [
                    "vmnic2",
                    "vmnic3"
                ],
                "dvswitch": {
                    "dvs.test": [
                        "vmnic0",
                        "vmnic1"
                    ]
                },
                "num_vmnics": 4,
                "used": [
                    "vmnic0",
                    "vmnic1"
                ],
                "vmnic_details": [
                    {
                        "actual_duplex": "Full Duplex",
                        "actual_speed": 10000,
                        "adapter": "VMware Inc. vmxnet3 Virtual Ethernet Controller",
                        "configured_duplex": "Full Duplex",
                        "configured_speed": 10000,
                        "device": "vmnic0",
                        "driver": "nvmxnet3",
                        "lldp_info": "N/A",
                        "location": "0000:0b:00.0",
                        "mac": "00:50:56:bb:ca:fd",
                        "status": "Connected"
                    },
                    {
                        "actual_duplex": "Full Duplex",
                        "actual_speed": 10000,
                        "adapter": "VMware Inc. vmxnet3 Virtual Ethernet Controller",
                        "configured_duplex": "Full Duplex",
                        "configured_speed": 10000,
                        "device": "vmnic1",
                        "driver": "nvmxnet3",
                        "lldp_info": "N/A",
                        "location": "0000:13:00.0",
                        "mac": "00:50:56:bb:c2:32",
                        "status": "Connected"
                    },
                    {
                        "actual_duplex": "N/A",
                        "actual_speed": "N/A",
                        "adapter": "VMware Inc. vmxnet3 Virtual Ethernet Controller",
                        "configured_duplex": "Auto negotiate",
                        "configured_speed": "Auto negotiate",
                        "device": "vmnic2",
                        "driver": "nvmxnet3",
                        "lldp_info": "N/A",
                        "location": "0000:1b:00.0",
                        "mac": "00:50:56:bb:16:a2",
                        "status": "Disconnected"
                    },
                    {
                        "actual_duplex": "N/A",
                        "actual_speed": "N/A",
                        "adapter": "VMware Inc. vmxnet3 Virtual Ethernet Controller",
                        "configured_duplex": "Auto negotiate",
                        "configured_speed": "Auto negotiate",
                        "device": "vmnic3",
                        "driver": "nvmxnet3",
                        "lldp_info": "N/A",
                        "location": "0000:04:00.0",
                        "mac": "00:50:56:bb:e4:0d",
                        "status": "Disconnected"
                    }
                ],
                "vswitch": {}
            }
        }

@mariolenz
Copy link
Collaborator Author

Yes, it fixes the issue.

Good news, thanks for testing @anxstj!

@mariolenz mariolenz added bug This issue/PR relates to a bug integration tests/integration owner_pr PR created by owner/maintainer mergeit labels Jun 2, 2022
@softwarefactory-project-zuul
Copy link

Build succeeded (gate pipeline).

✔️ ansible-tox-linters SUCCESS in 4m 27s
✔️ build-ansible-collection SUCCESS in 4m 27s
✔️ ansible-test-sanity-docker-stable-2.13 SUCCESS in 8m 51s
✔️ ansible-test-units-community-vmware-python38 SUCCESS in 5m 41s
✔️ ansible-galaxy-importer SUCCESS in 3m 53s

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit a39d1af into ansible-collections:main Jun 2, 2022
@mariolenz mariolenz deleted the vmware_host_vmnic_info_disconnected branch June 2, 2022 15:28
mariolenz added a commit to mariolenz/community.vmware that referenced this pull request Jun 6, 2022
softwarefactory-project-zuul bot pushed a commit that referenced this pull request Jun 7, 2022
Backport PR #1337 to stable-1

SUMMARY
Backport PR #1337 to stable-1.
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
vmware_host_vmnic_info
ADDITIONAL INFORMATION
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug integration tests/integration mergeit owner_pr PR created by owner/maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants