Error @ updating from cmk 2.0.0 to 2.0.0p1

CMK version : cmk 2.0.0
OS version : Debian 10

Error message :
Executing update-pre-hooks script “02_cmk-update-config”…
-| Initializing application…
-| Loading GUI plugins…
-| Updating Checkmk configuration…
-| ATTENTION: Some steps may take a long time depending on your installation, e.g. during major upgrades.
-| 1/15 Migrate deprecated network topology dashlet…
-| 2/15 Update global settings…
-| 3/15 Rewriting WATO tags…
-| 4/15 Rewriting WATO hosts and folders…
-| 5/15 Rewriting WATO rulesets…
-| 6/15 Rewriting autochecks…
-| 7/15 Cleanup version specific caches…
-| 8/15 Migrating fs_used name…
-| + “Migrating fs_used name” failed
-| Traceback (most recent call last):
-| File “/omd/sites/monitor1/lib/python3/cmk/update_config.py”, line 146, in run
-| step_func()
-| File “/omd/sites/monitor1/lib/python3/cmk/update_config.py”, line 183, in _update_fs_used_name
-| cmk.update_rrd_fs_names.update()
-| File “/omd/sites/monitor1/lib/python3/cmk/update_rrd_fs_names.py”, line 186, in update
-| update_service_info(config_cache, get_hostnames(config_cache))
-| File “/omd/sites/monitor1/lib/python3/cmk/update_rrd_fs_names.py”, line 174, in update_service_info
-| update_files(hostname, service.description, service.item, ‘cmc’)
-| File “/omd/sites/monitor1/lib/python3/cmk/update_rrd_fs_names.py”, line 80, in update_files
-| filepath = get_info_file(hostname, servicedesc, source)
-| File “/omd/sites/monitor1/lib/python3/cmk/update_rrd_fs_names.py”, line 64, in get_info_file
-| host_dir = cmk.base.cee.rrd.rrd_cmc_host_dir(hostname)
-| AttributeError: module ‘cmk.base.cee’ has no attribute ‘rrd’
-| 9/15 Migrate pagetype topics…
-| 10/15 Migrate LDAP connections…
-| 11/15 Rewrite BI Configuration…
-| Skipping conversion of bi.mk (already done)
-| 12/15 Set version specific user attributes…
-| 13/15 Rewriting inventory data…
-| Skipping py2 inventory data update (already done)
-| 14/15 Migrate audit log…
-| No audit log present. Skipping.
-| 15/15 Rename discovered host label files…
-| Done
OK

Description of the problem : Während dem Update von Version 2.0.0 auf die Version V2.0.0p1 bekomme ich den oben aufgeführten Fehler in Punkt 8 von 15. Ich habe mal in den Werks nachgeschaut, ob ich zu dem was finde und bin dort auf den Werk #7444 gestoßen. Wenn ich versuche, das dort aufgeführte Skript “update_rrd_fs_names.py” manuell als der Site User auszuführen, kommt genau derselbe Fehler.
Hat jemand eine Idee wo ich das Attribut “rrd” in “cmk.base.cee” vergeben kann?

Entweder deine Version ist ein RAW Edition und das Script hat hier eine Bug dies festzustellen oder aber irgendwas in deiner Installation ist nicht ganz sauber.
Das Script versucht am Anfang “cmk.base.cee.rrd” zu importieren und ignoriert es einfach wenn nicht vorhanden (RAW Edition). Danach checkt das Script ob die CEE Libs vorhanden sind und macht entsprechende weiter. Bei mir schaut das erstmal ok aus hier.

Vielen Dank für deine schnelle Antwort.

Ja wir verwenden die Raw Edition. ich schau mir das Script nochmal an und schau mal nach wo er das “cmk.base.cee.rrd” findet.

Normal darf er das nicht finden in der RAW. Das Script testet ob er “cmk.base.cee” findet und sollte nur dann die Funktion ausführen aus deiner Fehlermeldung.

Ich werde mal eine neue VM aufsetzen, dort ein Backup vom Produktivsystem einspielen und mit dem frischen System versuchen das Update durchzuführen. Ich melde mich dann mit dem Ergebnis.

leider besteht das Problem auch bei der frischen Installation und einspielen des Backups.

Es ist irgendwas in deiner alten Site komisch was auch mit dem Backup übertragen wird.
Habe gerade mal eine RAW 2.0 auf 2.0p1 updated und da gab es keine komischen Meldungen oder Fehler. Lief einfach durch.
Die Site sollte aber trotz des Fehlers oben laufen. Das Script was da nicht durchläuft war aber schon beim Update auf die 2.0 ausgeführt worden. Ging das da ohne Fehler?

Ich habe nun nochmal ein Backup rausgekramt von dem Stand 1.6.0p22 und nochmal ein Upgrade auf 2.0 durchgeführt, weil ich mir nicht mehr sicher war.
Ich glaube ich habe den Fehler gefunden.

CheckMK meinte beim upgrade, das es Konflikte in der Datei etc/check_mk/main.mk gab. ich habe mir das Diff anzeigen lassen:

--- /omd/sites/monitor1/etc/check_mk/main.mk.orig       2017-06-01 08:51:03.000000000 +0200
+++ /omd/sites/monitor1/etc/check_mk/main.mk-2.0.0.cre  2021-04-06 11:27:24.655718568 +0200
@@ -1,3 +1,2 @@
 # Main configuration file of Check_MK
-#We highly recommend to use WATO to configure Check_MK these days.
-snmp_default_community = "GEhEimES PASSWORT"
+# We highly recommend to use WATO to configure Check_MK these days.

Da ich damals das als unkritisch eingestuft habe, habe ich eingestellt, das er die Datei behalten soll.
Danach ist aber nicht das Skript “update_rrd_fs_names.py” gelaufen, sondern er ist abgestürzt weil er die Datei wegen einem Syntax error nicht einlesen konnte:

 Executing update-pre-hooks script "01_mkp-disable-outdated"...OK
Updating core configuration...
Cannot read in configuration file /omd/sites/monitor1/etc/check_mk/main.mk: invalid syntax (<string>, line 2)
Finished update.

Dummerweise habe ich das damals nicht gesehen -.-

Nun habe ich nochmal den Snapshot vor dem Upgrade geladen und nocheinmal das Update auf version 2.0 angestoßen aber diesmal mit der Einstellung das er die Änderrungen anwenden soll. danach ist das Skript gelaufen und nun auch ohne den ursprünglichen Fehler.

Installed default file of version 2.0.0.cre.
 * Installed link etc/rc.d/85-redis
 * Installed dir  var/redis
 * Installed dir  var/check_mk/crashes
 * Installed dir  local/lib/python3
 * Installed link local/lib/check_mk
 * Installed dir  local/lib/python3/cmk
 * Installed dir  local/lib/python3/cmk/base
 * Installed dir  local/lib/python3/cmk/base/plugins
 * Installed dir  local/lib/python3/cmk/base/plugins/agent_based
 * Keeping your   local/share/dokuwiki/htdocs
 * Keeping your   local/share/dokuwiki
 * Keeping your   var/dokuwiki/lib/plugins/authplain
 * Keeping your   var/dokuwiki/lib/plugins/authpgsql
 * Keeping your   var/dokuwiki/lib/plugins/extension
 * Keeping your   var/dokuwiki/lib/plugins/remote.php
 * Keeping your   var/dokuwiki/lib/plugins/indexmenu
 * Keeping your   var/dokuwiki/lib/plugins/cli.php
 * Keeping your   var/dokuwiki/lib/plugins/index.html
 * Keeping your   var/dokuwiki/lib/plugins/admin.php
 * Keeping your   var/dokuwiki/lib/plugins/safefnrecode
 * Keeping your   var/dokuwiki/lib/plugins/config
 * Keeping your   var/dokuwiki/lib/plugins/revert
 * Keeping your   var/dokuwiki/lib/plugins/popularity
 * Keeping your   var/dokuwiki/lib/plugins/action.php
 * Keeping your   var/dokuwiki/lib/plugins/bookcreator
 * Keeping your   var/dokuwiki/lib/plugins/include
 * Keeping your   var/dokuwiki/lib/plugins/pagelist
 * Keeping your   var/dokuwiki/lib/plugins/authmultisite
 * Keeping your   var/dokuwiki/lib/plugins/authpdo
 * Keeping your   var/dokuwiki/lib/plugins/dokuteaser
 * Keeping your   var/dokuwiki/lib/plugins/acl
 * Keeping your   var/dokuwiki/lib/plugins/info
 * Keeping your   var/dokuwiki/lib/plugins/auth.php
 * Keeping your   var/dokuwiki/lib/plugins/styling
 * Keeping your   var/dokuwiki/lib/plugins/changes
 * Keeping your   var/dokuwiki/lib/plugins/authmysql
 * Keeping your   var/dokuwiki/lib/plugins/authldap
 * Keeping your   var/dokuwiki/lib/plugins/authad
 * Keeping your   var/dokuwiki/lib/plugins/syntax.php
 * Keeping your   var/dokuwiki/lib/plugins/usermanager
 * Keeping your   var/dokuwiki/lib/plugins
 * Keeping your   var/dokuwiki/data/pages/wiki/syntax.txt
 * Keeping your   var/dokuwiki/data/pages/wiki/dokuwiki.txt
 * Keeping your   var/dokuwiki/data/pages/wiki/ebook.txt
 * Keeping your   var/dokuwiki/data/pages/playground/playground.txt
 * Keeping your   var/dokuwiki/data/pages/playground
 * Keeping your   var/dokuwiki/data/pages/wiki
 * Keeping your   var/dokuwiki/data/tmp/_dummy
 * Keeping your   var/dokuwiki/data/cache/_dummy
 * Keeping your   var/dokuwiki/data/index/_dummy
 * Keeping your   var/dokuwiki/data/media/wiki/dokuwiki-128.png
 * Keeping your   var/dokuwiki/data/media/wiki
 * Keeping your   var/dokuwiki/data/meta/_dummy
 * Keeping your   var/dokuwiki/data/locks/_dummy
 * Keeping your   var/dokuwiki/data/attic/_dummy
 * Keeping your   var/dokuwiki/data/_dummy
 * Keeping your   var/dokuwiki/data/.htaccess
 * Keeping your   var/dokuwiki/data/attic
 * Keeping your   var/dokuwiki/data/locks
 * Keeping your   var/dokuwiki/data/meta
 * Keeping your   var/dokuwiki/data/media_attic
 * Keeping your   var/dokuwiki/data/media
 * Keeping your   var/dokuwiki/data/index
 * Keeping your   var/dokuwiki/data/media_meta
 * Keeping your   var/dokuwiki/data/cache
 * Keeping your   var/dokuwiki/data/tmp
 * Keeping your   var/dokuwiki/data/pages
 * Keeping your   var/dokuwiki/data
 * Keeping your   var/dokuwiki/lib
 * Keeping your   var/dokuwiki
 * Keeping your   etc/dokuwiki/local.php
 * Keeping your   etc/dokuwiki/mime.conf
 * Keeping your   etc/dokuwiki/plugins.local.php
 * Keeping your   etc/dokuwiki/msg
 * Keeping your   etc/dokuwiki/plugins.required.php
 * Keeping your   etc/dokuwiki/users.auth.php
 * Keeping your   etc/dokuwiki/dokuwiki.php
 * Keeping your   etc/dokuwiki/acl.auth.php
 * Keeping your   etc/dokuwiki/scheme.conf
 * Keeping your   etc/dokuwiki/apache.conf
 * Keeping your   etc/dokuwiki/interwiki.conf
 * Keeping your   etc/dokuwiki/mysql.conf.php.example
 * Keeping your   etc/dokuwiki/acronyms.conf
 * Keeping your   etc/dokuwiki/smileys.conf
 * Keeping your   etc/dokuwiki/mediameta.php
 * Keeping your   etc/dokuwiki/entities.conf
 * Keeping your   etc/dokuwiki/plugins.php
 * Keeping your   etc/dokuwiki/local.protected.php
 * Keeping your   etc/dokuwiki/wordblock.conf
 * Keeping your   etc/dokuwiki/license.php
 * Vanished       etc/check_mk/conf.d/README
 * Vanished       etc/cron.d/cmk_cleanup_crashed_checks
 * Vanished       etc/jmx4perl/jmx4perl.cfg
 * Vanished       etc/jmx4perl/servers.cfg
 * Vanished       etc/apache/conf.d/dokuwiki.conf
 * Keeping your   etc/dokuwiki
 * Vanished       .pip/pip.conf
 * Vanished       .pip
Creating temporary filesystem /omd/sites/monitor1/tmp...OK
Executing update-pre-hooks script "02_cmk-update-config"...
-| Initializing application...
-| Loading GUI plugins...
-| Failed to load plugin /omd/sites/monitor1/local/share/check_mk/web/plugins/wato/check_parameters_sslcertificates.py: __init__() got an unexpected keyword argument 'min_len'
-| Traceback (most recent call last):
-|   File "/omd/sites/monitor1/lib/python3/cmk/gui/utils/__init__.py", line 172, in load_web_plugins
-|     exec(f.read(), globalvars)
-|   File "<string>", line 28, in <module>
-| TypeError: __init__() got an unexpected keyword argument 'min_len'
-|
-| ERROR: Failed to load some GUI plugins. You will either have
-|        to remove or update them to be compatible with this
-|        Checkmk version.
-|
-| Updating Checkmk configuration...
-| ATTENTION: Some steps may take a long time depending on your installation, e.g. during major upgrades.
-|  1/15 Migrate deprecated network topology dashlet...
-|  2/15 Update global settings...
-| Replacing use_inline_snmp with snmp_backend_default
-|  3/15 Rewriting WATO tags...
-|  4/15 Rewriting WATO hosts and folders...
-|  5/15 Rewriting WATO rulesets...
-| Extracting excluded SNMP sections
-| Found deprecated ruleset: non_inline_snmp_hosts
-| Replacing ruleset non_inline_snmp_hosts with snmp_backend_hosts
-|  6/15 Rewriting autochecks...
-|  7/15 Cleanup version specific caches...
-|  8/15 Migrating fs_used name...
-|  9/15 Migrate pagetype topics...
-|  10/15 Migrate LDAP connections...
-|  11/15 Rewrite BI Configuration...
-| Skipping conversion of bi.mk (already done)
-|  12/15 Set version specific user attributes...
-|  13/15 Rewriting inventory data...
-| Skipping path '/omd/sites/monitor1/tmp/check_mk/status_data' (empty)
-| Finished checking for corrupt files
-| Creating file '/omd/sites/monitor1/var/check_mk/update_config/py2conversion.done'
-|  14/15 Migrate audit log...
-|  15/15 Rename discovered host label files...
-| Done
OK
Executing update-pre-hooks script "01_mkp-disable-outdated"...OK
Updating core configuration...
Generating configuration for core (type nagios)...
WARNING: Found configured rules of deprecated check group "mssql_blocked_sessions". These rules are not used by any check. Maybe this check group has been renamed during an update, in this case you will have to migrate your configuration to the new ruleset manually. Please check out the release notes of the involved versions. You may use the page "Deprecated rules" in WATO to view your rules and move them to the new rulesets.
Precompiling host checks...Error precompiling checks for host sv-datacore2.stadt-nw.de: Bad Host SNMP Backend configuration: True
Finished update.

Die beiden Fehler mit dem Plugin “sslcertificates” und wegen der deprecated Regel habe ich im Produktivsystem bereits durch ein Update des Plugins bzw. ein löschen der veralteten Regel gefixed.

Ich werde morgen mal im Produktivsystem in der Datei /omd/sites/monitor1/etc/check_mk/main.mk die Default SNMP-Community löschen und mich melden ob danach das update auf 2.0.0p1 funktioniert.

Ich werde morgen mal im Produktivsystem in der Datei /omd/sites/monitor1/etc/check_mk/main.mk die Default SNMP-Community löschen und mich melden ob danach das update auf 2.0.0p1 funktioniert.

Hat leider nicht geklappt. ich werde nun das Backup vor dem Update auf 2.0 in das Produktivsystem einspielen und das Update noch einmal durchführen diesmal mit anwenden der Änderungen.

Bitte vorher teilweise schon bereinigen wie die main.mk. Diese sollte wie andere manuelle mk Dateien leer sein.

I have the exact same error on my end.

-|  8/15 Migrating fs_used name...
-|  + "Migrating fs_used name" failed
-| Traceback (most recent call last):
-|   File "/omd/sites/home/lib/python3/cmk/update_config.py", line 146, in run
-|     step_func()
-|   File "/omd/sites/home/lib/python3/cmk/update_config.py", line 183, in _update_fs_used_name
-|     cmk.update_rrd_fs_names.update()
-|   File "/omd/sites/home/lib/python3/cmk/update_rrd_fs_names.py", line 186, in update
-|     update_service_info(config_cache, get_hostnames(config_cache))
-|   File "/omd/sites/home/lib/python3/cmk/update_rrd_fs_names.py", line 174, in update_service_info
-|     update_files(hostname, service.description, service.item, 'cmc')
-|   File "/omd/sites/home/lib/python3/cmk/update_rrd_fs_names.py", line 80, in update_files
-|     filepath = get_info_file(hostname, servicedesc, source)
-|   File "/omd/sites/home/lib/python3/cmk/update_rrd_fs_names.py", line 64, in get_info_file
-|     host_dir = cmk.base.cee.rrd.rrd_cmc_host_dir(hostname)
-| AttributeError: module 'cmk.base.cee' has no attribute 'rrd'

It’s annoying, although everything works fine after the update. main.mk is already empty (only the first 2 commented lines).

Von welcher Version auf welche wurde da genau geupdatet?

1.6 raw → 2.0.0p1 raw
1.6 raw → 2.0.0p1 enterprise free
1.6 raw → 2.0.0p1 enterprise

In my case 1.6 raw to 2.0.0 raw, then p1, p2 and p3 (all raw). If there is a file I could edit/delete to avoid this error it would be appreciated.

I got the same Error again after updating from 2.0.0p1.cre to 2.0.0p3.cre

2021-05-05 10:14:28 - Updating site 'monitor1' from version 2.0.0p1.cre to 2.0.0p3.cre...

 * Updated        etc/ssl/misc/tsget.pl
Creating temporary filesystem /omd/sites/monitor1/tmp...OK
Executing update-pre-hooks script "02_cmk-update-config"...
-| Initializing application...
-| Loading GUI plugins...
-| Updating Checkmk configuration...
-| ATTENTION: Some steps may take a long time depending on your installation, e.g. during major upgrades.
-|  1/15 Migrate deprecated network topology dashlet...
-|  2/15 Update global settings...
-| Replacing use_inline_snmp with snmp_backend_default
-|  3/15 Rewriting WATO tags...
-|  4/15 Rewriting WATO hosts and folders...
-|  5/15 Rewriting WATO rulesets...
-| Replacing ruleset non_inline_snmp_hosts with snmp_backend_hosts
-|  6/15 Rewriting autochecks...
-|  7/15 Cleanup version specific caches...
-|  8/15 Migrating fs_used name...
-|  + "Migrating fs_used name" failed
-| Traceback (most recent call last):
-|   File "/omd/sites/monitor1/lib/python3/cmk/update_config.py", line 146, in run
-|     step_func()
-|   File "/omd/sites/monitor1/lib/python3/cmk/update_config.py", line 183, in _update_fs_used_name
-|     cmk.update_rrd_fs_names.update()
-|   File "/omd/sites/monitor1/lib/python3/cmk/update_rrd_fs_names.py", line 186, in update
-|     update_service_info(config_cache, get_hostnames(config_cache))
-|   File "/omd/sites/monitor1/lib/python3/cmk/update_rrd_fs_names.py", line 174, in update_service_info
-|     update_files(hostname, service.description, service.item, 'cmc')
-|   File "/omd/sites/monitor1/lib/python3/cmk/update_rrd_fs_names.py", line 80, in update_files
-|     filepath = get_info_file(hostname, servicedesc, source)
-|   File "/omd/sites/monitor1/lib/python3/cmk/update_rrd_fs_names.py", line 64, in get_info_file
-|     host_dir = cmk.base.cee.rrd.rrd_cmc_host_dir(hostname)
-| AttributeError: module 'cmk.base.cee' has no attribute 'rrd'
-|  9/15 Migrate pagetype topics...
-|  10/15 Migrate LDAP connections...
-|  11/15 Rewrite BI Configuration...
-| Skipping conversion of bi.mk (already done)
-|  12/15 Set version specific user attributes...
-|  13/15 Rewriting inventory data...
-| Skipping py2 inventory data update (already done)
-|  14/15 Migrate audit log...
-| No audit log present. Skipping.
-|  15/15 Rename discovered host label files...
-| Done
OK
Executing update-pre-hooks script "01_mkp-disable-outdated"...OK
Updating core configuration...
Generating configuration for core (type nagios)...Precompiling host checks...OK
OK
Finished update.

when updating from 1.6.0p22 to 2.0.0p1 the error did not appear.

Can confirm I still get the same error while updating from p3 to p4.

Can easily be tested with cmk-update-config -v as well.

All right so doing cmk-update-config -vvv I was able to get a little bit more insight on this error. It happens after processing all the autochecks/*.mk files. I tried removing the last file since the error happens immediately after it, thinking that specific configuration file might be the issue, but it isn’t. The updater does something after:

Precompile /omd/sites/home/share/check_mk/checks/zypper to /omd/sites/home/var/check_mk/precompiled_checks/builtin/zypper
Loading autochecks from /omd/sites/home/var/check_mk/autochecks/server-ipmi.mk
Loading autochecks from /omd/sites/home/var/check_mk/autochecks/vm-windows.mk
 + "Migrating fs_used name" failed
Traceback (most recent call last):
  File "/omd/sites/home/lib/python3/cmk/update_config.py", line 148, in run
    step_func()
  File "/omd/sites/home/lib/python3/cmk/update_config.py", line 187, in _update_fs_used_name
    cmk.update_rrd_fs_names.update()
  File "/omd/sites/home/lib/python3/cmk/update_rrd_fs_names.py", line 186, in update
    update_service_info(config_cache, get_hostnames(config_cache))
  File "/omd/sites/home/lib/python3/cmk/update_rrd_fs_names.py", line 174, in update_service_info
    update_files(hostname, service.description, service.item, 'cmc')
  File "/omd/sites/home/lib/python3/cmk/update_rrd_fs_names.py", line 80, in update_files
    filepath = get_info_file(hostname, servicedesc, source)
  File "/omd/sites/home/lib/python3/cmk/update_rrd_fs_names.py", line 64, in get_info_file
    host_dir = cmk.base.cee.rrd.rrd_cmc_host_dir(hostname)
AttributeError: module 'cmk.base.cee' has no attribute 'rrd'

Also, if that helps, trying to find cee stuff (which I never used):

[root@vm-checkmk ~]# locate /cee
/opt/omd/sites/home/local/lib/python3/cmk/base/cee
/opt/omd/sites/home/local/lib/python3/cmk/base/cee/plugins
/opt/omd/sites/home/local/lib/python3/cmk/base/cee/plugins/bakery
/opt/omd/sites/home/local/lib/python3/cmk/base/cee/plugins/bakery/apcaccess.py

Removing that plugin doesn’t help.

I could reproduce the error with a new Checkmk instanz.

  1. Install checkmk version > 2.0.0

  2. Create new site + install plugin sslcertificates from Heinlein support (check_mk_extensions/sslcertificates at cmk2.0 · HeinleinSupport/check_mk_extensions · GitHub)

  3. monitor 1 Host with sslcertificates Plugin

  4. run cmk-update-config -vvv → error at Plugin zypper

@dnLL do you use the same Plugin and can confirm this?

You have installed extension packages (MKPs) that contain CEE plugins. Remove the directory $OMD_ROOT/local/lib/check_mk/base/cee and all files in $OMD_ROOT/local/share/check_mk/web/plugins/wato/ that reference the CEE.

We tested this in CRE 2.0p4 and encountered no errors, neither installing the MKP nor in CMK operating or GUI.

cmk-update-config, run during updates and/or manually, complains about missing cee libraries, but this has no negative effect on operating at all…

1 Like

… but it does prevent the migration of some RRD names (fs_used). It’ll be fixed with Werk 12894 (probably in the upcoming p5 release).

3 Likes