Skip to content

Conversation

pratikjagrut
Copy link
Contributor

Description

This PR fixes a bug in the VXLAN backend where the flannel.<vni> interface was not reliably re-created when the external network interface was deleted and re-added.

Changes in this PR

  • This is a bug fix PR for issue flannel.1 interface disappears when --flannel-iface is recreated #2247

  • This PR adds a watcher to monitor for missing VXLAN devices and trigger automatic re-creation once the external interface is available again.

  • Manual testing:

    1. Deploy a cluster with Flannel VXLAN backend.
    2. Verify VXLAN interface flannel.<vni> exists and pods can communicate.
    3. Delete and recreate the external interface (or toggle it down/up).
    4. Check Flannel logs for VXLAN device recreation, also with the a'p a command
    5. Deploy two test pods and verify that pod-to-pod ping works.
  • Affected component: VXLAN backend (network and device setup).

Todos

  • Tests
  • Documentation
  • Release note

Release Not"

Added watcher to detect missing VXLAN devices and automatically recreate them when the external interface reappears.

continue
}

ifaceAddrsV6, err := ip.GetInterfaceIP6Addrs(extIface)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think here it could be an issue in case of IPv4 only setup. Also for IPv4 in case of IPv6 only setup.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated the code PTAL.

Copy link
Contributor

Choose a reason for hiding this comment

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

Probably better to use config.EnableIPv4 and config.EnableIPv6 to check if it's configured and then check the IP and don't create the interface in case of error.

Copy link
Contributor Author

@pratikjagrut pratikjagrut Sep 18, 2025

Choose a reason for hiding this comment

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

Updated. PTAL.

…eted and re-added (flannel-io#2247)

- Detects loss and reappearance of the external interface used by flannel
- Recreates the dependent VXLAN device to restore network connectivity

Signed-off-by: Pratik Jagrut <pratik.jagrut@suse.com>
Copy link
Contributor

@rbrtbnfgl rbrtbnfgl left a comment

Choose a reason for hiding this comment

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

LGTM

@rbrtbnfgl rbrtbnfgl merged commit 73af8ea into flannel-io:master Oct 1, 2025
8 checks passed
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.

2 participants