Skip to content

Fix drift and update failures for adopted edge transport nodes - #2241

Open
ksamoray wants to merge 1 commit into
vmware:branch_3122from
ksamoray:b3122/fix/2198-adopted-etn-drift
Open

Fix drift and update failures for adopted edge transport nodes#2241
ksamoray wants to merge 1 commit into
vmware:branch_3122from
ksamoray:b3122/fix/2198-adopted-etn-drift

Conversation

@ksamoray

Copy link
Copy Markdown
Contributor

Summary

  • node_id-adoption ConflictsWith advanced_configuration, credentials, form_factor and management_interface, so config for an adopted node never sets them. Read still populated all of them unconditionally from the API, showing permanent spurious drift on every plan; form_factor additionally carries a static schema Default that would keep re-asserting itself even with Read fixed, so it needs a DiffSuppressFunc instead.
  • More seriously, Update always rebuilt the request body from config via policyEdgeTransportNodePatch, same as a freshly created node. For an adopted node that sends an empty management_interface, which NSX rejects as missing required fields on any update — including one only triggered by the spurious drift above. Route Update through the same GET-then-merge policyEdgeTransportNodePredeployedPatch that Create already uses for adoption.

Test plan

  • go build ./...
  • go vet ./...
  • gofmt -l . (clean)
  • golangci-lint run ./nsxt/ (0 issues)

Note: master's source PR added mock-based regression tests, which this branch has no framework for (no utgomock_* infrastructure here); the production fix is otherwise a direct, unmodified port.

@ksamoray
ksamoray requested a review from a team August 20, 2026 17:03
@ksamoray

Copy link
Copy Markdown
Contributor Author

/test-all

@ksamoray
ksamoray force-pushed the b3122/fix/2198-adopted-etn-drift branch from bda3c74 to 9bd2604 Compare September 3, 2026 09:49
node_id-adoption ConflictsWith advanced_configuration, credentials,
form_factor and management_interface, so config for an adopted node
never sets them. Read still populated all of them unconditionally
from the API, showing permanent spurious drift on every plan;
form_factor additionally carries a static schema Default that would
keep re-asserting itself even with Read fixed, so it needs a
DiffSuppressFunc instead.

More seriously, Update always rebuilt the request body from config
via policyEdgeTransportNodePatch, same as a freshly created node. For
an adopted node that sends an empty management_interface, which NSX
rejects as missing required fields on any update - including one
only triggered by the spurious drift above. Route Update through the
same GET-then-merge policyEdgeTransportNodePredeployedPatch that
Create already uses for adoption.
@ksamoray
ksamoray force-pushed the b3122/fix/2198-adopted-etn-drift branch from 9bd2604 to 160a048 Compare September 8, 2026 10:49
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.

1 participant