Skip to content

Conversation

iwanhae
Copy link
Contributor

@iwanhae iwanhae commented Jul 26, 2025

Hello, this is my first PR to the Cilium community. if I’ve made any mistakes or deviated from community conventions, please let me know and I’ll address them promptly

Changes

  • Wraps underlying errors with operation details (e.g., interface name, MTU value).
  • Includes both the attempted configuration parameters and the original error message in the returned error.

Why?

Recently, I've encountered an error message something like this from the Cilium agent.

level=fatal msg="Error while creating daemon" error="error while initializing daemon: failed while reinitializing datapath: failed to setup base devices in mode tunnel: invalid argument" subsys=daemon

The root cause of this issue is a wrongly inferred MTU value (just like #20603): I had assigned an IP address and an unusually large MTU (65,536) to the loopback device for a special use case, which Cilium then tried—and failed—to apply to cilium_host and cilium_net. Tracking down this failure took over two hours due to the lack of context in the error message.

How This Helps

  • Faster troubleshooting: Developers will immediately see more detailed context of the failure.
  • Clearer issue triage: Community contributors can distinguish between unrelated root causes even when the high-level error text is the same.

@iwanhae iwanhae requested a review from a team as a code owner July 26, 2025 07:45
@iwanhae iwanhae requested a review from rgo3 July 26, 2025 07:45
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jul 26, 2025
@github-actions github-actions bot added the kind/community-contribution This was a contribution made by a community member. label Jul 26, 2025
@rgo3 rgo3 added the release-note/misc This PR makes changes that have no direct user impact. label Aug 5, 2025
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Aug 5, 2025
@joestringer
Copy link
Member

/test

@joestringer joestringer enabled auto-merge August 6, 2025 23:23
Copy link
Member

@joestringer joestringer left a comment

Choose a reason for hiding this comment

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

The change LGTM but @cilium/loader needs to approve.

Copy link
Member

@dylandreimerink dylandreimerink left a comment

Choose a reason for hiding this comment

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

Changes look good to me as well

Copy link
Contributor

@rgo3 rgo3 left a comment

Choose a reason for hiding this comment

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

Apologies for the delay.

@dylandreimerink
Copy link
Member

CI is failing with the following error message IPAM mode multi-pool with enable-ipsec is supported only in tunnel mode.. You likely need to rebase due to some changes in the main branch to fix it.

Enhanced error messages in the netlink.go file to provide more context when operations fail. This includes detailed messages for link setup, sysctl settings application, and MAC address generation failures, improving debuggability and clarity for future troubleshooting.

Signed-off-by: iwanhae <wanhae.lee@linecorp.com>
@joestringer
Copy link
Member

I triggered update-with-rebase, and will re-run tests so that hopefully this can merge.

@joestringer
Copy link
Member

/test

@joestringer joestringer added this pull request to the merge queue Aug 7, 2025
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Aug 7, 2025
Merged via the queue into cilium:main with commit b46ebf8 Aug 7, 2025
68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/community-contribution This was a contribution made by a community member. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants