Exception on Update from 2.1.0 to 2.2.0

CMK version:
2.1.0p39.cfe
OS version:
Ubuntu 20.04

Description
While perfoming the update I receive the following exception. If I continue, many many other exceptions of the same kind are thrown.

What could be wrong?

Steps:

  • omd update
  • Choose version
  • Yes
  • Yes to switch to new Cloud Version

Error message:
2024-02-07 14:08:23 - Updating site ‘checkmktest’ from version 2.1.0p39.cfe to 2.2.0p21.cce…


 ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
 ! Exception      var
 ! Traceback (most recent call last):
 !   File "/omd/versions/2.2.0p21.cce/lib/python3/omdlib/main.py", line 858, in _execute_update_file
 !     update_file(
 !   File "/omd/versions/2.2.0p21.cce/lib/python3/omdlib/main.py", line 932, in update_file
 !     **site.replacements,
 !       ^^^^^^^^^^^^^^^^^
 !   File "/omd/versions/2.2.0p21.cce/lib/python3/omdlib/contexts.py", line 159, in replacements
 !     "###EDITION###": Edition[version.split(".")[-1].upper()].long,
 !                      ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 !   File "/omd/versions/2.2.0p21.cce/lib/python3.11/enum.py", line 790, in __getitem__
 !     return cls._member_map_[name]
 !            ~~~~~~~~~~~~~~~~^^^^^^
 ! KeyError: 'CFE'
 !
 ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !

 Problem occured
  We  detected an exception (printed above). You have the chance to fix things
  and retry the operation now.


  retry       Retry the operation
  continue    Continue with next files
  abort       Stop here and abort update!

same issue here when trying to update from check-mk-free-2.1.0p39_0.bullseye_amd64.deb to check-mk-cloud-2.2.0p21_0.bullseye_amd64.deb

Also same Issue for update from check-mk-free-2.1.0p39_0.jammy_amd64.deb → check-mk-cloud-2.2.0p21_0.jammy_amd64.deb

Hi guys,

We’ll check this, stay tuned…

BR,
Marsellus W.

Hi @littera , @nona00 , @corus87 (and all others reading this thread),

I have a fix for your problem:

  1. Open /opt/omd/versions/2.2.0p21.cce/lib/python3/cmk/utils/version.py as root in the editor of your choice.
  2. In the file let “class Edition” begin like this (add the CFE line) and save it:
class Edition(_EditionValue, enum.Enum):
    CRE = _EditionValue("cre", "raw", "Checkmk Raw Edition")
    CFE = _EditionValue("cfe", "free", "Checkmk Free Edition")
    CEE = _EditionValue("cee", "enterprise", "Checkmk Enterprise Edition")
    CCE = _EditionValue("cce", "cloud", "Checkmk Cloud Edition")
    CME = _EditionValue("cme", "managed", "Checkmk Managed Services Edition")
(...)

Update your site, it will work!

As this only fixes 2.2.0p21.cce as target version, I opened an internal ticket with hope to get it fixes as soon as possible. Besides this the changed file should also work with other 2.2.0pXY.cce versions… :wink:

Many thanks for reporting and even more thanks for your patience!

Best regards, Happy Monitoring,
Marsellus W.

4 Likes

Run into the same problem.
So i decide to update first to 2.2.0p12 without any issues and after that update to 2.2.0p21.
No messages about the ‘CFE’ version.
2.0.0p38(free) → 2.1.0p39cfe → 2.2.0p12cce → 2.2.0p21cce

Works like a charm.

Thank you very much @MarsellusWallace, I can confirm its working :slight_smile:

For me its also working. Thank you very much @MarsellusWallace