[solved] Check HTTPv2 rule conversion error

  • Steps to reproduce the issue
  1. Create a 2.3.0p27 site
  2. Create a check HTTP rule to monitor a website
  3. Enable the certificate monitoring and set the validity period to no levels
  4. 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

Hi Brian,

Thanks for your bug report. We will have a look into it.

As a Partner it would be easier for us, if you use the Beta Support Portal for the next time, or also copying this report into a portal ticket if you don’t mind. This makes our internal communication with developers a bit easier and we have more context available, which also might help with troubleshooting.

Thanks a lot.

Best regards,
Gregor

ps. The beta support portal is a dedicated process and of course free of any cost. We appreciate any reports we get, so we can fix critical bugs before the final release.

Sorry for the confusion. If I see any more issues, I will use the beta support portal for those right away.

I found this bug in my personal/at-home site. Since it was not an “official” work site, and I don’t personally have a subscription, I thought this would be the best way to report it.

Edit:
I cannot access the beta support portal with the account that I use to raise a paid support case.

No worries, we are thankful for any report and any support! Just trying to keep the things sorted into the right buckets here :slight_smile: .

We are checking the portal access, I will let you know.

Hi Brian!

I’ve just heard back that the beta support portal is fixed :+1:

Hi Brian,
the issue has been fixed: Werk #17783: Fix update of certificate validity settings in rule "Check HTTP web service"
Best
Jörg