Bug 1572545

Summary: Logging-curator error when .regex in configmap
Product: OpenShift Container Platform Reporter: Anping Li <anli>
Component: LoggingAssignee: Josef Karasek <jkarasek>
Status: CLOSED ERRATA QA Contact: Qiaoling Tang <qitang>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.10.0CC: aos-bugs, jcantril, jkarasek, rmeggins
Target Milestone: ---Keywords: Regression
Target Release: 3.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-30 19:14:14 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-04-27 09:44:55 UTC
Description of problem:
logging-curator couldn't be started when .regex is set in configmap

Version-Release number of selected component (if applicable):
openshift3/logging-curator/images/v3.10.0-0.30.0.0

How reproducible:
always

Steps to Reproduce:
1. Deploy logging
2. Add .regex policy in logging-curator configmap

[anli@upg_slave_qeos10 310anli]$ oc get configmap logging-curator -o yaml
apiVersion: v1
data:
  config.yaml: |
    myapp-dev:
      delete:
        days: 1

    .operations:
      delete:
        weeks: 1

    .defaults:
      delete:
        days: 7
      runhour: 05
      runminute: 16
      timezone: America/New_York

    .regex:
      - pattern: '^project\..+\-dev.*\..*$'
        delete:
          days: 31
      - pattern: '.*prod.*\..*$'
        delete:
          months: 1
kind: ConfigMap
metadata:
  creationTimestamp: 2018-04-27T07:39:30Z
  name: logging-curator
  namespace: openshift-logging
  resourceVersion: "35413"
  selfLink: /api/v1/namespaces/openshift-logging/configmaps/logging-curator
  uid: 1ee133b6-49ee-11e8-908e-0e6d82bcf43c


3. watch the logging-curator pod status

$ oc logs logging-curator-3-nfj9w
The project name must match this regex: [^[a-z0-9]([-a-z0-9]*[a-z0-9])?$] This does not match: [.regex]



Actual results:

[anli@upg_slave_qeos10 310anli]$ oc get pods
NAME                                      READY     STATUS             RESTARTS   AGE
logging-curator-3-nfj9w                   0/1       CrashLoopBackOff   7          14m

Expected results:
The pod can be started and the policy are used when delete index.

Additional info:

Comment 1 Josef Karasek 2018-05-03 09:11:42 UTC
v3.10.0-0.30.0.0 doesn't have the latest code. I checked and the most recent image (v3.10.0-0.32.0.0) also has old code.
I'll let u know once this is fixed.

Comment 3 Anping Li 2018-05-07 09:46:22 UTC
Waiting the latest images

Comment 4 Josef Karasek 2018-05-09 07:16:58 UTC
Anli: v3.10.0-0.37.0.0 has all that's needed

Comment 5 Qiaoling Tang 2018-05-11 05:59:05 UTC
verified on v3.10.0-0.38.0

Comment 7 errata-xmlrpc 2018-07-30 19:14:14 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:1816