Changing opensearch.yml file

Hello All,
I’m getting the below error while trying to deploy Opensearch v1.2.3 on K8s using helm charts.

Warning Failed 3s (x3 over 17s) kubelet Error: failed to create containerd task: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: rootfs_linux.go:76: mounting “/var/lib/kubelet/pods/5821f395-5439-4f31-b7ce-88df232d5481/volume-subpaths/config/opensearch/2” to rootfs at “/usr/share/opensearch/config/opensearch.yml” caused: mount through procfd: not a directory: unknown
Warning BackOff 2s (x3 over 15s) kubelet Back-off restarting failed container

This error is coming when I’m trying to change some parameters in the opensearch.yaml file in helm charts.
not able to understand the error completely can someone help.

Hi

Any update ?

Thanks
Sharath

I am running into a similar problem with docker as well :

Attaching to opensearch-dashboards, opensearch-node1
Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting “/Users/atitaarora/workspace/opensearch-docker/compose/opensearch.yml” to rootfs at “/usr/share/opensearch/config/opensearch.yml” caused: mount through procfd: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.

The problem is that the dir /usr/share/opensearch/ itself is not there but i am not sure if its not supposed to exist.

Were you able to resolve it ?

Hi @sharath and @atitaarora - did you ever find a solution for your issue? This sure sounds like a docker issue. /usr/share/opensearch is where OpenSearch lives inside of the container. It sounds like it’s trying to create docker volumes to store data and failing. However, I don’t think I’m familiar enough with Kubernetes to offer you much advice there. Perhaps someone else here can address that.

If you download the latest docker-compose.yml and bring up the OpenSearch test cluster, do you still have trouble creating and mounting volumes inside of docker containers?

Thanks!

Nate

Hey @sharath could you also share some of the config changes you’ve made to the yaml. To me this seems like there may be a permissions issue reading that file though. Are you able to try and login as user for the kubelets process and try and access that file? Then you can try and see if it exists as a super user and see if you can read it.