Uploaded image for project: 'Puppet Communications Protocol'
  1. Puppet Communications Protocol
  2. PCP-889

SLES pxp-agent init script has syntax error if there is more than one pxp-agent process running

    XMLWordPrintable

Details

    • Hide

      The pxp-agent init script will function correctly even with a duplicate process running (and kill the extra process(es)).

      Show
      The pxp-agent init script will function correctly even with a duplicate process running (and kill the extra process(es)).
    • Skeletor
    • Needs Assessment
    • Bug Fix
    • pxp-agent init script no longer errors if there are multiple instances of the service running.
    • Needs Assessment

    Description

      Hello all,

      I have found that with the current init script for the pxp-agent process on SLES boxes [here|https://github.com/puppetlabs/pxp-agent/blob/master/ext/suse/pxp-agent.init] has a syntax error if there is more than one pxp-agent process running at the time of use. Particularly, lines 99 and 179. This is because:

      For bash tests, the syntax that is correct in this case is `[ x -eq y ]` which works when there is one process of pxp-agent running. If there is more than one pxp-agent process running, this turns the test in those two lines into `[ x -eq y z ]`, which is syntactically incorrect, and results in a syntax error at [. I have identified a fix and have tested it on several SLES boxes in my agent fleet, and will be submitting a PR to the pxp-agent GitHub project. 

      Attachments

        Activity

          People

            branan Branan Riley
            TheBigChungus Blake Smreker
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support