Uploaded image for project: 'VCL'
  1. VCL
  2. VCL-1043

utils.pm::kill_child_processes generates warnings if ps line begins with a space

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.2
    • Fix Version/s: 2.5
    • Component/s: vcld (backend)
    • Labels:
      None

      Description

      I can't seem to reproduce this but saw an instance on another system where a line produced by the ps command began with a space. As a result, the following warning was displayed in vcld.log:

      |9379|74|74|new|utils.pm:kill_child_processes|11713| ---- WARNING ----
      |9379|74|74|new|utils.pm:kill_child_processes|11713| 2017-05-11 13:17:51|9379|74|74|new|utils.pm:kill_child_processes|11713|parent PID: 9379: output line does not contain a PID:
      |9379|74|74|new|utils.pm:kill_child_processes|11713| line: ' 9744  9379 sh -c ps -h --ppid 9379 -o pid,ppid,args | sort -r 2>&1'
      |9379|74|74|new|utils.pm:kill_child_processes|11713| ( 0) utils.pm, kill_child_processes (line: 11713)
      |9379|74|74|new|utils.pm:kill_child_processes|11713| (-1) utils.pm, run_ssh_command (line: 4383)
      |9379|74|74|new|utils.pm:kill_child_processes|11713| (-2) OS.pm, execute (line: 3163)
      |9379|74|74|new|utils.pm:kill_child_processes|11713| (-3) Linux.pm, nfs_mount_share (line: 6131)
      |9379|74|74|new|utils.pm:kill_child_processes|11713| (-4) Linux.pm, nfs_mount_share (line: 6198)
      |9379|74|74|new|utils.pm:kill_child_processes|11713| (-5) OS.pm, mount_nfs_shares (line: 5104)
      

      A simple modification to the regex in kill_child_processes will fix this.

        Attachments

          Activity

            People

            • Assignee:
              arkurth Andrew Kurth
              Reporter:
              arkurth Andrew Kurth
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: