Werk #13421: mk_sap: detect recursion in SAP data

Component Checks & agents
Title mk_sap: detect recursion in SAP data
Date Jun 1, 2022
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed
Checkmk versions & editions
2.2.0b1 Checkmk Raw (CRE), Checkmk Enterprise (CEE), Checkmk Cloud (CCE), Checkmk MSP (CME)

mk_sap.py handles a tree of SAP objects. The objects are annotated with the path from the root of the tree to the object. The objects returned by SAP contain a link to their parent object. SAP can be configured in a way that the object references itself as its parent. This can lead to a cryptic recursion error message:

Unhandled exception (maximum recursion depth exceeded)

After this werk a better error message will be shown including the object that is the root cause of the recursion error:

Could not calculate path, recursion limit reached. Reorganise your SAP data to get past this error. Element that causes this: ...

You will have to fix this problem within SAP.

To the list of all Werks