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

pmlogger/config.default wrongly generated when pmlogger is restarted together with pmcd

    • pcp-5.3.7-19.el8
    • None
    • None
    • rhel-sst-pt-pcp
    • ssg_platform_tools
    • 10
    • 15
    • 2
    • QE ack, Dev ack
    • False
    • Hide

      None

      Show
      None
    • No
    • None
    • Release Note Not Required
    • None

      Description of problem:
      I have a Satellite 6.13 system with PCP installed.

      To monitor a few interesting processes, I have enabled hotproc:

      1. cat /var/lib/pcp/pmdas/proc/hotproc.conf
        #pmdahotproc
        Version 1.0

      (
      fname == "java" ||
      fname == "redis-server" ||
      (fname == "postgres" && psargs ~ /-D/) ||
      psargs ~ /puma/ ||
      psargs ~ /pulpcore.app.wsgi:application/ ||
      psargs ~ /pulpcore.content:server/ ||
      psargs ~ /pulpcore-worker/ ||
      psargs ~ /smart-proxy/
      )

      1. cat /var/lib/pcp/config/pmlogconf/foreman-hotproc/summary
        #pmlogconf-setup 2.0
        ident foreman hotproc metrics
        probe hotproc.control.config != "" ? include : exclude
        hotproc.psinfo.psargs
        hotproc.psinfo.cnswap
        hotproc.psinfo.nswap
        hotproc.psinfo.rss
        hotproc.psinfo.vsize
        hotproc.psinfo.cstime
        hotproc.psinfo.cutime
        hotproc.psinfo.stime
        hotproc.psinfo.utime
        hotproc.io.write_bytes
        hotproc.io.read_bytes
        hotproc.schedstat.cpu_time
        hotproc.fd.count

      When I restart pmlogger on its own, it generates the following snippet in /var/lib/pcp/config/pmlogger/config.default:

      #+ foreman-hotproc/summary:y:default:

        1. foreman hotproc metrics
          log advisory on default {
          hotproc.psinfo.psargs
          hotproc.psinfo.cnswap
          hotproc.psinfo.nswap
          hotproc.psinfo.rss
          hotproc.psinfo.vsize
          hotproc.psinfo.cstime
          hotproc.psinfo.cutime
          hotproc.psinfo.stime
          hotproc.psinfo.utime
          hotproc.io.write_bytes
          hotproc.io.read_bytes
          hotproc.schedstat.cpu_time
          hotproc.fd.count
          }
          #----

      However, when I restart both pmcd and pmlogger together (`systemctl restart pmcd pmlogger`), I get:
      #+ foreman-hotproc/summary:x::
      #----

      Thus no data is logged by pmlogger.

      I could not trivially reproduce the issue on a different machine, so I assume it is some race condition where pmcd did not yet have properly initialized hotproc.control.config and pmlogger thinks it is not set and drops the include.

      Version-Release number of selected component (if applicable):
      pcp-5.3.7-16.el8.x86_64

      How reproducible:
      100% on one machine
      0% on another ;/

      Steps to Reproduce:
      1. have a "loaded" pmcd with hotproc
      2. systemctl restart pmcd pmlogger

      Actual results:
      pmlogger does not include configuration as it thinks hotproc.control.config is empty

      Expected results:
      pmlogger includes the config correctly

      Additional info:

              nathans@redhat.com Nathan Scott
              egolov_jira Evgeni Golov (Inactive)
              Nathan Scott Nathan Scott
              Jan Kurik Jan Kurik
              Jacob Valdez Jacob Valdez (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: