illuminatio icon indicating copy to clipboard operation
illuminatio copied to clipboard

Add support for CRI-O runtime interface

Open msmith93 opened this issue 4 years ago • 0 comments

I would like to use illuminatio to test my k3s cluster that is using CRI-O as the runtime interface, but it looks like it is not supported:

illuminatio --kubeconfig /etc/rancher/k3s/k3s.yaml clean run
Starting cleaning resources with policies ['on-request', 'always']
Finished cleanUp
Starting test generation and run.
Generated 4 cases in 0.0612 seconds

FROM                                                                    TO                            PORT
illuminatio-inverted-default:app=hello-kubernetes                       default:app=hello-kubernetes  -*
illuminatio-inverted-default:illuminatio-inverted-app=hello-kubernetes  default:app=hello-kubernetes  -*
default:illuminatio-inverted-app=hello-kubernetes                       default:app=hello-kubernetes  -*
default:app=hello-kubernetes                                            default:app=hello-kubernetes  *

Traceback (most recent call last):
  File "/home/vagrant/ps-hello-world/venv/lib64/python3.6/site-packages/illuminatio/test_orchestrator.py", line 576, in _ensure_daemonset_exists
    namespace=PROJECT_NAMESPACE, name=daemonset_name
  File "/home/vagrant/ps-hello-world/venv/lib64/python3.6/site-packages/kubernetes/client/api/apps_v1_api.py", line 6051, in read_namespaced_daemon_set
    return self.read_namespaced_daemon_set_with_http_info(name, namespace, **kwargs)  # noqa: E501
  File "/home/vagrant/ps-hello-world/venv/lib64/python3.6/site-packages/kubernetes/client/api/apps_v1_api.py", line 6160, in read_namespaced_daemon_set_with_http_info
    collection_formats=collection_formats)
  File "/home/vagrant/ps-hello-world/venv/lib64/python3.6/site-packages/kubernetes/client/api_client.py", line 353, in call_api
    _preload_content, _request_timeout, _host)
  File "/home/vagrant/ps-hello-world/venv/lib64/python3.6/site-packages/kubernetes/client/api_client.py", line 184, in __call_api
    _request_timeout=_request_timeout)
  File "/home/vagrant/ps-hello-world/venv/lib64/python3.6/site-packages/kubernetes/client/api_client.py", line 377, in request
    headers=headers)
  File "/home/vagrant/ps-hello-world/venv/lib64/python3.6/site-packages/kubernetes/client/rest.py", line 243, in GET
    query_params=query_params)
  File "/home/vagrant/ps-hello-world/venv/lib64/python3.6/site-packages/kubernetes/client/rest.py", line 233, in request
    raise ApiException(http_resp=r)
kubernetes.client.exceptions.ApiException: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Kubernetes-Pf-Flowschema-Uid': '9563d3f0-3cd3-4ed4-ae06-12022903b8f2', 'X-Kubernetes-Pf-Prioritylevel-Uid': 'c8fa6937-32dc-4a8d-bbe6-c9660d91b4c3', 'Date': 'Thu, 11 Feb 2021 21:53:38 GMT', 'Content-Length': '236'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"daemonsets.apps \"illuminatio-runner\" not found","reason":"NotFound","details":{"name":"illuminatio-runner","group":"apps","kind":"daemonsets"},"code":404}



During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/vagrant/ps-hello-world/venv/bin/illuminatio", line 8, in <module>
    sys.exit(cli())
  File "/home/vagrant/ps-hello-world/venv/lib64/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/vagrant/ps-hello-world/venv/lib64/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/vagrant/ps-hello-world/venv/lib64/python3.6/site-packages/click/core.py", line 1289, in invoke
    rv.append(sub_ctx.command.invoke(sub_ctx))
  File "/home/vagrant/ps-hello-world/venv/lib64/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/vagrant/ps-hello-world/venv/lib64/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/vagrant/ps-hello-world/venv/lib64/python3.6/site-packages/illuminatio/illuminatio.py", line 164, in run
    ) = execute_tests(cases, orch, cri_socket)
  File "/home/vagrant/ps-hello-world/venv/lib64/python3.6/site-packages/illuminatio/illuminatio.py", line 214, in execute_tests
    cfgmap, k8s.client.AppsV1Api(), core_api, cri_socket
  File "/home/vagrant/ps-hello-world/venv/lib64/python3.6/site-packages/illuminatio/test_orchestrator.py", line 454, in ensure_daemonset_is_ready
    daemonset_name, service_account_name, config_map_name, apps_api, cri_socket
  File "/home/vagrant/ps-hello-world/venv/lib64/python3.6/site-packages/illuminatio/test_orchestrator.py", line 585, in _ensure_daemonset_exists
    cri_socket,
  File "/home/vagrant/ps-hello-world/venv/lib64/python3.6/site-packages/illuminatio/test_orchestrator.py", line 538, in create_daemonset_manifest
    f"Unsupported container runtime: {container_runtime}"
NotImplementedError: Unsupported container runtime: cri-o://1.20.0

msmith93 avatar Feb 11 '21 21:02 msmith93