diff --git a/hack/release.toml b/hack/release.toml index b82bb8a62..088453bf9 100644 --- a/hack/release.toml +++ b/hack/release.toml @@ -52,6 +52,13 @@ This feature can be enable by using [SwapVolumeConfig](https://www.talos.dev/v1. title = "VMware" description = """\ Talos VMWare platform now supports `arm64` architecture in addition to `amd64`. +""" + + [notes.azure] + title = "Azure" + description = """\ +Talos on Azure now defaults to MTU of 1400 bytes for the `eth0` interface to avoid packet fragmentation issues. +The default MTU can be overriden with machine configuration. """ [make_deps] diff --git a/internal/app/machined/pkg/runtime/v1alpha1/platform/azure/azure.go b/internal/app/machined/pkg/runtime/v1alpha1/platform/azure/azure.go index 26474caa6..dc536fa3f 100644 --- a/internal/app/machined/pkg/runtime/v1alpha1/platform/azure/azure.go +++ b/internal/app/machined/pkg/runtime/v1alpha1/platform/azure/azure.go @@ -124,6 +124,7 @@ func (a *Azure) ParseMetadata(metadata *ComputeMetadata, interfaceAddresses []Ne DHCP6: network.DHCP6OperatorSpec{ RouteMetric: 2 * network.DefaultRouteMetric, }, + ConfigLayer: network.ConfigPlatform, }) // If accept_ra is not set, use the default gateway. @@ -160,6 +161,22 @@ func (a *Azure) ParseMetadata(metadata *ComputeMetadata, interfaceAddresses []Ne return nil, err } + networkConfig.Operators = append(networkConfig.Operators, network.OperatorSpecSpec{ + Operator: network.OperatorDHCP4, + LinkName: "eth0", + RequireUp: true, + ConfigLayer: network.ConfigPlatform, + }) + + networkConfig.Links = append(networkConfig.Links, + network.LinkSpecSpec{ + Name: "eth0", + Up: true, + MTU: 1400, + ConfigLayer: network.ConfigPlatform, + }, + ) + networkConfig.Metadata = &runtimeres.PlatformMetadataSpec{ Platform: a.Name(), Hostname: metadata.OSProfile.ComputerName, diff --git a/internal/app/machined/pkg/runtime/v1alpha1/platform/azure/testdata/expected.yaml b/internal/app/machined/pkg/runtime/v1alpha1/platform/azure/testdata/expected.yaml index 528856928..f39fe7db0 100644 --- a/internal/app/machined/pkg/runtime/v1alpha1/platform/azure/testdata/expected.yaml +++ b/internal/app/machined/pkg/runtime/v1alpha1/platform/azure/testdata/expected.yaml @@ -1,5 +1,12 @@ addresses: [] -links: [] +links: + - name: eth0 + logical: false + up: true + mtu: 1400 + kind: "" + type: netrom + layer: platform routes: - family: inet6 dst: "" @@ -25,7 +32,11 @@ operators: requireUp: true dhcp6: routeMetric: 2048 - layer: default + layer: platform + - operator: dhcp4 + linkName: eth0 + requireUp: true + layer: platform externalIPs: - 1.2.3.4 - 2603:1020:10:5::34