Skip to content

Fix compilation against naemon-core 1.5.1#174

Open
eschoeller wants to merge 1 commit intoITRS-Group:masterfrom
eschoeller:naemon-1.5.1-check_timeout
Open

Fix compilation against naemon-core 1.5.1#174
eschoeller wants to merge 1 commit intoITRS-Group:masterfrom
eschoeller:naemon-1.5.1-check_timeout

Conversation

@eschoeller
Copy link
Copy Markdown

Naemon-core 1.5.1 (released 2026-03-19) adds a check_timeout attribute to the host and service structs, allowing per-object timeout overrides. The new int check_timeout field is inserted between initial_state and check_interval in both struct host and struct service, and the setup_host_variables() and setup_service_variables() function signatures are updated to include it as a parameter.

This breaks merlin compilation against naemon-core 1.5.1 headers:

module/oconfsplit.c:222:3: error: too few arguments to function 'setup_service_variables'
module/oconfsplit.c:197:3: error: too few arguments to function 'setup_host_variables'

This PR adds h->check_timeout and s->check_timeout to the respective function calls in module/oconfsplit.c. These are the only two call sites for these functions in the merlin codebase.

Also fixes a minor whitespace issue in the setup_host_variables call (h-> initial_state -> h->initial_state).

Testing:

  • Compiled successfully against naemon-core 1.5.1 and naemon-livestatus 1.5.1 headers on RHEL 8
  • Deployed to a 2-node naemon cluster running 1.5.1
  • Verified merlin peering, check distribution (~50/50 split), failover (one node down, other takes 100%), and re-peering (checks redistribute within ~60 seconds)
  • Livestatus queries working correctly

Note: Our deployment does not use the oconfsplit config splitting functionality — we distribute config via a separate git-based workflow. The fix is straightforward (passing the new struct field to the function call), but we have not been able to functionally test the oconfsplit code path itself.

Refs:

Naemon-core 1.5.1 adds a check_timeout parameter to both
setup_host_variables() and setup_service_variables(). The new field
is inserted after initial_state in the host and service structs.

Without this fix, merlin fails to compile against naemon-core 1.5.1:

  module/oconfsplit.c:222:3: error: too few arguments to function
  'setup_service_variables'

Add h->check_timeout and s->check_timeout to the respective function
calls in oconfsplit.c.

Also fixes a minor whitespace issue in the setup_host_variables call
(h-> initial_state -> h->initial_state).

Ref: https://www.naemon.io/news/2026-03-19-release-1.5.1
Ref: https://github.com/naemon/naemon-core/releases/tag/v1.5.1
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.

1 participant