Bug 1442238 - taskotop various fixes to command line arg processing and logging
Summary: taskotop various fixes to command line arg processing and logging
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Other
Version: 580
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Dobes
QA Contact: Dimitar Yordanov
URL:
Whiteboard:
Depends On:
Blocks: 1340444 sat580-low
TreeView+ depends on / blocked
 
Reported: 2017-04-13 20:15 UTC by Eric Herget
Modified: 2017-06-21 12:14 UTC (History)
3 users (show)

Fixed In Version: spacewalk-utils-2.5.1-21-sat
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-21 12:14:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.