Skip to content

Fail to run experiment on EKS : error with volumes #70

@lolovroom

Description

@lolovroom

Deployed the operator on EKS.
First modify the ClusterRole so it can:

  • create/patch configmaps
  • create namespace
  • patch service account

then add the hello-world experiment describe in the doc :

---
apiVersion: v1
kind: ConfigMap
metadata:
  name: chaostoolkit-experiment
  namespace: chaostoolkit-run
data:
  experiment.json: |
    {
      "version": "1.0.0",
      "title": "Hello world!",
      "description": "Say hello world.",
      "method": [
        {
          "type": "action",
          "name": "say-hello",
          "provider": {
            "type": "process",
            "path": "echo",
            "arguments": "hello"
          }
        }
      ]
    }
---
apiVersion: chaostoolkit.org/v1
kind: ChaosToolkitExperiment
metadata:
  name: my-chaos-exp
  namespace: chaostoolkit-crd

We got the following error in the controller log :

[2020-11-25 13:49:18,062] kopf.objects         [INFO    ] Default PSP for chaostoolkit not found.
[2020-11-25 13:49:18,093] kopf.objects         [INFO    ] Namespace 'chaostoolkit-run' already exists. Let's continue...
[2020-11-25 13:49:18,094] kopf.objects         [INFO    ] [chaostoolkit-crd/my-chaos-exp] chaostoolkit resources will be created in namespace 'chaostoolkit-run'
[2020-11-25 13:49:18,094] kopf.objects         [INFO    ] [chaostoolkit-crd/my-chaos-exp] Suffix for resource names will be '-jsbdk'
[2020-11-25 13:49:18,190] kopf.objects         [INFO    ] [chaostoolkit-crd/my-chaos-exp] Created service account
[2020-11-25 13:49:18,305] kopf.objects         [INFO    ] [chaostoolkit-crd/my-chaos-exp] Created role
[2020-11-25 13:49:18,399] kopf.objects         [INFO    ] [chaostoolkit-crd/my-chaos-exp] Created rolebinding
[2020-11-25 13:49:18,492] kopf.objects         [INFO    ] Env config map named 'chaostoolkit-env'
[2020-11-25 13:49:18,492] kopf.objects         [INFO    ] Removing default settings secret volume
[2020-11-25 13:49:18,492] kopf.objects         [INFO    ] Experiment config map named 'chaostoolkit-experiment'
[2020-11-25 13:49:18,493] 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 272, in execute_handler_once
    subrefs=subrefs,
  File "/usr/local/lib/python3.7/site-packages/kopf/reactor/handling.py", line 371, in invoke_handler
    **kwargs,
  File "/usr/local/lib/python3.7/site-packages/kopf/reactor/invocation.py", line 124, in invoke
    result = await fn(*args, **kwargs)  # type: ignore
  File "controller.py", line 101, in create_chaos_experiment
    pod_tpl = await create_pod(v1, cm, spec, ns, name_suffix, meta)
  File "controller.py", line 397, in run
    return await loop.run_in_executor(executor, pfunc)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "controller.py", line 629, in create_pod
    set_experiment_config_map_name(tpl, experiment_config_map_name)
  File "controller.py", line 301, in set_experiment_config_map_name
    for volume in spec["volumes"]:
KeyError: 'volumes'`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions