Skip to content

Icinga DB: Fix inconsistent state_type for volatile checks - #10970

Open
Akulbanxal wants to merge 2 commits into
Icinga:masterfrom
Akulbanxal:fix/volatile-state-type-icingadb-10879
Open

Icinga DB: Fix inconsistent state_type for volatile checks#10970
Akulbanxal wants to merge 2 commits into
Icinga:masterfrom
Akulbanxal:fix/volatile-state-type-icingadb-10879

Conversation

@Akulbanxal

@Akulbanxal Akulbanxal commented Aug 3, 2026

Copy link
Copy Markdown

When a checkable is configured as volatile, every state change is treated as hard. However, its internal state type in the core remains soft. This change ensures that the serialized state_type in Icinga DB's runtime state is set to hard for volatile checkables in a non-OK state, matching the history stream behavior.

fixes #10879

When a checkable is configured as volatile, every state change is treated as hard. However, its internal state type in the core remains soft. This change ensures that the serialized state_type in Icinga DB's runtime state is set to hard for volatile checkables in a non-OK state, matching the history stream behavior.

refs Icinga#10879
@cla-bot cla-bot Bot added the cla/signed label Aug 3, 2026
@yhabteab yhabteab linked an issue Aug 3, 2026 that may be closed by this pull request
StateType stateType;

if (checkable->HasBeenChecked()) {
if (checkable->GetVolatile() && !checkable->IsStateOK(checkable->GetStateRaw())) {

@yhabteab yhabteab Aug 27, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Actually, you can even remove the the second condition and just set it to hard state as there is no soft OK state changes, i.e., just the volatile check should suffice. Otherwise, looks fine to me. Please also rebase against the latest master to make the CI happy.

@yhabteab
yhabteab requested a review from julianbrost August 27, 2026 12:31
@yhabteab yhabteab added the area/icingadb New backend label Aug 27, 2026
@yhabteab yhabteab added this to the 2.17.0 milestone Aug 27, 2026
@yhabteab yhabteab added the consider backporting Should be considered for inclusion in a bugfix release label Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/icingadb New backend cla/signed consider backporting Should be considered for inclusion in a bugfix release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Icinga DB: inconsistent state_type value for volatile checks

2 participants