Bug 1442238

Summary: taskotop various fixes to command line arg processing and logging
Product: Red Hat Satellite 5 Reporter: Eric Herget <eherget>
Component: OtherAssignee: Jan Dobes <jdobes>
Status: CLOSED CURRENTRELEASE QA Contact: Dimitar Yordanov <dyordano>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 580CC: adujicek, dyordano, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-utils-2.5.1-21-sat Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-21 12:14:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1340444, 1358815    

Description Eric Herget 2017-04-13 20:15:18 UTC
Description of problem:
A few minor issues were found with taskotop command line arg processing and logging, including...
* -m allows negative number
* -n allows negative number
* --logfile test.log without -v gives no warning that -v is needed
* --logfile <path> where some directory in <path> does not exist causes traceback
* extraneous line "ERROR: 2017-04-11 15:40:28,707 ERROR:15728384" printed to logfile
* "Logging started..." message only printed when verbosity is 3 or 4

Version-Release number of selected component (if applicable):
spacewalk-utils-2.5.1-20.el6sat.noarch

How reproducible:
always

Steps to Reproduce:
1. specify command line args as described above
2.
3.

Actual results:
don't do the things specified above.

Expected results:


Additional info:

Comment 1 Eric Herget 2017-04-13 20:25:58 UTC
The following fixes were implemented:
* -m argument must be non-negative, print error message and exit if not
* -n argument must be non-negative, print error message and exit if not
* --logfile argument without -v prints error message saying -v is needed and exits
* --logfile argument with path containing non-existent directory prints error message and exits
* --logfile argument with path that is unwritable prints error message and exits
* extraneous line in logfile is no longer printed to logfile
* Logging started message printed without timestamp any time logfile is written

Comment 3 Eric Herget 2017-04-18 21:12:59 UTC
This fix has not yet been applied to the spacewalk repo as we are waiting for build issues to be resolved.  This BZ will be updated with spacewalk commit once build issues have been resolved.

Comment 4 Eric Herget 2017-04-19 14:41:08 UTC
spacewalk.github:
b2039ac95cd454e331dc5c7dc096658dce98842f

spacewalk-utils-2.7.11-1