2.5.0 Upgrade Remote Appliance Sites

CMK version: 2.5.0
OS version: Linux Ubuntu 24.04

Hi,

wir haben in unserer MSP Zentrale nun 2.5.0 im Einsatz.

Auf den Remote Sites wollen wir upgraden zu Version 2.5.0 UltimateMT.

Beim Upgrade erscheint auf allen Remote Instanzen der Fehler:

NameError: name ‘default_user_profile’ is not defined

oder

File "/omd/sites/LGWE/etc/check_mk/multisite.d/wato/customers.mk", line 7, in <module>
-|     default_user_profile.update({'customer': 'LGWE'})

Kann jemand helfen?

Du hast die Zentrale vor den Remote Sites aktualisiert?

Du müsstest zuerst die Remote Sites aktualisieren, und dann die Zentrale (siehe: Updates and Upgrades)

Die Remote Sites empfangen ja die zentrale Konfig. Eine remote 2.5.0 Site weiß, wie man mit einer 2.4.0 Config umgeht. Eine remote 2.4.0 Site kann die 2.5.0 Config nicht kennen.

Hast du die Remotes schon aktualisiert und der Fehler tritt auf auch nach dem Update?

Unsere Remote Sites sind alles Virtuelle Appliances. Bis jetzt haben wir das immer so gehandhabt.

Was ich versuchen kann ist den Snapshot unserer Zentrale zurück auf die 2.4.0p26 einzuspielen und danach die Remote Sites zu aktualisieren.

Für mich liest sich der Fehler aber wie ein fehlender Parameter in einer Konfiguration auf der Remote Site.

Man kann sagen der Fehler tritt während des Upgrades von 2.4.0p26.cme auf 2.5.0.ultimatemt auf.

Ich habe nun den Snapshot wieder eingespielt und meine Zentrale hat nun die 2.4.0p26.

Das Upgrade auf der Remote Site von 2.4.0p26 auf 2.5.0 wirft dann den Fehler:

Fehler während des Updates:

OMD-Befehl omd -V 2.5.0.ultimatemt update --pre-flight=abort --skeleton=install --confirm-version --confirm-edition LGWE konnte nicht ausgeführt werden: Cleaning up tmp directory...OK
2026-04-28 17:24:20 - Updating site 'LGWE' from version 2.4.0p26.cme to 2.5.0.ultimatemt...

 * Installed dir  .restore_working_dir
 * Updated        .profile
 * Installed dir  var/clickhouse-server
 * Installed dir  var/log/clickhouse-server
 * Installed dir  etc/clickhouse-server
 * Installed dir  etc/agent-receiver
 * Installed file etc/cron.d/cmk_transform_inventory_trees
 * Updated        etc/mk-livestatus/nagios.cfg
 * Updated        etc/init.d/automation-helper
 * Updated        etc/init.d/liveproxyd
 * Updated        etc/init.d/cmc
 * Updated        etc/init.d/mknotifyd
 * Installed file etc/init.d/metric-backend
 * Updated        etc/init.d/otel-collector
 * Updated        etc/init.d/agent-receiver
 * Updated        etc/rabbitmq/definitions.d/00-default.json
 * Updated        etc/rabbitmq/conf.d/00-default.conf
 * Updated        etc/ssl/openssl.cnf.dist
 * Updated        etc/ssl/openssl.cnf
 * Permissions    0640 -> 0750 etc/ssl/misc/CA.pl
 * Updated        etc/ssl/misc/tsget.pl
 * Updated        etc/check_mk/apache.conf
 * Installed link etc/rc.d/92-metric-backend
 * Installed dir  etc/clickhouse-server/users.d
 * Installed dir  etc/clickhouse-server/config.d
 * Installed file etc/clickhouse-server/users.xml
 * Installed file etc/clickhouse-server/config.xml
 * Updated        etc/otel-collector/fallback.yaml
 * Updated        etc/nagios/conf.d/check_mk_templates.cfg
 * Updated        etc/apache/apache.conf
 * Updated        etc/apache/conf.d/security.conf
 * Updated        etc/apache/conf.d/nagvis.conf
 * Updated        etc/apache/conf.d/check_mk.conf
 * Installed file etc/agent-receiver/gunicorn.conf.py
 * Vanished       .cache/.gitkeep
 * Vanished       etc/default/cmc
 * Vanished       etc/default
 * Vanished       var/check_mk/persisted
 * Vanished       var/monitoring-plugins
Creating temporary filesystem /omd/sites/LGWE/tmp...OK
Executing 'cmk-update-config --conflict abort --dry-run'
-| ATTENTION
-|   Some steps may take a long time depending on your installation.
-|   Please be patient.
-| 
-| /etc/timezone is deprecated in some distros, and no longer reliable. tzlocal is ignoring it, and you can likely delete it.
-| Cleanup precompiled host and folder files
-| Verifying Checkmk configuration...
-|  01/12 Legacy check plug-ins...
-|  02/12 Rulesets...
-|  03/12 UI extensions...
-|  04/12 Welcome page conflict detection...
-|  05/12 OTel configurations...
-|  06/12 Migrate Azure Storage...
-|  07/12 Agent based plugins...
-|  08/12 Dynamic host config...
-| DCD monitoring config validation skipped on remote site.
-|  09/12 License Enforcement...
-|  10/12 Autochecks...
-|  11/12 Forecast graphs...
-|  12/12 Fix installed MKPs with files in local/lib/check_mk...
-| Done (success)
-| 

Completed verifying site configuration. Your site now has version 2.5.0.ultimatemt.
The update was rolled back successfully.
Executing post-update script "01_mkp-disable-outdated"...OK
Executing post-update script "02_cmk-update-config"...
-| ATTENTION
-|   Some steps may take a long time depending on your installation.
-|   Please be patient.
-| 
-| /etc/timezone is deprecated in some distros, and no longer reliable. tzlocal is ignoring it, and you can likely delete it.
-| Cleanup precompiled host and folder files
-| Verifying Checkmk configuration...
-|  01/12 Legacy check plug-ins...
-|  02/12 Rulesets...
-|  03/12 UI extensions...
-|  04/12 Welcome page conflict detection...
-|  05/12 OTel configurations...
-|  06/12 Migrate Azure Storage...
-|  07/12 Agent based plugins...
-|  08/12 Dynamic host config...
-| DCD monitoring config validation skipped on remote site.
-|  09/12 License Enforcement...
-|  10/12 Autochecks...
-|  11/12 Forecast graphs...
-|  12/12 Fix installed MKPs with files in local/lib/check_mk...
-| Done (success)
-| 
-| Updating Checkmk configuration...
-|  01/53 Cleanup Micro Core config...
-|  02/53 Migrate distributed_wato.mk variable names...
-|  03/53 Update Broker Certificates...
-| Broker certificate update skipped on remote site
-|  04/53 Initialize site configuration...
-|  05/53 Create precompiled host and folder files...
-|  06/53 Migrate fetcher config...
-|  07/53 Use new service description...
-|  08/53 Migrate global proxies configuration...
-|  09/53 Global settings...
-|  10/53 Migrating all existing user sessions...
-|  11/53 OTel configurations...
-|  12/53 Remove cmk-match-type from agent config rules...
-|  13/53 Migrate Azure Storage...
-|  14/53 Scope of contact group 'Everything'...
-|  15/53 Clean up site connections...
-|  16/53 Rulesets...
-|  17/53 Remove autogenerated local/share/nagios/...
-|  18/53 Autochecks...
-|  19/53 Host check commands rules...
-|  20/53 Inventory rules for shipped dashboards...
-|  21/53 Process discovery for self monitoring...
-|  22/53 Storing unacknowledged werks...
-|  23/53 Cleanup version specific caches...
-|  24/53 Reset license verification files...
-|  25/53 Migrate Persisted Sections...
-|  26/53 Create relay CA...
-|  27/53 Terminating all existing user sessions...
-|  28/53 Fix installed MKPs with files in local/lib/check_mk...
-|  29/53 Rotate auth secret...
-|  30/53 Migrate bakery signing key state file keys from int to str...
-|  31/53 Update Site Certificate...
-| Site certificate already updated, skipping
-|  32/53 Updating site configurations...
-|  33/53 Migrate user messages...
-|  34/53 Migrate filters of HW/SW Inventory based views or dashboards...
-|  35/53 Migrate plan configurations of managed robots...
-|  36/53 Ensure initial agent baking on edition upgrade...
-|  37/53 Migrate attribute filters of HW/SW Inventory based reports...
-|  38/53 Add relay dynamic DNS rule...
-|  39/53 Ensure Broker Certificates include customer_id in SAN...
-|  + "Ensure Broker Certificates include customer_id in SAN" failed
-| Traceback (most recent call last):
-|   File "/omd/sites/LGWE/lib/python3.13/site-packages/cmk/ccc/store/__init__.py", line 139, in load_mk_file
-|     exec(compile(path.read_bytes(), path, "exec"), globals(), default)  # nosec B102 # BNS:aee528
-|     ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-|   File "/omd/sites/LGWE/etc/check_mk/multisite.d/wato/customers.mk", line 7, in <module>
-|     default_user_profile.update({'customer': 'LGWE'})
-|     ^^^^^^^^^^^^^^^^^^^^
-| NameError: name 'default_user_profile' is not defined
-| 
-| During handling of the above exception, another exception occurred:
-| 
-| Traceback (most recent call last):
-|   File "/omd/sites/LGWE/lib/python3/cmk/update_config/main.py", line 269, in update_config
-|     action(logger)
-|     ~~~~~~^^^^^^^^
-|   File "/omd/sites/LGWE/lib/python3/cmk/update_config/nonfree/ultimatemt/plugins/actions/ensure_broker_certificates_includes_customerid_in_san.py", line 31, in __call__
-|     customers = load_customers()
-|   File "/omd/sites/LGWE/lib/python3/cmk/gui/nonfree/ultimatemt/managed.py", line 56, in load_customers
-|     customers = store.load_from_mk_file(customers_filepath, key="customers", default={}, lock=False)
-|   File "/omd/sites/LGWE/lib/python3.13/site-packages/cmk/ccc/store/__init__.py", line 154, in load_from_mk_file
-|     return load_mk_file(path, default={key: default}, lock=lock)[key]  # type: ignore[return-value]
-|            ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-|   File "/omd/sites/LGWE/lib/python3.13/site-packages/cmk/ccc/store/__init__.py", line 146, in load_mk_file
-|     raise MKGeneralException(_('Cannot read configuration file "%s": %s') % (path, e))
-| cmk.ccc.exceptions.MKGeneralException: Cannot read configuration file "/omd/sites/LGWE/etc/check_mk/multisite.d/wato/customers.mk": name 'default_user_profile' is not defined
-|  40/53 Remove unreadable prediction files...
-|  41/53 Change SAML XML file configuration to text upload...
-|  42/53 Migrate user dashboards to the new config format...
-|  43/53 Topics...
-|  44/53 Forecast graphs...
-|  45/53 Migrate view column_headers 'repeat' to 'pergroup'...
-|  46/53 Event Console: Removing temporary migration backup files...
-|  47/53 Event Console: Migrate 10 second expect interval to 1 minute...
-|  48/53 Remove invalid host...
-|  49/53 Reset deprecations scheduling...
-|  50/53 Create instance ID...
-|  51/53 Check for deprecated check_http plug-in rules...
-|  52/53 Validating configuration files...
-|  53/53 Update core config...
-| /etc/timezone is deprecated in some distros, and no longer reliable. tzlocal is ignoring it, and you can likely delete it.
-| Generating configuration for core (type cmc)...
-| Starting full compilation for all hosts
-|  Creating global helper config...OK
-|  Creating cmc protobuf configuration...OK
-| Done (with errors)
ERROR (exit code: 1)

Danke, ich schau es mir an!

1 Like

Ich weiß was es ist.

Ihn stört die Zeile:

default_user_profile.update({'customer': 'LGWE'})

Wenn ich diese auskommentiere:

# default_user_profile.update({'customer': 'LGWE'})

Und dann das Upgrade laufen lasse klappt es.

Nun muss ich auf jede Remote Site via SSH um die Datei anzupassen?

Hi,
ich hab es zu einem Dev geschoben, um sich das anzusehen.
Schneller wird’s gehen, wenn du ein Ticket aufmachst. Wird aber auch sonst sich in den nächsten Tagen angesehen.
Grüße

Hi, ich habe ein Ticket geöffnet.

Entwickler hat nen Fix. Sollte mit der 2.5.0p1 raus kommen.

Super. Weißt du wann der Patch ca. kommt?

Ich denke Dienstag (5.5)

1 Like

should arrive tomorrow

Super. Ich warte sehnsüchtig :smiley:

Wird nichts mehr heute. Nächster Versuch morgen früh