Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1541948 - RFE: Allow regular expressions in curator settings
RFE: Allow regular expressions in curator settings
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Logging (Show other bugs)
3.7.1
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.7.z
Assigned To: Josef Karasek
Anping Li
:
Depends On: 1517875
Blocks: 1541952
  Show dependency treegraph
 
Reported: 2018-02-05 04:47 EST by Josef Karasek
Modified: 2018-04-05 05:37 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Allow regular expressions in curator settings Reason: Customer request Result: A special tag can be used in curator settings to specify custom regular expressions.
Story Points: ---
Clone Of: 1517875
: 1541952 (view as bug list)
Environment:
Last Closed: 2018-04-05 05:37:08 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Github https://github.com/openshift/origin-aggregated-logging/pull/911 None None None 2018-02-05 04:47 EST
Red Hat Product Errata RHBA-2018:0636 None None None 2018-04-05 05:37 EDT

  None (edit)
Comment 3 Anping Li 2018-03-02 03:23:00 EST

@josef, PR still not merged to the latest logging-curator-v3.7.36-1

sh-4.2$ diff /opt/app-root/src/run_cron.py /tmp/run_cron.py    
103c103,107
< default_command = base_default_cmd + ' --older-than ' + str(default_value) + ' --time-unit ' + default_time_unit + ' --exclude .searchguard* --exclude .kibana*'
---
> default_command = base_default_cmd \
>         + ' --older-than ' + str(default_value) \
>         + ' --time-unit ' + default_time_unit \
>         + ' --exclude ' + shellquote('^' + re.escape('.searchguard.') + '.*$') \
>         + ' --exclude ' + shellquote('^' + re.escape('.kibana.') + '.*$')
116,117d119
<                     default_command = default_command + " --exclude " + shellquote(re.escape(project + '.') + '*')
< 
125a128,129
>                     default_command = default_command \
>                             + " --exclude " + shellquote('^' + re.escape(this_project + '.') + '.*$')
151c155
<                 lambda project:'^' + re.escape(project + '.'),
---
>                 lambda project:'^' + re.escape(project + '.') + '.*$',
Comment 5 Anping Li 2018-03-06 05:53:11 EST
[root@ip-172-18-1-175 ~]# oc get configmap logging-curator -o yaml
apiVersion: v1
data:
  config.yaml: |
    .defaults:
      delete:
        days: 30
      runhour: 0
      runminute: 0

    .operations:
      delete:
        weeks: 8

    myapp:
      delete:
        weeks: 1

    .regex:
    - pattern: '^project\..+\-dev\..*$'
      delete:
        days: 15
    - pattern: '^project\..+\-test\..*$'
      delete:
        days: 30


# oc logs logging-curator-2-kxnkd
The project name must match this regex: [^[a-z0-9]([-a-z0-9]*[a-z0-9])?$] This does not match: [.regex]
Comment 6 Josef Karasek 2018-03-12 11:47:42 EDT
The previous build did not have the latest code, let's wait for another one
Comment 7 Anping Li 2018-03-20 00:52:02 EDT
Verified with openshift3/logging-curator/images/v3.7.39-1
Comment 11 errata-xmlrpc 2018-04-05 05:37:08 EDT
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:0636

Note You need to log in before you can comment on or make changes to this bug.