Resolve subnet facts from secondary interfaces #557

Merged
benvin merged 1 commits from benvin/subnet-facts-interface-fallback into develop 2026-10-13 21:46:53 +11:00
Member

BinaryLane edge hosts have a public primary IP, so region/environment/country/zone resolve to unknown even though their VPC NIC sits in a known subnet.

  • match the primary IP first, unchanged for existing hosts
  • otherwise scan interface bindings in name order, skipping lo, dum* and wg*
  • add modules/libs/test/subnet_facts_check.rb (ruby modules/libs/test/subnet_facts_check.rb)
BinaryLane edge hosts have a public primary IP, so region/environment/country/zone resolve to unknown even though their VPC NIC sits in a known subnet. - match the primary IP first, unchanged for existing hosts - otherwise scan interface bindings in name order, skipping lo, dum* and wg* - add modules/libs/test/subnet_facts_check.rb (`ruby modules/libs/test/subnet_facts_check.rb`)
unkin-agent added 1 commit 2026-10-13 21:41:35 +11:00
Fall back to interface bindings when the primary IP matches no subnet
ci/woodpecker/pr/yamllint Pipeline was successful
ci/woodpecker/pr/erb-validate Pipeline was successful
ci/woodpecker/pr/puppet-lint Pipeline was successful
ci/woodpecker/pr/ruby-validate Pipeline was successful
ci/woodpecker/pr/bolt-validate Pipeline was successful
ci/woodpecker/pr/epp-validate Pipeline was successful
ci/woodpecker/pr/puppet-validate Pipeline was successful
ci/woodpecker/pr/ruby-check Pipeline was successful
af7f97b5ed
benvin merged commit b1f2fff045 into develop 2026-10-13 21:46:53 +11:00
benvin deleted branch benvin/subnet-facts-interface-fallback 2026-10-13 21:46:53 +11:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/puppet-prod#557