Skip to content

agents: fix lnx_bonding when no bonding interface is configured#900

Open
osedlbauer wants to merge 1 commit intoCheckmk:masterfrom
osedlbauer:fix/agent-bonding-interfaces
Open

agents: fix lnx_bonding when no bonding interface is configured#900
osedlbauer wants to merge 1 commit intoCheckmk:masterfrom
osedlbauer:fix/agent-bonding-interfaces

Conversation

@osedlbauer
Copy link

General information

When /proc/net/bonding exists but no bonding interface is configured, head fails with:

head: *: No such file or directory

Fix this by checking if any interfaces exist before running head

Bug reports

  • Any Linux system with kmod-bonding loaded but no bonding interface configured (Tested on newest OpenWrt master)
  • Reproduce: load bonding kernel module without configuring a bonding interface
  • head fails with: head: *: No such file or directory

Proposed changes

  • Observed: head fails when /proc/net/bonding exists but is empty
  • Expected: empty lnx_bonding section without errors
  • Fix: check if interfaces exist before running head

When /proc/net/bonding exists but no bonding interface is configured,
head fails with:

  head: *: No such file or directory

Fix this by checking if any interfaces exist before running head

Signed-off-by: Oliver Sedlbauer <os@dev.tdt.de>
@github-actions
Copy link

github-actions bot commented Mar 13, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@osedlbauer
Copy link
Author

I have read the CLA Document and I hereby sign the CLA or my organization already has a signed CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants