Skip to content

fix: improve OpenStack bare metal network configuration reliability#12696

Open
maxpain wants to merge 1 commit intosiderolabs:mainfrom
maxpain:fix/openstack-wait-for-devices
Open

fix: improve OpenStack bare metal network configuration reliability#12696
maxpain wants to merge 1 commit intosiderolabs:mainfrom
maxpain:fix/openstack-wait-for-devices

Conversation

@maxpain
Copy link
Contributor

@maxpain maxpain commented Feb 1, 2026

Summary

Fixes network configuration issues on OpenStack bare metal (Ironic) servers with bonded interfaces.

Changes:

  • Add WaitForDevicesReady call before parsing network configuration to ensure network interfaces are available
  • Add fallback to HardwareAddr when PermanentAddr is empty (ethtool may not have populated it yet)
  • Add retry loop with exponential backoff when MAC address matching fails
  • Remove hardcoded bond parameters (UpDelay: 200, DownDelay: 200, LACPRate: fast) to use kernel defaults matching Ubuntu behavior
  • Explicitly set bond interface MAC address from OpenStack metadata to ensure the switch sees the correct MAC

The bond MAC fix addresses a critical issue where Linux assigns the bond the MAC of the first enslaved interface, which may not match the MAC expected by the switch. OpenStack metadata provides the correct MAC via ethernet_mac_address field, and we now apply it explicitly.

The retry loop, HardwareAddr fallback and WaitForDevicesReady match the pattern used in the NoCloud platform.

Testing

These changes have been verified in production on our bare metal servers (GCore Bare Metal Cloud) and everything works correctly after the fix.

@github-project-automation github-project-automation bot moved this to To Do in Planning Feb 1, 2026
@talos-bot talos-bot moved this from To Do to In Review in Planning Feb 1, 2026
@maxpain maxpain marked this pull request as draft February 1, 2026 20:11
@maxpain maxpain force-pushed the fix/openstack-wait-for-devices branch from 15b3f5d to 55e01b8 Compare February 1, 2026 23:14
// NetworkConfiguration implements the runtime.Platform interface.
func (o *OpenStack) NetworkConfiguration(ctx context.Context, st state.State, ch chan<- *runtime.PlatformNetworkConfig) error {
// wait for devices to be ready before proceeding, otherwise we might not find network interfaces by MAC
if err := netutils.WaitForDevicesReady(ctx, st); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put it to ParseMetadata call (close to where it matters).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In NoCloud it's placed in the same spot — at the top of NetworkConfiguration (nocloud.go:131). I kept it consistent with that pattern. Happy to move it closer to ParseMetadata if you prefer, either here or in a follow-up PR.

@maxpain maxpain force-pushed the fix/openstack-wait-for-devices branch from 55e01b8 to f3304b0 Compare February 2, 2026 10:22
@smira smira self-assigned this Feb 2, 2026
@maxpain maxpain force-pushed the fix/openstack-wait-for-devices branch from f3304b0 to 1517a11 Compare February 2, 2026 11:59
@maxpain maxpain changed the title fix: wait for devices before parsing OpenStack network config fix: improve OpenStack network interface matching reliability Feb 2, 2026
@maxpain maxpain force-pushed the fix/openstack-wait-for-devices branch 7 times, most recently from b01e7d7 to adfdcb9 Compare February 5, 2026 11:57
@maxpain maxpain changed the title fix: improve OpenStack network interface matching reliability fix: improve OpenStack bare metal network configuration reliability Feb 5, 2026
@maxpain maxpain force-pushed the fix/openstack-wait-for-devices branch 2 times, most recently from 346b2ee to 77701fc Compare February 5, 2026 12:10
@maxpain maxpain marked this pull request as ready for review February 5, 2026 12:26
@maxpain maxpain force-pushed the fix/openstack-wait-for-devices branch from b93564c to 244ee7c Compare February 5, 2026 12:37
@maxpain
Copy link
Contributor Author

maxpain commented Feb 6, 2026

@smira this PR is ready to merge

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves OpenStack (Ironic/bare metal) platform network configuration reliability by delaying config parsing until devices are ready, making MAC/interface matching more resilient, and adding a reconciliation retry loop.

Changes:

  • Update ParseMetadata to return a needsReconcile flag and add MAC matching fallbacks (PermanentAddr → HardwareAddr) plus bond MAC override from metadata.
  • Add WaitForDevicesReady before network configuration and introduce an exponential-backoff retry loop when link/MAC matching can’t be completed yet.
  • Remove hardcoded bond parameters to rely on defaults.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
internal/app/machined/pkg/runtime/v1alpha1/platform/openstack/openstack.go Adds device-readiness wait, bond MAC override, MAC matching fallback, and backoff-based reconciliation retries; adjusts ParseMetadata signature and bond defaults.
internal/app/machined/pkg/runtime/v1alpha1/platform/openstack/openstack_test.go Updates test to handle the new needsReconcile return value.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

This commit improves network configuration on OpenStack bare metal
(Ironic) by:

1. Adding WaitForDevicesReady call before parsing network configuration
   to ensure network interfaces are available.

2. Adding fallback to HardwareAddr when PermanentAddr is empty, similar
   to the NoCloud platform implementation.

3. Adding a retry loop with exponential backoff to handle cases where
   network interfaces are not immediately available after device init.

4. Removing hardcoded bond parameters (UpDelay: 200, DownDelay: 200,
   LACPRate: fast) to use kernel defaults matching Ubuntu behavior.

5. Explicitly setting the bond interface MAC address from OpenStack
   metadata to ensure the switch sees the correct MAC on the bond.

These changes address network configuration failures on bare metal
OpenStack deployments where interfaces may not be immediately
discoverable by MAC address, and fix bond MAC address mismatch issues
where the switch expects a specific MAC on the bond interface.

Signed-off-by: Max Makarov <maxpain@linux.com>
@maxpain maxpain force-pushed the fix/openstack-wait-for-devices branch from 244ee7c to b539219 Compare February 13, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

2 participants