OpenShift health check failed because oc exec expects elasticsearch as first container in pod
Issue
- OpenShift health check failed with below error:
"/elasticsearch/persistent': No such file or directory\ncommand terminated with exit code 1"
- OpenShift health check failed with below error:
Failure summary:
Hosts: example.com
Play: OpenShift Health Checks
Task: Run health checks (@health)
Message: One or more checks failed
Details: check "elasticsearch":
Unexpected error using `oc` to validate the logging stack components.
Error executing `oc exec logging-es-data-master-ml2ru5kp-1-hgcr4 -- df --output=ipcent,pcent /elasticsearch/persistent`:
[rc 1] /bin/oc --config /etc/origin/master/admin.kubeconfig -n logging exec logging-es-data-master-ml2ru5kp-1-hgcr4 -- df --output=ipcent,pcent /elasticsearch/persistent
Defaulting container name to proxy.
Use 'oc describe pod/logging-es-data-master-ml2ru5kp-1-hgcr4' to see all of the containers in this pod.
df: '/elasticsearch/persistent': No such file or directory
command terminated with exit code 1
Environment
- OpenShift Container Platform 3.7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.