Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1534879

Summary: check the ES version should use the Running pod
Product: OpenShift Container Platform Reporter: Anping Li <anli>
Component: LoggingAssignee: ewolinet
Status: CLOSED ERRATA QA Contact: Anping Li <anli>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.9.0CC: aos-bugs, rmeggins
Target Milestone: ---   
Target Release: 3.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
This came about from an enhancement to no longer use a config change trigger for the elasticsearch deployment config
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-28 14:19:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Anping Li 2018-01-16 08:10:12 UTC
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:

Comment 3 Anping Li 2018-01-23 03:15:46 UTC
Verified on ose-ansible:v3.9.0-0.22.0.0"

Comment 6 errata-xmlrpc 2018-03-28 14:19:53 UTC
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