eraser icon indicating copy to clipboard operation
eraser copied to clipboard

Failed to perform collection on k3s cluster nodes

Open cryptaliagy opened this issue 2 years ago • 5 comments

What steps did you take and what happened: [A clear and concise description of what the bug is.]

Attempted to install Eraser on cluster running k3s, and although the manager was able to successfully run, all collectors failed. This failed using both the manifest and the helm installation process, for versions v0.5.0 and v0.4.0, as well as for the manifest installation v1.0.0-beta.3.

All version experienced the same error logs on the collector pods:

Defaulted container "collector" out of: collector, eraser, trivy-scanner
{"level":"error","ts":1674667563.8705308,"logger":"collector","msg":"failed to get image client","error":"rpc error: code = Unimplemented desc = unknown service runtime.v1.RuntimeService\nrpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService","stacktrace":"main.main\n\t/workspace/pkg/collector/collector.go:60\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:250"}

What did you expect to happen:

Eraser to set up image cleaning

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

Environment:

  • Eraser version: v0.4.0, v0.5.0, v1.0.0-beta.3
  • Kubernetes version: (use kubectl version): Client Version: v1.25.2 Kustomize Version: v4.5.7 Server Version: v1.25.4+k3s1

cryptaliagy avatar Jan 25 '23 17:01 cryptaliagy

This might be due to k3s containerd.sock path is not using the default value (/run/containerd/containerd.sock) but instead /run/k3s/containerd/containerd.sock https://github.com/k3s-io/k3s/blob/89f7062431b85984d30d2348ea118056b512278f/pkg/agent/run_linux.go#L16

I am not familiar with k3s, but if there is a way to change path to default value for k3s, this should unblock you.

sozercan avatar Jan 26 '23 22:01 sozercan

Is it possible instead to expose the containerd path used by Eraser as a config value (i.e. in the helm values file)?

cryptaliagy avatar Jan 27 '23 16:01 cryptaliagy

@taliamax yes, we can add to backlog for path to be part of configmap. If you are interested in contributing, feel free to pick up this issue.

sozercan avatar Jan 27 '23 22:01 sozercan

Related #647

pmengelbert avatar Feb 24 '23 17:02 pmengelbert

related https://github.com/aquasecurity/trivy/pull/3599 for trivy support

sozercan avatar Mar 06 '23 19:03 sozercan