Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-32434

pcp2openmetrics crashes on s390x when reading data from an archive

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • rhel-9.5
    • rhel-9.5
    • pcp
    • None
    • pcp-6.2.2-1.el9
    • Normal
    • sst_pt_pcp
    • ssg_platform_tools
    • 22
    • 1
    • QE ack, Dev ack
    • False
    • Hide

      None

      Show
      None
    • Red Hat Enterprise Linux
    • PCP Sprint 5
    • s390x

      What were you trying to do that didn't work?

      When pcp2openmetrics reads data from an PCP archive on big endian architecture (s390x) the tool crashes, reporting an python exception.

      Please provide the package NVR for which bug is seen:

      pcp-6.2.1-1.el9.s390x

      How reproducible:

      Always

      Steps to reproduce

      1.  Install pcp & pcp-export-pcp2openmetrics packages on s390x architecture
      2.  Start pmcd and pmlogger
      3.  Wait a bit until archive files are populated with some data (i.e. 90 seconds)
      4. Run pcp2openmetrics from the created archive
        pcp2openmetrics -a /var/log/pcp/pmlogger/$(hostname)/ 'kernel.all.load'

      Expected results

      The tool shows the exported data in the openmetrics format

      Actual results

      # pcp2openmetrics -a /var/log/pcp/pmlogger/$(hostname)/ 'kernel.all.load'
      { "//": "Writing 1 archived metrics to stdout..." }
      { "//": "(Ctrl-C to stop)" }
      Traceback (most recent call last):
        File "/usr/bin/pcp2openmetrics", line 545, in <module>
          P.execute()
        File "/usr/bin/pcp2openmetrics", line 381, in execute
          self.report(self.pmfg_ts())
        File "/usr/bin/pcp2openmetrics", line 395, in report
          self.write_openmetrics(tstamp)
        File "/usr/bin/pcp2openmetrics", line 506, in write_openmetrics
          body += '%s%s %s\n' % (openmetrics_name(metric), openmetrics_labels(inst, name, desc, labels), value)
        File "/usr/bin/pcp2openmetrics", line 464, in openmetrics_labels
          labels[1].update(instname=name, instid=inst)
      KeyError: 1
      

            rh-ee-lchilton Lauren Chilton
            jkurik@redhat.com Jan Kurik
            pcp-maint pcp-maint
            Jan Kurik Jan Kurik
            Jacob Valdez Jacob Valdez
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: