Hide Forgot
Description of problem: Attempting to scan a /24 network with rho. Does not write csv files to disk. Reports error "AttributeError: 'NoneType' object has no attribute 'output_filename'" Version-Release number of selected component (if applicable): rho-0.0.27-1.el7.noarch How reproducible: always Steps to Reproduce: 1. rho auth add --name myroot --username <username> [--file <rsa file>] 2. rho profile add --name deep1 --range "172.21.228.2 - 172.21.228.253" --auth myroot 3. rho scan --profile deep1 --report pack-scan Actual results: No csv file created. Expected results: To have a csv file with some data in it. Additional info: Traceback (most recent call last): File "/usr/bin/rho", line 20, in <module> CLI().main() File "/usr/lib/python2.7/site-packages/rho/cli.py", line 97, in main cmd.main() File "/usr/lib/python2.7/site-packages/rho/clicommands.py", line 327, in main self._do_command() File "/usr/lib/python2.7/site-packages/rho/clicommands.py", line 587, in _do_c ommand reportobj.output_filename)), "w") AttributeError: 'NoneType' object has no attribute 'output_filename'
Looking at the code this would happen if there is no pack-scan report defined in the rho config. Can you please provide the output of 'rho report show --name pack-scan'? I expect the output to print the fields for the report.
I was able to recreate the problem using a non-existent report. rho scan --profile deep1 --report foobar Config Encryption Password: Scanning... 192.168.122.1:22 with auth myroot 192.168.122.3:22 with auth myroot 192.168.122.2:22 with auth myroot Traceback (most recent call last): File "/usr/bin/rho", line 20, in <module> CLI().main() File "/usr/lib/python2.7/site-packages/rho/cli.py", line 97, in main cmd.main() File "/usr/lib/python2.7/site-packages/rho/clicommands.py", line 327, in main self._do_command() File "/usr/lib/python2.7/site-packages/rho/clicommands.py", line 587, in _do_command reportobj.output_filename)), "w") AttributeError: 'NoneType' object has no attribute 'output_filename'
Proposed solution: 1) if a report is not found, print error message stating the report name and exit gracefully. 2) if the missing report is one of the default reports, then rho should automagically add it to the rho config then run the report. This happens if initconfig is not run prior to running the rho commands.
Posted a PR to address the problem: https://github.com/candlepin/rho/pull/30
*** Bug 1266036 has been marked as a duplicate of this bug. ***
This was already released.