Migrate HTML email TypeError: argument of type 'NoneType' is not iterable

CMK version: from version 2.3.0p41.cme to 2.4.0p16.cme
OS version: RHEL 9.7 (Plow)

Error message:

During omd update as the site user on a lab server as testing for production rollout.

-|  07/12 Migrate HTML email...
-| Traceback (most recent call last):
-|   File "/omd/sites/corpnms/lib/python3/cmk/update_config/main.py", line 104, in main_check_config
-|     check_config(logger, conflict)
-|   File "/omd/sites/corpnms/lib/python3/cmk/update_config/main.py", line 244, in check_config
-|     pre_action(logger, conflict_mode)
-|   File "/omd/sites/corpnms/lib/python3/cmk/update_config/plugins/pre_actions/migrate_html_email.py", line 59, in __call__
-|     if "from" not in (parameter := cast(LegacyParameter, rule["notify_plugin"][1])):
-|        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-| TypeError: argument of type 'NoneType' is not iterable
-|
-| Update aborted with Error: argument of type 'NoneType' is not iterable.
-| Your site has not been modified.
-| The update can be retried after the error has been fixed.

Under “Setup > Services > Service monitoring rules > Parameters for HTML Email” there are 2 active rules with email addresses in the “From” field.

Since this is lab I experimented with various rule fields and eventually deleted both rules just to see if I could get past it. Still getting the same error.

My next area to look is the Setup > Notifications rules but I have quite a few more rules here to deal with. I’m posting primarily to see if anyone else has experienced this type of issue or if there are some known problems or good way to isolate a root cause.

Sincerely,

Scotsie

Please use at least 2.4.0p17, see:

2 Likes

Thank you, I didn’t spot that and had avoided .17 due to the warning about SSL handling. I confirmed I have some negation rules which the werx specifically mentioned.

Pulling down 2.4.0p19.cme and running through the update allowed it to continue and complete.

Thanks again for pointing that out.

Sincerely,

Scotsie