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

Bug 1427598

Summary: [3.4] Logging Ops Deployment Fails
Product: OpenShift Container Platform Reporter: Marko Myllynen <myllynen>
Component: InstallerAssignee: ewolinet
Status: CLOSED ERRATA QA Contact: Gaoyun Pei <gpei>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.4.1CC: aos-bugs, ewolinet, ghuang, gpei, jokerman, jswensso, mmccomas, myllynen, pportant, rmeggins
Target Milestone: ---   
Target Release: 3.4.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: The logging operations facts for creating storage was missing Consequence: Logging ops storage wasn't correctly set up and the logging-ops pvc would fail to bind. Fix: Separate secret configured for creating storage to back logging-ops pvcs. Result: Logging-ops pvcs are able to correctly bind
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-05 08:53:22 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:
Bug Depends On: 1430235    
Bug Blocks:    

Description Marko Myllynen 2017-02-28 17:11:39 UTC
Description of problem:
A test installation (thus NFS) with

openshift_hosted_logging_deploy=true
openshift_hosted_logging_curator_nodeselector='region=infra'
openshift_hosted_logging_elasticsearch_nodeselector='region=infra'
openshift_hosted_logging_fluentd_nodeselector='region=infra'
openshift_hosted_logging_kibana_nodeselector='region=infra'
openshift_hosted_logging_storage_kind=nfs
openshift_hosted_logging_storage_access_modes=['ReadWriteOnce']
openshift_hosted_logging_storage_nfs_directory=/var/srv/nfs
openshift_hosted_logging_storage_nfs_options='*(rw,root_squash)'
openshift_hosted_logging_storage_volume_name=logging
openshift_hosted_logging_storage_volume_size=10Gi
openshift_master_logging_public_url=https://kibana.apps.test.example.com
openshift_hosted_logging_deployer_version=3.4.1
openshift_hosted_logging_enable_ops_cluster=true
openshift_hosted_logging_curator_ops_nodeselector='region=infra'
openshift_hosted_logging_kibana_ops_nodeselector='region=infra'

fails every time with

SchedulerPredicates failed due to PersistentVolumeClaim is not bound: "logging-es-ops-1", which is unexpected.

Other components (logging/metrics/registry) are being deployed ok so looks like Logging Ops related.

Version-Release number of selected component (if applicable):
openshift-ansible-playbooks-3.4.56-1.git.0.7ba9968.el7.noarch

Comment 1 ewolinet 2017-02-28 20:13:03 UTC
Can you please provide the logs from the logging deployer image that was run?

Comment 2 Peter Portante 2017-02-28 23:21:09 UTC
Didn't Erez Freiberger just fix this same problem?

See https://github.com/openshift/openshift-ansible/pull/3311

Comment 4 Rich Megginson 2017-03-01 22:03:15 UTC
Marko, would you be able to try out the patch from https://github.com/openshift/openshift-ansible/pull/3311 ?

Comment 5 Marko Myllynen 2017-03-06 08:33:48 UTC
(In reply to Rich Megginson from comment #4)
> Marko, would you be able to try out the patch from
> https://github.com/openshift/openshift-ansible/pull/3311 ?

Thanks Peter/Rich, I'm happy to confirm with these changes logging-ops is deployed successfully on OCP 3.4.

I do wonder a bit when looking the patch:

+    openshift_hosted_logging_elasticsearch_ops_pvc_dynamic: "{{ 'true' if openshift_hosted_loggingops_storage_kind | default(none) == 'dynamic' else '' }}"
     openshift_hosted_logging_elasticsearch_ops_pvc_size: "{{ openshift.hosted.logging.storage.volume.size if openshift_hosted_logging_storage_kind | default(none) in ['dynamic','nfs' ] else ''  }}"
     openshift_hosted_logging_elasticsearch_ops_pvc_size: "{{ openshift.hosted.logging.storage.volume.size if openshift_hosted_logging_storage_kind | default(none) in ['dynamic','nfs' ] else ''  }}"
-    openshift_hosted_logging_elasticsearch_ops_pvc_prefix: "{{ 'logging-es-ops' if openshift_hosted_logging_storage_kind | default(none) =='dynamic' else '' }}"
+    openshift_hosted_logging_elasticsearch_ops_pvc_prefix: "{{ 'logging-es-ops' if openshift_hosted_loggingops_storage_kind | default(none) =='dynamic' else '' }}"

There in the middle is not change to use openshift_hosted_loggingops_storage_kind - could this be on purpose?

It might also be a good idea to add these needed tunables to the byo example configuration as I'm not sure how widely people are aware of Ops Logging.

For reference, this is what I used in a test lab:

# Logging ops configuration (optional)
openshift_hosted_logging_enable_ops_cluster=true
openshift_hosted_logging_curator_ops_nodeselector='region=infra'
openshift_hosted_logging_kibana_ops_nodeselector='region=infra'
openshift_hosted_loggingops_storage_kind=nfs
openshift_hosted_loggingops_storage_access_modes=['ReadWriteOnce']
#openshift_hosted_loggingops_storage_host=nfs01.example.com
openshift_hosted_loggingops_storage_nfs_directory=/var/srv/nfs
openshift_hosted_loggingops_storage_nfs_options='*(rw,root_squash)'
openshift_hosted_loggingops_storage_volume_name=logging-ops
openshift_hosted_loggingops_storage_volume_size=10Gi
#openshift_hosted_logging_elasticsearch_ops_cluster_size=1
openshift_hosted_logging_ops_hostname=logging-ops.apps.test.example.com
#openshift_hosted_logging_elasticsearch_ops_instance_ram=2G
#openshift_hosted_logging_elasticsearch_ops_pvc_size=
#openshift_hosted_logging_elasticsearch_ops_pvc_prefix=

Thanks.

Comment 9 Gaoyun Pei 2017-03-16 05:03:20 UTC
Verify this bug with openshift-ansible-3.4.70-1.git.0.6d6a2e7.el7.noarch.rpm

1. Enable logging es ops with nfs storage

openshift_hosted_logging_deploy=true
openshift_hosted_logging_storage_kind=nfs
openshift_hosted_logging_storage_access_modes=['ReadWriteOnce']
openshift_hosted_logging_storage_nfs_directory=/var/lib/exports
openshift_hosted_logging_storage_nfs_options=*(rw,root_squash)
openshift_hosted_logging_storage_volume_name=logging
openshift_hosted_logging_storage_volume_size=10Gi

openshift_hosted_logging_deployer_prefix=x.com/openshift3/
openshift_hosted_logging_deployer_version=3.4.1

openshift_hosted_logging_enable_ops_cluster=true
openshift_hosted_loggingops_storage_kind=nfs
openshift_hosted_loggingops_storage_access_modes=['ReadWriteOnce']
openshift_hosted_loggingops_storage_nfs_directory=/var/lib/exports
openshift_hosted_loggingops_storage_nfs_options=*(rw,root_squash)
openshift_hosted_loggingops_storage_volume_name=logging-ops
openshift_hosted_loggingops_storage_volume_size=10Gi

logging-es and logging-es-ops pvc were created correctly and logging pods were running well
[root@ip-172-18-3-159 ~]# oc get pod -n logging
NAME                              READY     STATUS      RESTARTS   AGE
logging-curator-1-tklro           1/1       Running     0          2h
logging-curator-ops-1-suocf       1/1       Running     0          2h
logging-deployer-e69fe            0/1       Completed   0          2h
logging-es-ops-eyrdqdt6-1-i9a8w   1/1       Running     0          2h
logging-es-whs6s80e-1-g8la5       1/1       Running     0          2h
logging-fluentd-32eoc             1/1       Running     0          2h
logging-fluentd-p70gu             1/1       Running     0          2h
logging-fluentd-yr8mj             1/1       Running     0          2h
logging-kibana-1-irreu            2/2       Running     0          2h
logging-kibana-ops-1-izaqn        2/2       Running     0          2h
[root@ip-172-18-3-159 ~]# oc get pvc -n logging
NAME               STATUS    VOLUME               CAPACITY   ACCESSMODES   AGE
logging-es-1       Bound     logging-volume       10Gi       RWO           2h
logging-es-ops-1   Bound     logging-ops-volume   10Gi       RWO           2h


2. Enable logging es ops with dynamic pv

openshift_hosted_logging_deploy=true
openshift_hosted_logging_storage_kind=dynamic

openshift_hosted_logging_deployer_prefix=x.openshift.com/openshift3/
openshift_hosted_logging_deployer_version=3.4.1

openshift_hosted_logging_enable_ops_cluster=true
openshift_hosted_loggingops_storage_kind=dynamic

logging-es and logging-es-ops pvc were created correctly and logging pods were running well

[root@ip-172-18-14-70 ~]# oc get pod -n logging
NAME                              READY     STATUS      RESTARTS   AGE
logging-curator-1-m1e3r           1/1       Running     0          2h
logging-curator-ops-1-2fv37       1/1       Running     0          2h
logging-deployer-4vn2p            0/1       Completed   0          2h
logging-es-ops-gj2ycutj-1-mnf9r   1/1       Running     0          2h
logging-es-y2mdkaac-1-5px34       1/1       Running     0          2h
logging-fluentd-826al             1/1       Running     0          2h
logging-fluentd-dlgii             1/1       Running     0          2h
logging-kibana-1-w7uwg            2/2       Running     0          2h
logging-kibana-ops-1-9gcc5        2/2       Running     0          2h
[root@ip-172-18-14-70 ~]# oc get pvc -n logging
NAME              STATUS    VOLUME                                     CAPACITY   ACCESSMODES   AGE
logging-es-ops1   Bound     pvc-cc3a7f26-09f1-11e7-a926-0e5d73a7297c   10Gi       RWO           2h
logging-es1       Bound     pvc-cbda2212-09f1-11e7-a926-0e5d73a7297c   10Gi       RWO           2h

Comment 11 errata-xmlrpc 2017-04-05 08:53:22 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-2017:0883