Skip to content

VMware: missing guest IP data is treated as removal, then pruned #643

Backlog

Description

@berlikm

When VMware Tools are not running, or guest.net is missing or empty, IP handling for that VM is skipped. The addresses stay assigned for that pass, but they were not seen, so they are tagged orphaned. After prune_delay_in_days they are deleted. An interface delete can take the addresses with it.

A NIC that Tools report with an empty address list is a different case. That is still a removal, and it should stay one. It is a policy choice: Tools can hand back a short list.

The same path goes wrong once more than one report of an address is involved:

  • The address can be moved off its current VM before that VM's source has said whether the address is still there. Which source runs first decides the result. Marking the old observation unknown afterwards does not put the address back.
  • An empty NIC holds a removal. If that source later reports the address on the same NIC, the earlier hold can still be written. confirmed_by also keeps the earlier confirmation after a later empty NIC, so a new VM that reports the address is rejected and the old assignment is removed instead.
  • With two interfaces asking for the address, the one processed last can win. The old primary IPv4 can be queued for removal even when the address is left where it was.
  • An unassigned duplicate can be claimed while another record of the same address, in the same VRF, is already assigned.
  • A synced address with no source tag can be removed by a source other than the one tagged on its parent. Several configured source tags on one device (VMware and Redfish on the same ESXi host) are treated as a conflict.

I want the assignment and the primary IP kept until the source that holds the address has given a trustworthy report that it is gone, and the same result whichever source is processed first.

Activity

  1. berlikm commented on Nov 28, 2026

    @berlikm
    ContributorAuthor

    The pull request now also covers the cases found while fixing this:

    • an address still assigned to an absent VM is orphaned with that VM
    • a skipped report is kept as a claim, and one interface becoming assignable does not take the address while another claim remains
    • an address on an absent VM with no Source: tag waits until every report in the run is in
    • if that VM is found later in the same run and Tools are unavailable, the address and the primary stay, in either order

    #644

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions