Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1136361 - define new log level for caught exception tracebacks
define new log level for caught exception tracebacks
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Transitions (Show other bugs)
6.0.4
Unspecified Unspecified
unspecified Severity medium (vote)
: Beta
: Unused
Assigned To: Tomas Lestach
Lukas Pramuk
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-02 08:27 EDT by Tomas Lestach
Modified: 2016-07-27 05:11 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 05:11:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1501 normal SHIPPED_LIVE Red Hat Satellite 6.2 Capsule and Server 2016-07-27 08:28:58 EDT

  None (edit)
Description Tomas Lestach 2014-09-02 08:27:11 EDT
Description of problem:
Currently exception tracebacks get logged on the info level.

That means, if the user runs the hammer import command with --verbose option, he would see the exception tracebacks on the console as well. Tracebacks are not what the user would like to see, if he likes the cmd to be more verbose.

Let's introduce a new logging level, that logs just to the logging file and never to the console.
Comment 2 Grant Gainey 2015-02-12 16:41:05 EST
Created PR#15
Comment 3 Tomas Lestach 2015-04-10 13:05:06 EDT
hammer-cli-import.git: 6a30cce13ae85f23268919fec99548247f40a2a0
Comment 4 Grant Gainey 2015-04-10 14:03:39 EDT
katello and related projects use POST when committed upstream, and reserves MODIFIED for committing downstream.
Comment 7 Lukas Pramuk 2016-05-09 11:30:58 EDT
VERIFIED.

@Sat6.2.0-Beta
tfm-rubygem-hammer_cli_import-0.10.23-1.el6sat.noarch

In the reproducer I used an existing bug of AK import:

# hammer import activation-key --verbose --csv-file activation-keys.csv
..
Creating new ak content view: ak_1
Caught RestClient::InternalServerError:500 Internal Server Error while processing activation key 1
Creating new ak content view: ak_2
Caught RestClient::InternalServerError:500 Internal Server Error while processing activation key 2
Creating new ak content view: ak_3
Caught RestClient::InternalServerError:500 Internal Server Error while processing activation key 3
...

# less /root/import.log
...
I, [2016-05-08T18:08:16.029648 #130171]  INFO -- : Creating new ak content view: ak_1
E, [2016-05-08T18:08:16.153472 #130171] ERROR -- : Caught RestClient::InternalServerError:500 Internal Server Error while processing activation key 1
E, [2016-05-08T18:08:16.153611 #130171] ERROR -- : /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit'
/opt/rh/rh-ruby22/root/usr/share/ruby/net/http.rb:853:in `start'
...
I, [2016-05-08T18:08:18.126619 #130171]  INFO -- : Creating new ak content view: ak_2
E, [2016-05-08T18:08:18.230111 #130171] ERROR -- : Caught RestClient::InternalServerError:500 Internal Server Error while processing activation key 2
E, [2016-05-08T18:08:18.230250 #130171] ERROR -- : /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit'
/opt/rh/rh-ruby22/root/usr/share/ruby/net/http.rb:853:in `start'
...
I, [2016-05-08T18:08:20.167749 #130171]  INFO -- : Creating new ak content view: ak_3
E, [2016-05-08T18:08:20.288058 #130171] ERROR -- : Caught RestClient::InternalServerError:500 Internal Server Error while processing activation key 3
E, [2016-05-08T18:08:20.288196 #130171] ERROR -- : /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit'
/opt/rh/rh-ruby22/root/usr/share/ruby/net/http.rb:853:in `start'
...

>>> new logging level was introduced, verbose output shows one line error while import log show a full stacktrace
Comment 9 errata-xmlrpc 2016-07-27 05:11:05 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1501

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