Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Conf parsing changes fail to parse regex #1990

Closed
shanson7 opened this issue Jun 25, 2021 · 2 comments · Fixed by #1994
Closed

Conf parsing changes fail to parse regex #1990

shanson7 opened this issue Jun 25, 2021 · 2 comments · Fixed by #1994
Labels

Comments

@shanson7
Copy link
Collaborator

Describe the bug

In #1989 some changes were made to the conf parse code. In particular this commit seems to disallow any strings with [] in it. In our case, storage-aggregations has some settings like:

pattern = ^[^;]+\.max(?:;|$)

which used to parse fine and now we get:

2021-06-25 09:18:24.738 [FATAL] can't read storage-aggregation file "/etc/metrictank/storage-aggregation.conf": invalid line "pattern = ^[^;]+\\.max(?:;|$)": [ and ] are reserved for section headers and this contains additional non-section header data

If I comment out the lines from that commit, everything works as expected. Perhaps this check should only look at chars up to the first = (or the whole line if no = exists)?

Helpful Information
Metrictank Version: master
Golang Version: 1.15.11

@shanson7 shanson7 added the bug label Jun 25, 2021
@shanson7
Copy link
Collaborator Author

Note: I can't seem to create issues on https://github.com/grafana/configparser

@Dieterbe
Copy link
Contributor

Note: I can't seem to create issues on https://github.com/grafana/configparser

ah, probably because it's a fork.
anyway yeah this is a legit bug. will fix it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants