Bug 1663113

Summary: Deploy logging failed by using olm.
Product: OpenShift Container Platform Reporter: Qiaoling Tang <qitang>
Component: LoggingAssignee: Jeff Cantrill <jcantril>
Status: CLOSED DUPLICATE QA Contact: Anping Li <anli>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: aos-bugs, rmeggins
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-25 14:51:02 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: 1666944    
Bug Blocks:    

Description Qiaoling Tang 2019-01-03 08:25:50 UTC
Description of problem:
Deploy logging EFK by using olm failed, the resources related to fluend, kibana and curator are not created automatically by the cluster-logging-operator for the Environenment KIBANA_IMAGE,OAUTH_PROXY_IMAGE,ELASTICSEARCH_IMAGE wasn't in cluster-logging-operator.

$ oc get pod
NAME                                                      READY     STATUS    RESTARTS   AGE
cluster-logging-operator-696fcf7bcb-ghnhn             1/1       Running   0          4m
elasticsearch-clientdatamaster-0-1-5cc8b4d947-tjzzh   1/1       Running   0          3m
elasticsearch-operator-7597977b49-76mqb               1/1       Running   0          4m

NAME                                                 DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
cluster-logging-operator             1         1         1            1           5m
elasticsearch-clientdatamaster-0-1   1         1         1            1           3m
elasticsearch-operator               1         1         1            1           5m

$ oc get cj
No resources found.

$ oc logs cluster-logging-operator-696fcf7bcb-ghnhn
time="2019-01-03T07:56:03Z" level=info msg="Go Version: go1.10.3"
time="2019-01-03T07:56:03Z" level=info msg="Go OS/Arch: linux/amd64"
time="2019-01-03T07:56:03Z" level=info msg="operator-sdk Version: 0.0.7"
time="2019-01-03T07:56:03Z" level=info msg="Metrics service cluster-logging-operator created"
time="2019-01-03T07:56:03Z" level=info msg="Watching logging.openshift.io/v1alpha1, ClusterLogging, openshift-logging, 5000000000"
time="2019-01-03T07:56:26Z" level=error msg="No image tag defined for component 'elasticsearch' by environment variable 'ELASTICSEARCH_IMAGE'"
time="2019-01-03T07:56:26Z" level=info msg="Updating status of Elasticsearch"
time="2019-01-03T07:56:27Z" level=error msg="No image tag defined for component 'kibana' by environment variable 'KIBANA_IMAGE'"
time="2019-01-03T07:56:27Z" level=error msg="No image tag defined for component 'kibana-proxy' by environment variable 'OAUTH_PROXY_IMAGE'"
time="2019-01-03T07:56:28Z" level=error msg="error syncing key (openshift-logging/example): Unable to create or update visualization: Failure creating Kibana deployment: Deployment.apps \"kibana\" is invalid: [spec.template.spec.containers[0].image: Required value, spec.template.spec.containers[1].image: Required value]"
time="2019-01-03T07:56:32Z" level=error msg="No image tag defined for component 'elasticsearch' by environment variable 'ELASTICSEARCH_IMAGE'"
time="2019-01-03T07:56:33Z" level=info msg="Updating status of Elasticsearch"
time="2019-01-03T07:56:35Z" level=error msg="No image tag defined for component 'kibana' by environment variable 'KIBANA_IMAGE'"
time="2019-01-03T07:56:35Z" level=error msg="No image tag defined for component 'kibana-proxy' by environment variable 'OAUTH_PROXY_IMAGE'"
time="2019-01-03T07:56:35Z" level=error msg="error syncing key (openshift-logging/example): Unable to create or update visualization: Failure creating Kibana deployment: Deployment.apps \"kibana\" is invalid: [spec.template.spec.containers[0].image: Required value, spec.template.spec.containers[1].image: Required value]"
time="2019-01-03T07:56:41Z" level=error msg="No image tag defined for component 'elasticsearch' by environment variable 'ELASTICSEARCH_IMAGE'"
time="2019-01-03T07:56:42Z" level=info msg="Updating status of Elasticsearch"

$ oc get deploy cluster-logging-operator -o yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "2"
  creationTimestamp: 2019-01-03T07:55:04Z
  generation: 2
  labels:
    olm.owner: clusterlogging.v0.0.1
    olm.owner.namespace: openshift-logging
  name: cluster-logging-operator
  namespace: openshift-logging
  ownerReferences:
  - apiVersion: operators.coreos.com/v1alpha1
    blockOwnerDeletion: false
    controller: false
    kind: ClusterServiceVersion
    name: clusterlogging.v0.0.1
    uid: de7b2bae-0f2c-11e9-9b18-0e4c48a414e4
  resourceVersion: "254798"
  selfLink: /apis/extensions/v1beta1/namespaces/openshift-logging/deployments/cluster-logging-operator
  uid: e184c579-0f2c-11e9-9b18-0e4c48a414e4
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      name: cluster-logging-operator
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      annotations:
        olm-examples: '[{"apiVersion": "logging.openshift.io/v1alpha1","kind": "ClusterLogging","metadata":{"name":
          "example","annotations":{"io.openshift.clusterlogging.alpha/allinone": ""}},"spec":
          {"logStore":{"type": "elasticsearch","elasticsearch":{"replicas":1,"storage":{"emptyDir":
          {}}}},"visualization":{"type": "kibana","kibana":{"replicas": 1}},"curation":{"type":
          "curator","curator": {"schedule": "30 3 * * *"}},"collection": {"logCollection":{"type":
          "fluentd","fluentd":{"nodeSelector":{"logging-infra-fluentd: "true"}}}}}]'
        olm.operatorGroup: logging-operators
        olm.operatorNamespace: openshift-logging
        olm.targetNamespaces: ""
        test: "yes"
      creationTimestamp: null
      labels:
        name: cluster-logging-operator
    spec:
      containers:
      - command:
        - cluster-logging-operator
        env:
        - name: WATCH_NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        - name: OPERATOR_NAME
          value: cluster-logging-operator
        image: docker.io/openshift/origin-cluster-logging-operator:latest
        imagePullPolicy: IfNotPresent
        name: cluster-logging-operator
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      serviceAccount: cluster-logging-operator
      serviceAccountName: cluster-logging-operator
      terminationGracePeriodSeconds: 30


Version-Release number of selected component (if applicable):
$ oc get clusterversion
NAME      VERSION   AVAILABLE   PROGRESSING   SINCE     STATUS
version   4.0.0-8   True        False         6h        Cluster version is 4.0.0-8

$ ./bin/openshift-install version
./bin/openshift-install v0.8.0


How reproducible:
Always

Steps to Reproduce:
1. create "openshift-logging" namespace `oc create -f cluster-logging-operator/manifests/01-namespace.yaml`
2. create operator group object in openshift-logging
3. create subscription in openshift-logging
4. wait until cluster-logging-operator and elasticsearch-operator pod in running status, create cr in openshift-logging `oc create -f cluster-logging-operator/hack/cr.yaml`
5. check resources and pod logs in openshift-logging


Actual results:
kibana, fluentd and curator cronjob are not deployed when using olm to deploy logging EFK stack.
The cluster-logging-operator should provide default values for these Environment.

Expected results:


Additional info:

Comment 1 Jeff Cantrill 2019-01-25 14:51:02 UTC

*** This bug has been marked as a duplicate of bug 1666944 ***