Description of problem: User supplied configuration is translated into unintended regular expressions. Currently things work by sheer luck Version-Release number of selected component (if applicable): origin aggregated logging 3.7.0 How reproducible: always, just run curator with a valid configuration Steps to Reproduce: 1. supply some valid config to curator 2. check the curator commands that run_cron.py generated 3. Actual results: /usr/bin/curator \ ... # other config \ --exclude .searchguard* \ --exclude .kibana* \ --exclude '\.operations\.*' \ --exclude 'myapp\-qe\.*' \ --exclude 'proj1\.*' \ --exclude 'myapp\-dev\.*' Expected results: /usr/bin/curator \ ... # other config \ --exclude '^\.searchguard\..*$' --exclude '^\.kibana\..*$' --exclude '^\.operations\..*$' --exclude '^project\.myapp\-qe\..*$' --exclude '^project\.proj1\..*$' --exclude '^project\.myapp\-dev\..*$' Additional info: Easy way how to debug/test this: $ python >>> import re >>> list(filter(lambda x: not re.search(r'^project\.myapp\-qe\..*$', x), ['project.myapp-qe.', 'abc'])) graphical representation of regexes: https://www.debuggex.com/
Commits pushed to master at https://github.com/openshift/origin-aggregated-logging https://github.com/openshift/origin-aggregated-logging/commit/9476cabda226b2df0e2a99149dea3a238ab01c8b bug 1524644. Curator configuration produces wrong regular expressions For example `^.operations.` instead of `^\.operations\..*$` Both regexes match, but the first one only accidentaly. Example index name: `.operations.1827ac8a-ef8f-11e7-92de-0ebdd5807cb2.2018.01.02` Curator code: https://github.com/elastic/curator/blob/3.5/curator/api/filter.py#L90-L138 https://github.com/openshift/origin-aggregated-logging/commit/5ae3d1fbda7f4e0686a96a000f56dbb61a0d6226 Merge pull request #876 from josefkarasek/bz-1524644 Automatic merge from submit-queue. bug 1524644. Curator configuration produces wrong regular expressions For example `^.operations.` instead of `^\.operations\..*$` Both regexes match, but the first one only accidentaly. Example index name: `.operations.1827ac8a-ef8f-11e7-92de-0ebdd5807cb2.2018.01.02` Curator code: https://github.com/elastic/curator/blob/3.5/curator/api/filter.py#L90-L138 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1524644
Verified and pass on openshift3/logging-curator/images/v3.7.23-2 1. .searchguard and .kibana index are excluded. 2. index are deleted after 30 days 3. The index can be delete according the the values in configmap logging-curator
v3.7.23-2 does not have the changes. Will have to wait for a new build.
@josef, The change [1] is still not in the latest image openshift3/logging-curator/images/v3.7.31-1. Could you confirm if the code are merged to v3.7. [1]https://github.com/openshift/origin-aggregated-logging/commit/5ae3d1fbda7f4e0686a96a000f56dbb61a0d6226
I issued one more change to the code, it was merged in the master and 3.7 branch on 21st february. https://github.com/openshift/origin-aggregated-logging/pull/958 https://github.com/openshift/origin-aggregated-logging/pull/963
Should be available in: v3.7.38-1 or later
Works well with 3.7.40
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