Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icinga DB feature: normalize several Redis data not to crash the Go daemon #9814

Merged
merged 7 commits into from
Jul 6, 2023

Conversation

Al2Klimov added 7 commits July 3, 2023 17:08
…,repeat_key} to boolean

At the moment, the Icinga DB feature will use that value as-is and
serialize it to JSON, resulting in a crash in Icinga DB down the road
because it expects a boolean.
via `std::max(0, x)` not to crash the Go daemon which can't handle such.
…o number

and, in case of null, fall back to Checkable#check_command.timeout, just like
IcingaDB#SerializeState(). Otherwise the Go daemon crashes. It expects a number.
…edis

not to crash the Go daemon which expects positive values there.
…o >=0

otherwise, e.g. with -42.5, the Go daemon crashes. It expects uints there.
…o crash Go daemon

The latter expects ints, not floats - not to mention strings.
Luckily Icinga already enforces numeric strings so that we can cast it to number.
….{begin,end} not to crash Go daemon

At least our PostgreSQL schema enforces positive values.
@cla-bot cla-bot bot added the cla/signed label Jul 3, 2023
@icinga-probot icinga-probot bot added this to the 2.13.8 milestone Jul 3, 2023
@icinga-probot icinga-probot bot added area/icingadb New backend bug Something isn't working labels Jul 3, 2023
@Al2Klimov Al2Klimov mentioned this pull request Jul 4, 2023
11 tasks
Copy link
Contributor

@julianbrost julianbrost left a comment

Choose a reason for hiding this comment

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

Brings the support/2.13 branch up to date with master, i.e. git diff origin/2.13.8/icingadb..origin/master -- lib/icingadb/icingadb-objects.cpp only shows a few minor differences that don't have to be backported (code quality (remove redundant std::move) and writing original_attributes).

@Al2Klimov Al2Klimov mentioned this pull request Jul 5, 2023
9 tasks
@Al2Klimov Al2Klimov merged commit 3e682a9 into support/2.13 Jul 6, 2023
@icinga-probot icinga-probot bot deleted the 2.13.8/icingadb branch July 6, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/icingadb New backend bug Something isn't working cla/signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants