Skip to content

Conversation

@helsaawy
Copy link
Contributor

Currently, the DNS domain is used as the DNS search host name inside the LCOW uVM instead of the HCN endpoint's configured search host names (which are ignored).

Append the DNS search field to the DNS domain name, and use the result as the list of host names to configure the LCOW uVM's resolv.conf with.

Replace "internal\guest\network".MergeValues with "github.com/samber/lo".Uniq[Map], which does the same thing.

Replace "internal\guest\runtime\hcsv2".(*namespace).Adapters" with an iterator-aware version ((*namespace).allNICs() iter.Seq2).

Add a dedicated (*namespace).dnsConfig() ([]string, []string) function to iterate over NICs in the namespace and return the resulting search host names and name server addresses to consolidate common logic in "internal\guest\runtime\hcsv2".setup[Sandbox|Standalone]ContainerSpec().

Add tests for generating DNS config from NICs in namespace.

@helsaawy helsaawy requested a review from a team as a code owner January 30, 2026 20:52
Currently, the DNS domain is used as the DNS search host name inside the
LCOW uVM, and the search host names configured on an adapter by HCN are
ignored.

Append the DNS search field to the DNS domain name, and use the
result as the final list of host names to configure the LCOW uVM's
`resolv.conf` with.

Replace `internal\guest\network\network.go:MergeValues` with
`"github.com/samber/lo".Uniq[Map]`, which does the same thing.

Replace `"internal\guest\runtime\hcsv2".(*namespace).Adapters"` with an
iterator-aware version (`(*namespace).allNICs() iter.Seq2`).

Add a dedicated `(*namespace).dnsConfig() ([]string, []string)` function
to iterate over NICs in the namespace and return the resulting search
host names and name server addresses to consolidate common logic in
`"internal\guest\runtime\hcsv2".setup[Sandbox|Standalone]ContainerSpec()`.

Add tests for generating DNS config from NICs in namespace.

Signed-off-by: Hamza El-Saawy <hamzaelsaawy@microsoft.com>
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