Description of problem: Given there are non Running es pod. The Getting ES version task will run on the first es pod no mattter the status of this pod. For example: $ oc get pods NAME READY STATUS RESTARTS AGE logging-es-data-master-9me3c0ew-1-46zdb 0/2 Evicted 0 27m logging-es-data-master-9me3c0ew-1-fhn5m 0/2 Evicted 0 26m logging-es-data-master-9me3c0ew-1-gngnp 2/2 Running 0 26m Version-Release number of selected component (if applicable): How reproducible: sometimes Steps to Reproduce: 1. deploy logging 2. Create some es pod in non Running status. NAME READY STATUS RESTARTS AGE logging-es-data-master-9me3c0ew-1-46zdb 0/2 Evicted 0 27m logging-es-data-master-9me3c0ew-1-fhn5m 0/2 Evicted 0 26m logging-es-data-master-9me3c0ew-1-gngnp 2/2 Running 0 26m 3. redeploy logging Actual results: 3. Getting ES version for logging-es cluster failed for the playbook was trying to run command in a Evicted pod logging-es-data-master-9me3c0ew-1-46zdb TASK [openshift_logging_elasticsearch : Getting ES version for logging-es cluster] ******************************************************************************************************************************** fatal: [host-8-241-50.host.centralci.eng.rdu2.redhat.com]: FAILED! => {"changed": true, "cmd": ["oc", "exec", "logging-es-data-master-9me3c0ew-1-46zdb", "-c", "elasticsearch", "-n", "logging", "--", "curl", "-s", "--cacert", "/etc/elasticsearch/secret/admin-ca", "--cert", "/etc/elasticsearch/secret/admin-cert", "--key", "/etc/elasticsearch/secret/admin-key", "-XGET", "https://localhost:9200/"], "delta": "0:00:00.207379", "end": "2018-01-16 02:13:51.305646", "failed": true, "msg": "non-zero return code", "rc": 1, "start": "2018-01-16 02:13:51.098267", "stderr": "error: cannot exec into a container in a completed pod; current phase is Failed", "stderr_lines": ["error: cannot exec into a container in a completed pod; current phase is Failed"], "stdout": "", "stdout_lines": []} Expected results: The playbook should use the running pod. Additional info:
https://github.com/openshift/openshift-ansible/pull/6743
Verified on ose-ansible:v3.9.0-0.22.0.0"
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0489