- Steps to reproduce the issue
- Create a 2.3.0p27 site
- Create a check HTTP rule to monitor a website
- Enable the certificate monitoring and set the validity period to no levels
- Upgrade to 2.4.0b1
-
Actual behavior
The upgrade process fails to correctly migrate a rule that has the certificate monitoring age set to no levels so it is always in OK state -
Error messages (if applicable)
-| WARNING: Exception in ruleset implementation detected (Ruleset: active_checks:httpv2, Title: Check HTTP web service, Folder: ,
-| Rule nr: 1, Exception: Invalid value ('no_levels', None) for certificate levels)
-| Traceback (most recent call last):
-| File "/omd/sites/test_24b1/lib/python3/cmk/update_config/plugins/actions/rulesets.py", line 36, in validate_rule_values
-| ruleset.rulespec.valuespec.validate_datatype(
-| File "/omd/sites/test_24b1/lib/python3/cmk/gui/valuespec/definitions.py", line 6603, in validate_datatype
-| self._valuespec.validate_datatype(self.to_valuespec(value), varprefix)
-| File "/omd/sites/test_24b1/lib/python3/cmk/gui/valuespec/definitions.py", line 6285, in validate_datatype
-| vs.validate_datatype(value[param], f"{varprefix}_p_{param}")
-| File "/omd/sites/test_24b1/lib/python3/cmk/gui/valuespec/definitions.py", line 6603, in validate_datatype
-| self._valuespec.validate_datatype(self.to_valuespec(value), varprefix)
-| File "/omd/sites/test_24b1/lib/python3/cmk/gui/valuespec/definitions.py", line 6285, in validate_datatype
-| vs.validate_datatype(value[param], f"{varprefix}_p_{param}")
-| File "/omd/sites/test_24b1/lib/python3/cmk/gui/valuespec/definitions.py", line 6603, in validate_datatype
-| self._valuespec.validate_datatype(self.to_valuespec(value), varprefix)
-| ^^^^^^^^^^^^^^^^^^^^^^^^
-| File "/omd/sites/test_24b1/lib/python3/cmk/gui/utils/rule_specs/legacy_converter.py", line 849, in wrapper
-| return update_func(v)
-| ^^^^^^^^^^^^^^
-| File "/omd/sites/test_24b1/lib/python3/cmk/plugins/collection/rulesets/httpv2.py", line 620, in _migrate_to_cascading
-| raise ValueError(f"Invalid value {params!r} for certificate levels")
-| ValueError: Invalid value ('no_levels', None) for certificate levels
-| A crash report was generated with ID: 4a1403f8-03fb-11f0-9787-0a3955ea6618
-| Detected 1 issue(s) in loaded rulesets. This is a problem with the plug-in implementation. It needs to be addressed by the maintainers. Please review the crashes in the crash reports page to help fix the issues. Until all issues are resolved, we recommend disabling the affected rules.
-
Expected behavior
The 2.4 upgrade should gracefully handle the translation of this rule. The 2.4 has a no-levels option for the certificate as well. Users expect that this would transition without error -
Your setup details
2.3.0p27.cce to 2.4.0b1.cce -
OS version
Debian 12 -
Screenshots (if applicable)
- Any other relevant information
Submitted crash report via UI. Crash report ID on my side is 4a1403f8-03fb-11f0-9787-0a3955ea6618

