Bug 1401417

Summary: Enable ansible to deploy logging with the default journald log driver
Product: OpenShift Container Platform Reporter: Xia Zhao <xiazhao>
Component: InstallerAssignee: Scott Dodson <sdodson>
Status: CLOSED NOTABUG QA Contact: Johnny Liu <jialiu>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.4.0CC: aos-bugs, ewolinet, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-21 22:40:21 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:
Attachments:
Description Flags
ansible task log
none
deployer log none

Description Xia Zhao 2016-12-05 08:02:52 UTC
Created attachment 1228000 [details]
ansible task log

Description of problem:
Currently ansible didn't set value to parameter "use_journal" while deploy logging, and fluentd collects logs from json-file log driver by default:
$ oc logs -f logging-deployer-dlnow
...
+ use_journal=
+ journal_read_from_head=false
+ journal_source=
...

We should enable ansible to deploy logging with the default journald log driver.

Version-Release number of selected component (if applicable):
# openshift version
openshift v3.4.0.32+d349492
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0

openshift-ansible-3.4.31-1.git.0.4b78e57      


How reproducible:
Always

Steps to Reproduce:
1. Deploy logging with these parameters passing to ansible:
 openshift_hosted_logging_deployer_prefix: ${ops-registry-image-prefix}
 openshift_hosted_logging_deploy: true
 openshift_hosted_logging_storage_kind: dynamic
 openshift_hosted_logging_deployer_version: 3.4.0

2. Check logging pods:
# oc get po
NAME                          READY     STATUS      RESTARTS   AGE
logging-curator-1-l0fzh       1/1       Running     0          4h
logging-deployer-dlnow        0/1       Completed   0          4h
logging-es-1yl4qhyc-1-91pkd   1/1       Running     0          4h
logging-fluentd-5f3s1         1/1       Running     0          4h
logging-fluentd-dhojf         1/1       Running     0          4h
logging-kibana-1-tz7ks        2/2       Running     0          4h

3. Check deployer configmap content
# oc get configmap logging-deployer -o yaml
apiVersion: v1
data:
  es-cluster-size: "1"
  es-ops-cluster-size: "1"
  es-ops-pvc-dynamic: "true"
  es-ops-pvc-prefix: logging-es
  es-ops-pvc-size: 10Gi
  es-pvc-dynamic: "true"
  es-pvc-prefix: logging-es
  es-pvc-size: 10Gi
  kibana-hostname: kibana.{subdomain}
  kibana-ops-hostname: kibana-ops.{subdomain}
  public-master-url: https://{master-domain}:8443
kind: ConfigMap
metadata:
  creationTimestamp: 2016-12-05T02:12:33Z
  name: logging-deployer
  namespace: logging
  resourceVersion: "1221"
  selfLink: /api/v1/namespaces/logging/configmaps/logging-deployer
  uid: 4865c5ef-ba90-11e6-9243-42010af00014

4. Check the fluentd log driver

Actual results:
4. Fluentd collects logs from json-file log driver since "use_journal" was set to empty

Expected results:
4. Ansible should be enabled to deploy logging with the default journald log driver

Additional info:
1. ansible log attached
2. deployer pod log attached

Comment 1 Xia Zhao 2016-12-05 08:03:42 UTC
Created attachment 1228002 [details]
deployer log

Comment 2 Scott Dodson 2016-12-05 14:41:01 UTC
Eric,

When should we set use_journal? Whenever the docker log driver is journald or all the time regardless?

Comment 3 ewolinet 2016-12-05 19:30:07 UTC
When the docker log driver is journald.

Comment 5 Scott Dodson 2017-02-21 22:40:21 UTC
Based on discussion in https://github.com/openshift/openshift-ansible/pull/3432 I am closing this NOTABUG