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

Issue with ConfigMap when creating ChaosToolkitExperiment #18

Open
dmartin35 opened this issue Mar 19, 2020 · 1 comment
Open

Issue with ConfigMap when creating ChaosToolkitExperiment #18

dmartin35 opened this issue Mar 19, 2020 · 1 comment

Comments

@dmartin35
Copy link
Contributor

[2020-03-19 16:03:07,467] kopf.objects         [ERROR   ] [chaostoolkit-crd/my-chaos-exp] Handler 'create_chaos_experiment' failed with an exception. Will retry.
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/kopf/reactor/handling.py", line 291, in execute_handler_once
    lifecycle=lifecycle,  # just a default for the sub-handlers, not used directly.
  File "/usr/local/lib/python3.7/site-packages/kopf/reactor/handling.py", line 380, in invoke_handler
    **kwargs,
  File "/usr/local/lib/python3.7/site-packages/kopf/reactor/invocation.py", line 117, in invoke
    result = await fn(*args, **kwargs)  # type: ignore
  File "controller.py", line 67, in create_chaos_experiment
    kopf.adopt(cm_tpl, owner=body)
  File "/usr/local/lib/python3.7/site-packages/kopf/toolkits/hierarchies.py", line 139, in adopt
    append_owner_reference(objs, owner=real_owner)
  File "/usr/local/lib/python3.7/site-packages/kopf/toolkits/hierarchies.py", line 28, in append_owner_reference
    refs = obj.setdefault('metadata', {}).setdefault('ownerReferences', [])
AttributeError: 'V1ConfigMap' object has no attribute 'setdefault'
@dmartin35
Copy link
Contributor Author

workaround:
wait for a couple of seconds that kubernetes retries to launch it, and the second time it works fine

are all resources (ie config map) created when the CRD tries to create the experiment pod ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant