operator-sdk icon indicating copy to clipboard operation
operator-sdk copied to clipboard

Failed to start container "memcached": Error response from daemon: failed to create shim: OCI runtime create failed

Open kavyamani596 opened this issue 3 years ago • 2 comments

Hello,

So I tried deploying the memcached operator, instead of pushing the image ,I build it locally and tried to use it for getting up the container, but when I apply the /config/samples/cache_v1alpha1_memcached.yaml file, It has problem running the containers.

NAME READY STATUS RESTARTS AGE memcached-sample-85c7664985-nq7ql 0/1 RunContainerError 0 15s memcached-sample-85c7664985-qpcv7 0/1 RunContainerError 0 15s memcached-sample-85c7664985-sxhk2 0/1 RunContainerError 0 15s

when I describe the pod, I see this

Events: Type Reason Age From Message


Normal Scheduled 25s default-scheduler Successfully assigned default/memcached-sample-85c7664985-nq7ql to clustervm Normal Pulled 7s (x3 over 23s) kubelet Container image "example.com/memcached-operator:0.0.1" already present on machine Normal Created 7s (x3 over 23s) kubelet Created container memcached Warning Failed 7s (x3 over 23s) kubelet Error: failed to start container "memcached": Error response from daemon: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "memcached": executable file not found in $PATH: unknown

So without building the image, when I apply the file, it pulls the image from dockerhub which is https://hub.docker.com/_/memcached/ memcached 1.4.36-alpine e36e3b0dc88c 4 years ago 6.91MB

when I exec-ed into the pod of this I was able to see memcached under /usr/local/bin/memcached

but I was not able to see the same in the running container of the image I created.

Let me know what is missed in the code for this

Thank you.

kavyamani596 avatar May 27 '22 10:05 kavyamani596

So, it looks like you're trying to deploy the regular memcached docker image - which is just a container that has memcached in it, not intended to be an operator controller. You need to build your operator image and either host it on an image registry like Docker Hub or upload it to the cluster manually before deploying your operator.

jberkhahn avatar Jun 07 '22 20:06 jberkhahn

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot avatar Sep 06 '22 09:09 openshift-bot

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten /remove-lifecycle stale

openshift-bot avatar Oct 07 '22 00:10 openshift-bot

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

openshift-bot avatar Nov 06 '22 09:11 openshift-bot

@openshift-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.

Reopen the issue by commenting /reopen. Mark the issue as fresh by commenting /remove-lifecycle rotten. Exclude this issue from closing again by commenting /lifecycle frozen.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

openshift-ci[bot] avatar Nov 06 '22 09:11 openshift-ci[bot]