Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection throws errors when creating many objects (for example Icinga Apply rules) #136

Open
xFuture603 opened this issue Sep 6, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@xFuture603
Copy link
Collaborator

As the title already says, errors occur from time to time, which are generated by the collection when too many objects are created.
The code still runs through and creates the remaining objects, but is then evaluated by Ansible itself as failed and so pipelines (with the collection included), for example, will also fail in the end.

I noticed this when creating service apply objects. The code we use for this service contains about 280 apply objects. I haven't noticed this behavior in a smaller codebase.

I would also like to say that for newly created objects we leave the old objects on our Icinga instance and only deploy the new objects to it.

Failing task: t_systems_mms.icinga_director.ansible_icinga : icinga_service_apply

Error: An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'unicode' object has no attribute 'items'

Please reply if you need more information. Thanks in advance!

@xFuture603 xFuture603 added the bug Something isn't working label Sep 6, 2021
@rndmh3ro rndmh3ro closed this as completed Sep 7, 2021
@rndmh3ro rndmh3ro reopened this Sep 7, 2021
@rndmh3ro
Copy link
Collaborator

rndmh3ro commented Sep 7, 2021

This seems to happen when the return data data_from_director is empty or otherwise bogus, here:
https://github.com/T-Systems-MMS/ansible-collection-icinga-director/blob/025f4f95d89e8eca4bc104127f23647249a7b573/plugins/module_utils/icinga.py#L212-L216

However I cannot reproduce it easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants