Agent bakery: exception baking agents with TLS

CMK version:
2.1 Enterprise

OS version:
Ubuntu 20.04

Error message:

Exception: Error running automation call bake-agents (exit code 2), error: 
Error creating agent for GENERIC: Error in bakery plugin "agent_encryption" ("files" section): 'use_regular'

Traceback (most recent call last):
  File "/omd/sites/cb3/lib/python3/cmk/base/cee/bakery/agent_bakery.py", line 327, in _collect_bakelet_objects
    objects += function(**func_args)
  File "/omd/sites/cb3/lib/python3/cmk/base/cee/api/bakery/function_types.py", line 103, in filtered_generator
    for element in function(*args, **kwargs):
  File "/omd/sites/cb3/lib/python3/cmk/base/cee/plugins/bakery/agent_encryption.py", line 29, in get_agent_encryption_files
    conf["passphrase"], conf["use_regular"], conf["use_realtime"]
KeyError: 'use_regular'

This error comes for every Host (Ubuntu 20.04 and Centos 7)

When I deactivate encryption it works. So am I doing something wrong?

Thanks for your help!

Daniel

Same here, but on Debian 11.

CMK 2.1p2

I checked on my test system (Ubuntu 20.04 / CMK 2.1.0p2) and got no error message at building time.
Is in your system only one encryption rule?
I tested also with one old rule and one rule for TLS and also no error.

Wanted to test TLS and got the same problem. Running 2.1.0p2 Enterprise

I’m having the same issue. New user trialling checkMK, 2.1.0p9 Enterprise Free.

Exception: Error running automation call bake-agents (exit code 2), error: 
Error creating agent for GENERIC: Error in bakery plugin "agent_encryption" ("files" section): 'use_regular'

Traceback (most recent call last):
  File "/omd/sites/cmk/lib/python3/cmk/base/cee/bakery/agent_bakery.py", line 328, in _collect_bakelet_objects
    objects += function(**func_args)
  File "/omd/sites/cmk/lib/python3/cmk/base/cee/api/bakery/function_types.py", line 103, in filtered_generator
    for element in function(*args, **kwargs):
  File "/omd/sites/cmk/lib/python3/cmk/base/cee/plugins/bakery/agent_encryption.py", line 29, in get_agent_encryption_files
    conf["passphrase"], conf["use_regular"], conf["use_realtime"]
KeyError: 'use_regular'