Error update CMK RAW 2.1.0p28 to 2.2.0

**CMK version: 2.1.0p28
**OS version: Debian 11

Error message:
Creating temporary filesystem /omd/sites/matriz/tmp…OK
Executing update-pre-hooks script “01_mkp-disable-outdated”…
-| [check_mk_api 4.0.2]: Not uninstalling
-| [fail2ban 1.9.1]: Not uninstalling
-| [check_mk_api 4.0.2]: Updating from 4.0.2
-| [check_mk_api 4.0.2]: Installed
-| [fail2ban 1.9.1]: Updating from 1.9.1
-| [fail2ban 1.9.1]: Installed
OK
Executing update-pre-hooks script “02_cmk-update-config”…
-| ATTENTION
-| Some steps may take a long time depending on your installation.
-| Please be patient.
-|
-| Verifying Checkmk configuration…
-| 01/04 Rulesets…
-| Unknown error on pre update action.
-| Error: name ‘Tuple’ is not defined
-|
ERROR (exit code: 1)

How to solve that?

I seem to be having the same sort of issues going from 2.1.0p27 cfe to 2.2.0 cce too. Error is marginally different. Tuple is replaced with “Float”.

Any clues what is snagging the upgrade please?

"Unknown error on pre update action.
Error: name ‘Float’ is not defined

ERROR (exit code: 1)"

Hi guys,
Most likely it’s caused by some custom files (maybe MKP extensions).
Execute “cmk-update-config -vv” as siteuser vafter this update stopped, maybe you get more info and can post this…
You can also execute this as siteuser and inspect the reported files: “grep -l -w Tuple ~/local/”
Hope this helps!
BR,
Marsellus

Looks like mine is related to the presence of the “NUT” MKP (Network UPS monitoring) in my config. I removed this (as it was the only MKP i have) and the upgrade worked on the copied site correctly.

Oddly, I was able to then subsesquently re-install the NUT MKP package after the upgrade without any issues.

Also have a look at this werk: Adjustments to local extensions may be required

In my case it looks like the NUT (Network UPS Tools) MKP was not importing the “Float” from the main CheckMK. Maybe you are having similar issues with an MKP that you have installed.

I managed to fix this by updating the nut.py file in local/share/check_mk/web/plugins/wato/ to “include” Float as an import

from cmk.gui.valuespec import (
Age,
Dictionary,
DropdownChoice,
TextAscii,
Tuple,
ListOf,
Integer,
MonitoringState,
)

changed to:

from cmk.gui.valuespec import (
Age,
Dictionary,
DropdownChoice,
TextAscii,
Tuple,
ListOf,
Integer,
MonitoringState,
Float,
)

1 Like

Thank you for debugging the problem, your suggested solution and Marco for his pull request.
I’ve added the fix in github repo and also release a new version. This can be found on github or on checkmk exchange (after review).

3 Likes

I can confirm that the latest version is now available @ Checkmk Exchange as noted above and is now working correctly with 2.2.0p3 and did not interfere with the upgrade process to 2.2.0p4.

Thanks for making the changes :smiley:

1 Like