Bug 1928073 - Node exporter reports text format parsing error in line 3: invalid escape sequence
Summary: Node exporter reports text format parsing error in line 3: invalid escape seq...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 4.6
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.6.z
Assignee: Pawel Krupa
QA Contact: Junqi Zhao
URL:
Whiteboard:
: 1929896 (view as bug list)
Depends On: 1917683
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-12 10:17 UTC by Dhruv Gautam
Modified: 2023-01-06 02:34 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-20 11:52:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift node_exporter pull 83 0 None closed [release-4.6] Bug 1928073: Remove escape characters 2021-03-18 10:47:45 UTC
Github openshift node_exporter pull 85 0 None open [release-4.6] Bug 1928073: text_collectors: do not use space as a replacement for escape characters 2021-04-08 08:31:22 UTC
Red Hat Product Errata RHBA-2021:1521 0 None None None 2021-05-20 11:53:02 UTC

Description Dhruv Gautam 2021-02-12 10:17:47 UTC
Description of problem:
node exporter has parsing error

$ oc logs node-exporter-22bcr -c node-exporter --tail=10
level=error ts=2021-02-11T09:29:30.826Z caller=textfile.go:209 collector=textfile msg="failed to collect textfile data" file=virt.prom err="failed to parse textfile data from \"/var/node_exp
orter/textfile/virt.prom\": text format parsing error in line 3: invalid escape sequence '\\,'"
level=error ts=2021-02-11T09:29:37.367Z caller=textfile.go:209 collector=textfile msg="failed to collect textfile data" file=virt.prom err="failed to parse textfile data from \"/var/node_exp
orter/textfile/virt.prom\": text format parsing error in line 3: invalid escape sequence '\\,'"
level=error ts=2021-02-11T09:29:45.826Z caller=textfile.go:209 collector=textfile msg="failed to collect textfile data" file=virt.prom err="failed to parse textfile data from \"/var/node_exp
orter/textfile/virt.prom\": text format parsing error in line 3: invalid escape sequence '\\,'"
level=error ts=2021-02-11T09:29:52.365Z caller=textfile.go:209 collector=textfile msg="failed to collect textfile data" file=virt.prom err="failed to parse textfile data from \"/var/node_exp
orter/textfile/virt.prom\": text format parsing error in line 3: invalid escape sequence '\\,'"

Found 2 bugzillas for the same issue which were reported for 4.3 and 4.4 respectively.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1841150
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1775454

Version-Release number of selected component (if applicable):
RHOCP 4.6.15

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
level=error ts=2021-02-11T09:29:30.826Z caller=textfile.go:209 collector=textfile msg="failed to collect textfile data" file=virt.prom err="failed to parse textfile data from \"/var/node_exp
orter/textfile/virt.prom\": text format parsing error in line 3: invalid escape sequence '\\,'"


Expected results:
No such error should be there.

Additional info:

Comment 2 Lili Cosic 2021-02-18 09:29:14 UTC
*** Bug 1929896 has been marked as a duplicate of this bug. ***

Comment 5 hongyan li 2021-03-02 03:59:45 UTC
This bug is for 4.6.z

Comment 8 Junqi Zhao 2021-03-22 02:42:17 UTC
tested with 4.6.0-0.nightly-2021-03-21-131139, see from Comment 1
the fix is better change from
echo "${line//\\/ }" >>"${v}"
to
echo "${line//\\/}" >>"${v}"

Comment 9 Junqi Zhao 2021-04-14 04:36:49 UTC
tested with the not merged PR, issue is fixed

Comment 14 errata-xmlrpc 2021-05-20 11:52:25 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 (OpenShift Container Platform 4.6.29 bug fix update), 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-2021:1521


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