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

Bug 1869058

Summary: Logging installer not creating logging-curator configmap
Product: OpenShift Container Platform Reporter: Khizer Naeem <knaeem>
Component: LoggingAssignee: Jeff Cantrill <jcantril>
Status: CLOSED DUPLICATE QA Contact: Anping Li <anli>
Severity: high Docs Contact:
Priority: high    
Version: 3.11.0CC: aos-bugs, rsandu
Target Milestone: ---   
Target Release: 3.11.z   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-20 13:46:25 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 Khizer Naeem 2020-08-16 03:05:40 UTC
Description of problem:
=======================
OpenShift Logging installer is not creating logging-curator configmap. The installation completes successfully but when the logging-curator pod get spawned (as per cronjob), it gets stuck in ContainerCreating state because of the missing configmap.

# oc get pods
NAME                                      READY     STATUS              RESTARTS   AGE
logging-curator-1597192200-b2zgz          0/1       ContainerCreating   0          5h

# oc get events
LAST SEEN   FIRST SEEN   COUNT     NAME                                                KIND      SUBOBJECT   TYPE      REASON        SOURCE                               MESSAGE
6m          5h           142       logging-curator-1597192200-b2zgz.162a77b643d5e7da   Pod                   Warning   FailedMount   kubelet, pn3-ocp-rv-gf01.dc.elm.sa   Unable to mount volumes for pod "logging-curator-1597192200-b2zgz_openshift-logging(e4718ef5-dc74-11ea-9911-005056babf2d)": timeout expired waiting for volumes to attach or mount for pod "openshift-logging"/"logging-curator-1597192200-b2zgz". list of unmounted volumes=[config]. list of unattached volumes=[certs config aggregated-logging-curator-token-qpq6d]
2m          5h           168       logging-curator-1597192200-b2zgz.162a7799a73d2bca   Pod                   Warning   FailedMount   kubelet, pn3-ocp-rv-gf01.dc.elm.sa   MountVolume.SetUp failed for volume "config" : configmaps "logging-curator" not found

# oc get cm
NAME                    DATA      AGE
logging-elasticsearch   2         14h
logging-fluentd         3         14h

Version-Release number:
=======================

openshift-ansible-playbooks-3.11.248-1.git.0.fd212c7.el7.noarch

How reproducible:
==================

I was able to reproduce it in my lab. Tried, with multiple variations, it is reproducible 100% of the time. I used the latest release (3.11.248-1)


Steps to Reproduce:
===================
1. Pick an OCP 3.11 cluster without logging stack or uninstall if already installed. 

2. Install logging stack using the ansible playbook (playbooks/openshift-logging/config.yml)
    openshift_logging_install_logging=true
    openshift_logging_es_pvc_dynamic=false
    openshift_logging_es_cluster_size=3
    openshift_logging_es_number_of_shards=2
    openshift_logging_es_memory_limit=4G
    openshift_logging_elasticsearch_storage_type=pvc
    openshift_logging_es_pvc_size=50Gi
    openshift_logging_es_pvc_prefix=logging-pvc
    openshift_logging_kibana_nodeselector={"node-role.kubernetes.io/infra":"true"}
    openshift_logging_curator_nodeselector={"node-role.kubernetes.io/infra":"true"}
    openshift_logging_es_nodeselector={"node-role.kubernetes.io/infra":"true"}

3. Wait for logging curator job to get triggered  

Actual results:
===============

logging-curator pod gets stuck in ContainerCreating state, complaining about missing logging-curator configmap.

Expected results:
=================

logging-curator configmap should be created by the installed and the logging-curator pod should run with out any intervention.


Work Around:
============

Setting openshift_logging_curator_replace_configmap to true in inventory or running the playbook with -e openshift_logging_curator_replace_configmap=true creates the said configmap and logging-curator runs fine.(https://access.redhat.com/solutions/5316681)


Additional info:
================

https://github.com/openshift/openshift-ansible/issues/12187

Comment 1 Jeff Cantrill 2020-08-20 13:46:25 UTC

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