quipucords / rho

A tool for scanning a network, logging into systems using SSH, and retrieving information about available Unix and Linux servers.
https://quipucords.github.io/rho/
GNU General Public License v2.0
5 stars 7 forks source link

Accounting errors in jboss.eap.processes logic #435

Open kdelee opened 6 years ago

kdelee commented 6 years ago

Specify type:

Bug severity (if applicable):

Description:

Error output in scan found jboss.eap.processes indicates that the logic that ps -A -f e | grep eap will spawn two processes that have eap in them is not reliable.


Bug Report

Version of rho:

[ 53570d8 ]

Expected behavior:

The processes that are searching for eap processes must be correctly accounted for.

Actual behavior:

An error is being produced that indicates a problem with the accounting. Also, once I started looking into this more, it appears that more processes than expected are being spawned on Fedora, because on the Fedora 26 test machine without any jboss runninng, we get a report of 1 process.

etc_release.release jboss.eap.processes
Red Hat Enterprise Linux Server release 5.9 (Tikanga) Bad result (1 processes) from 'ps -A -f e | grep eap'
Fedora release 26 (Twenty Six) 1 EAP processes found

Steps to reproduce:

I was able to produce the "error" form of this bug by scanning a RHEL 5 machine without JBoss running. (there is a dormant wildfly zip install). The over counting is exhibited by scanning Fedora machine.

Idea: 💡 Maybe instead of a priori assuming X number of processes will be spawned by your search, you could collect the PIDs of processes spawned?

Environment information:

Provide detailed information on the scanning and target systems (if applicable); see example below.

Type Operating System OS Version Python Version Virtualization
Scanning System Fedora 25 3.6 Bare Metal
Target System RHEL 5.9 2.X ESXi
Target System Fedora 26 2.X ESXi
kdelee commented 6 years ago

@noahl It is also important to note all this information is from scans using the scanbasic user we have on the test machines. (a non-sudo user)