Project

General

Profile

Feature #24135

Reduce/filter output of reporting info when submitting via salt api

Added by Ben Howell almost 4 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Reports
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Currently when running upload-salt-reports while logging is at "INFO", the entire highstate report gets published unfiltered into the production.log:

2018-07-02T15:53:20 713bdfc3 [app] [I] Started POST "/salt/api/v2/jobs/upload" for 192.168.1.228 at 2018-07-02 15:53:20 -0500
2018-07-02T15:53:20 713bdfc3 [app] [I] Processing by ForemanSalt::Api::V2::JobsController#upload as JSON
2018-07-02T15:53:20 713bdfc3 [app] [I]   Parameters: {"job"=>{"function"=>"state.highstate", "result"=>{"foreman-rutabaga.thecitybase.net"=>{"pkg_|-basic-packag
es_|-basic-packages_|-installed"=>{"comment"=>"3 targeted packages were installed/updated.\nThe following packages were already installed: strace, screen, vim",
 "name"=>"basic-packages", "start_time"=>"20:28:25.831402", "result"=>true, "duration"=>41136.155, "__run_num__"=>1, "__sls__"=>"basic_packages", "changes"=>{"m
...
L"}, "__id__"=>"add_sre_users_to_sudoers"}}}, "job_id"=>"20180702202819503701"}, "apiv"=>"v2"}
2018-07-02T15:53:20 713bdfc3 [app] [I] Current user: foreman_api_admin (administrator)
2018-07-02T15:53:20 713bdfc3 [app] [I] Processing job 20180702202819503701 from Salt.
2018-07-02T15:53:20 713bdfc3 [app] [I] Completed 200 OK in 84ms (Views: 0.3ms | ActiveRecord: 9.3ms)

Would it be possible to filter the output of the highstate data before logging? This only appears in "INFO" so it's not a problem if using "WARN" or higher.

Associated revisions

Revision 4554ab2a (diff)
Added by Bernhard Suttner over 2 years ago

Fixes #24135 - Filter job parameters (#120)

History

#1 Updated by The Foreman Bot over 2 years ago

  • Assignee set to Bernhard Suttner
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_salt/pull/120 added

#2 Updated by The Foreman Bot over 2 years ago

  • Fixed in Releases 11.0.0 added

#3 Updated by Bernhard Suttner over 2 years ago

  • Status changed from Ready For Testing to Closed

#4 Updated by Bernhard Suttner over 2 years ago

  • Fixed in Releases 13.2.0 added
  • Fixed in Releases deleted (11.0.0)

Also available in: Atom PDF