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:
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}"
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