Bug #12189
closedhammer report info doesn't show logs resources and messages
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1271980
Description of problem:
hammer report info --id xxx doesn't show logs resources and messages
Version-Release number of selected component (if applicable):
6.1.2
How reproducible:
Always
Steps to Reproduce:
1. hammer report info --search 'applied > 0'
2. Identify an id with content
3. hammer report info --id 293
Actual results:
$ hammer report info --id 293
Id: 293
Host: rhel7ewl1.ewl.example.com
Reported at: 2015/10/15 08:05:15
Report status:
Applied: 5
Restarted: 1
Failed: 0
Restart Failures: 0
Skipped: 0
Pending: 0
Report metrics:
config_retrieval: 2.515334706
exec:
file: 0.510593942
package: 1.072031761
service: 0.018655136
user:
yumrepo:
filebucket: 0.000145448
cron:
total: 4.117315495
Logs:
1) Resource:
Message:
[...]
14)Resource:
Message:
There are 14 Logs but they're all empty (even though they're not empty in the GUI, see screenshot).
Expected results:
Resources and Messages are listed like in the GUI.
Additional info:
Updated by Brandon Boles almost 9 years ago
Looks like the same issue with 'host reports':
hammer> host reports --id 337973 ---|------|-------------|---------|-----------|--------|------------------|---------|-------- ID | HOST | LAST REPORT | APPLIED | RESTARTED | FAILED | RESTART FAILURES | SKIPPED | PENDING ---|------|-------------|---------|-----------|--------|------------------|---------|-------- hammer>
I'm seeing this on Foreman 1.10 and Hammer 0.5.1.
Updated by Brandon Boles almost 9 years ago
More debug:
$ hammer -d report info --id 21521142 [11/1918] [ INFO 2016-01-21T17:03:50 Init] Initialization of Hammer CLI (0.5.1) has started... [DEBUG 2016-01-21T17:03:50 Init] Running at ruby 1.9.3-p327 [ INFO 2016-01-21T17:03:50 Init] Configuration from the file /home/bboles/.hammer/cli_config.yml has been loaded [ INFO 2016-01-21T17:03:50 Init] Configuration from the file /home/bboles/.hammer/cli.modules.d/foreman.yml has been loaded [DEBUG 2016-01-21T17:03:51 Connection] Registered: foreman [DEBUG 2016-01-21T17:03:51 API] Global headers: { :content_type => "application/json", :accept => "application/json;version=2", "Accept-Language" => "en" } [ INFO 2016-01-21T17:03:51 Modules] Extension module hammer_cli_foreman (0.5.1) loaded [DEBUG 2016-01-21T17:03:51 Init] Using locale 'en' [DEBUG 2016-01-21T17:03:51 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/usr/local/lib/ruby/gems/1.9.1/gems/hammer_cli-0.5.1/locale' [DEBUG 2016-01-21T17:03:51 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/usr/local/lib/ruby/gems/1.9.1/gems/hammer_cli_foreman-0.5.1/locale' [ INFO 2016-01-21T17:03:51 HammerCLI::MainCommand] Called with options: {"option_debug"=>true} [ INFO 2016-01-21T17:03:51 HammerCLIForeman::Report] Called with options: {} [ INFO 2016-01-21T17:03:51 HammerCLIForeman::Report::InfoCommand] Called with options: {"option_id"=>"21521142"} [ INFO 2016-01-21T17:03:51 API] GET /api/reports/21521142 [DEBUG 2016-01-21T17:03:51 API] Params: {} [DEBUG 2016-01-21T17:03:51 API] Headers: { :params => {} } [DEBUG 2016-01-21T17:03:51 API] Response: { "metrics" => { "time" => { "augeas" => 0.349318, "config_retrieval" => 21.9314229488373, "cron" => 0.001935, "exec" => 2.544223, "file" => 2.221536, "file_line" => 0.000596, "filebucket" => 0.000316, "group" => 0.026444, "package" => 0.785225, "schedule" => 0.000597, "service" => 1.434419, "ssh_authorized_key" => 0.020392, "total" => 29.3990379488373, "user" => 0.0799810000000001, "yumrepo" => 0.002633 }, "resources" => { "changed" => 1, "failed" => 0, "failed_to_restart" => 0, "out_of_sync" => 1, "restarted" => 0, "scheduled" => 0, "skipped" => 0, "total" => 667 }, "changes" => { "total" => 1 }, "events" => { "failure" => 0, "success" => 1, "total" => 1 } }, "created_at" => "2016-01-20T23:42:59Z", "updated_at" => "2016-01-20T23:42:59Z", "id" => 21521142, "host_id" => 1221, "host_name" => "host1.domain.com", "reported_at" => "2016-01-20T23:42:01Z", "status" => { "applied" => 1, "restarted" => 0, "failed" => 0, "failed_restarts" => 0, "skipped" => 0, "pending" => 0 }, "logs" => [ [0] { "level" => "notice", "source" => { "source" => "/Stage[main]/Nscd/Service[nscd]/ensure" }, "message" => { "message" => "ensure changed 'stopped' to 'running'" } } ], "summary" => "Modified" } [DEBUG 2016-01-21T17:03:51 API] Response headers: { :date => "Thu, 21 Jan 2016 23:03:51 GMT", :server => "Apache/2.4.6 (CentOS)", :foreman_version => "1.10.1", :foreman_api_version => "2", :apipie_checksum => "020131358bdc14281bf04c82c2816c79", :x_ua_compatible => "IE=Edge,chrome=1", :cache_control => "must-revalidate, private, max-age=0", :x_request_id => "16032a62260603bdb3a5f0ed977a6306", :x_runtime => "0.135114", :x_rack_cache => "miss", :x_powered_by => "Phusion Passenger 4.0.18", :set_cookie => [ [0] "_session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWE3ZjhkNWY5OGY3NDk5MmFhMWNkOTg2NzI1OTYxOWYyBjsAVEkiC2xvY2FsZQY7AEYiB2Vu--0fcf1ad29cb6dfe5a8cfb2dc897975b7d464e580; path=/; HttpOnly", [1] "request_method=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT" ], :etag => "\"89c02b67d8521fb86eb1bf2ff0a009d5\"", :status => "200 OK", :connection => "close", :transfer_encoding => "chunked", :content_type => "application/json; charset=utf-8" } Id: 21521142 Host: host1.domain.com Reported at: 2016/01/20 23:42:01 Report status: Applied: 1 Restarted: 0 Failed: 0 Restart Failures: 0 Skipped: 0 Pending: 0 Report metrics: config_retrieval: 21.9314229488373 exec: 2.544223 file: 2.221536 package: 0.785225 service: 1.434419 user: 0.0799810000000001 yumrepo: 0.002633 filebucket: 0.000316 cron: 0.001935 total: 29.3990379488373 Logs: 1) Resource: Message:
We can see the data being pulled from the server successfully but it seems like it isn't being parsed correctly.
Updated by The Foreman Bot over 6 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/hammer-cli-foreman/pull/375 added
Updated by Anonymous over 6 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset hammer-cli-foreman|c3c8fa2d16c445cb2ff54a0be04a81d1fbfc3e96.
Updated by Tomer Brisker about 6 years ago
- Fixed in Releases hammer-cli-foreman-0.14.0 added