icinga2
icinga2 copied to clipboard
Icinga DB `state_type` and `is_acknowledged` keys in redis don't match with what's inserted into the DB
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
There is a workaround in place at the moment so it’s NOT a production issue.
This would be an incompatible change to the Redis schema, so what are the options here?
- Wait until we want to do another incompatible change and then include it as well.
- 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.
in_downtime
is affected as well, it's a boolean, instead of 'y'
or 'n'
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).
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.