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 state_type and is_acknowledged keys in redis don't match with what's inserted into the DB #9427

Open
nilmerg opened this issue Jun 30, 2022 · 6 comments
Labels
area/icingadb New backend TBD To be defined - We aren't certain about this yet
Milestone

Comments

@nilmerg
Copy link
Member

nilmerg commented Jun 30, 2022

Describe the bug

state_type in redis is a integer instead of 'soft' or 'hard'
is_acknowledged is a integer instead of 'y', 'n' or 'sticky'

There may be more cases, didn't check further.

Your Environment

Include as many relevant details about the environment you experienced the problem in

  • Version used (icinga2 --version): v2.13.0-369-g73d3323b4
@lippserd
Copy link
Member

There is a workaround in place at the moment so it’s NOT a production issue.

@julianbrost
Copy link
Contributor

This would be an incompatible change to the Redis schema, so what are the options here?

  1. Wait until we want to do another incompatible change and then include it as well.
  2. Include patches in the next releases of icingadb and icingadb-web so that they can handle both integer and string values for these keys but keep icinga2 as-is for now and only change it after it's pretty safe to assume that most users will be on versions that support reading the strings from Redis.

@julianbrost julianbrost added the area/icingadb New backend label Jul 4, 2022
@Al2Klimov Al2Klimov added the TBD To be defined - We aren't certain about this yet label Jul 19, 2022
@nilmerg
Copy link
Member Author

nilmerg commented Aug 9, 2023

in_downtime is affected as well, it's a boolean, instead of 'y' or 'n'

@julianbrost
Copy link
Contributor

Is that unexpected? That enum('n', 'y') thing in the database is supposed to represent a boolean after all. You shouldn't find "n" or "y" anywhere in Redis (well, expect if some string attribute is set to that value of course).

@nilmerg
Copy link
Member Author

nilmerg commented Aug 9, 2023

The problem with this is, if we apply redis results to database results, it performs an unexpected transformation. In Web's view, the types returned by either source should be identical.

@yhabteab
Copy link
Member

  1. Wait until we want to do another incompatible change and then include it as well.

Now might be the time to introduce such an incompatible change (the Redis schema version is going to change with #10290 anyway).

@yhabteab yhabteab added this to the 2.15.0 milestone Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/icingadb New backend TBD To be defined - We aren't certain about this yet
Projects
None yet
Development

No branches or pull requests

5 participants