REST API broken in 2.0.0p26

CMK version: 2.0.0p26
OS version: Debian 10

Error message:

 'errors': {'_schema': ["No such attribute, 'inventory_failed'"],
            'inventory_failed': ['Unknown field.']},
 'status': 500,
 'title': 'Server was about to send an invalid response.'}

When using the API endpoint /domain-types/host_config/collections/all to fetch all hosts I now get the above error. This is done with the example code from the API documentation itself.

It has worked in 2.0.0p20. This gets really frustrating, @LaMi :frowning:

I feel you :confused:. I can say is that we are working on improving the situation there.

I think in this case this is not a new bug. I guess a failed bulk discovery created the field ad-hoc in your installation. You could clean that up by finding the inventory_failed attribute in your files and removing it. Then the API calls should be happy again.

Regarding the bug: Looks like it was already fixed by #13646 (Fix host API calls in case a previous discovery failed) but did not make it into the 2.0.0 branch. Will care for the backport.

Thanks! So this is a case where the API should be more robust when encountering unknown attributes.

If found another issue:

We have a “checkbox” tag group defined as: {'id': 'ssh', 'title': 'SSH', 'tags': [{'id': 'ssh', 'title': 'check SSH Server', 'aux_tags': []}], 'topic': 'Services'}
If this is set, check_ssh will be configured for the host.

We have folders were this tag is set to be inherited by all the hosts in the folder.
A few of these hosts should not have check_ssh defined and we explicitedly unset that tag.
The WATO config file contains 'tag_ssh': None for these hosts.

The REST API says:

 'detail': 'This is an error of the implementation.',
 'errors': {'tag_ssh': ['Field may not be null.']}

What now?