Closed mdvickst closed 8 years ago
@mdvickst Can you give steps to reproduce the issue that this fixes? I've not been able to reproduce the issue scanning a local vm running CentOS running a report that includes one of the subman facts.
Aside from that it seems fine to me.
@cnsnyder Do you get this error if sub-man has not been installed?
@barnabycourt I do not see that in the output csv of scanning a centos 7 box without subscription-manager installed.
Below is the csv that is output:
""" date.date,uname.hostname,redhat-release.release,redhat-packages.is_redhat,redhat-packages.num_rh_packages,redhat-packages.num_installed_packages,redhat-packages.last_installed,redhat-packages.last_built,virt-what.type,virt.virt,virt.num_guests,virt.num_running_guests,cpu.count,cpu.socket_count,ip,port,subman.virt.host_type Tue Jun 7 13:24:54 EDT 2016,dev.example.com,2.1511.el7.centos.2.10,,0,402,,,,virt-guest,0,0,1,"bash: dmidecode: command not found ",192.168.121.68,22, """
@cnsnyder did you install dmidecode, it looks like the error would be from the calculation of subman.virt.host_type
@barnabycourt /me forgot to run the scan with high enough permissions. Dmidecode is installed on my test machine. Below is the output with the appropriate permissions:
""" date.date,uname.hostname,redhat-release.release,redhat-packages.is_redhat,redhat-packages.num_rh_packages,redhat-packages.num_installed_packages,redhat-packages.last_installed,redhat-packages.last_built,virt-what.type,virt.virt,virt.num_guests,virt.num_running_guests,cpu.count,cpu.socket_count,ip,port,subman.virt.host_type Tue Jun 7 14:03:14 EDT 2016,dev.example.com,2.1511.el7.centos.2.10,,0,402,,,"""kvm""",virt-guest,0,0,1,1,192.168.121.68,22, """
@mdvickst we are having trouble duplicating this issue. Can you provide details on the exact centos version where you were having this problem?
I have not been able to reproduce this bug either but I have seen stack traces from multiple scans that have had this error.
Attached is an example of one such stack trace. PkgInfoParseException.txt
@mdvickst @barnabycourt It looks to me like this would only be raised if one of the commands that is using rpm failed to get all the fields requested. My suspicion is it is either a version of centos that has a much older version of rpm installed or it is not a machine that has rpm installed at all.
@mdvickst for the system showing the error, do you know what version of Centos was installed?
Added error checking for subscription manager command that caused an exception to be thrown in system was not running subscription manager (CentOS)