Repository navigation
vmware: no error for a host vmk without an IPv4 address - #620
Open
tyderian1978 wants to merge 1 commit into
Open
tyderian1978 wants to merge 1 commit into
tyderian1978 wants to merge 1 commit into
Conversation
A VMkernel interface can have no IPv4 address at all; Dell VxRail hosts' vmk0, for one, carries IPv6 link-local addresses only. vCenter then reports an empty address and subnet mask (vcsim reports none), which became "/" (or "None/None") and logged ERROR: IP address '/' for vmk0 invalid! for every such host on every run. The address was skipped either way; now it is skipped without the error, so a run's errors only show real problems. The interface itself is synced as before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Disclaimer: AI generated, based off the work we're doing with Netbox.
What happens
A VMkernel interface can have no IPv4 address. On Dell VxRail hosts, for example, vmk0 is on VxRail's management network and has only an IPv6 link-local address. vCenter reports its IPv4 address and subnet mask as empty strings, so every run logs, for every such host:
The address is skipped either way; the error only hides real ones, in the log and in anything that counts a run's errors. (vcsim reports the fields as absent, which gives
None/None.)Fix
Skip a vmk's IPv4 entry when it reports no IPv4 address, before the
permitted_subnetscheck. The interface itself is synced as before.Tests
tests/test_vmware_host_vmk_without_ipv4.pyloadstests/fixtures/vcsim/vc001with one host's vmk0 IPv4 address blanked (vcsim has noUpdateVirtualNic), runs the VMware source and checks that nothing is logged as an error for vmk0, that every host still has its vmk0, and that no empty or stale IPv4 address was added. It fails ondevelopmentwithout the change. Full suite: 608 passed, 8 skipped.