Project

General

Profile

Actions

Bug #3901

closed

Report delete command fails, it tries to delete a ptable

Added by Dominic Cleal over 10 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Foreman commands (obsolete)
Target version:
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

Steps to Reproduce:
1.# hammer report info --id 33
Id: 33
Host: hp-dl320g6-01.rhts.eng.bos.redhat.com
Reported at: 2013/12/18 01:11:41
Report status:
Applied: 0
Restarted: 0
Failed: 0
Restart Failures: 0
Skipped: 6
Pending: 0
Report metrics:
config_retrieval: 0.844288110733032
exec:
file:
package:
service:
user:
yumrepo:
filebucket: 0.00021
cron:
total: 0.844498110733032
Logs:

2.# hammer report delete --id 33
Could not delete the report:
404 Resource Not Found

The production.log indicates that hammer is actually attempting to delete a ptable by the same ID, not a report.

Started GET "/api/reports/33" for 10.16.66.122 at 2013-12-18 04:20:24 -0500
Processing by Api::V2::ReportsController#show as JSON
  Parameters: {"apiv"=>"v2", "id"=>"33", "report"=>{}}
Authorized user admin(Admin User)
  Rendered api/v2/reports/show.json.rabl (7.3ms)
Completed 200 OK in 43ms (Views: 7.2ms | ActiveRecord: 25.2ms)

Started DELETE "/api/ptables/33" for 10.16.66.122 at 2013-12-18 04:22:36 -0500
Processing by Api::V2::PtablesController#destroy as JSON
  Parameters: {"apiv"=>"v2", "id"=>"33", "ptable"=>{}}
Authorized user admin(Admin User)
  Rendered api/v2/errors/not_found.json.rabl (0.8ms)
Filter chain halted as :find_resource rendered or redirected
Completed 404 Not Found in 38ms (Views: 1.6ms | ActiveRecord: 25.9ms)

Hammer's log file appears to show reports throughout, perhaps a foreman_api bug?

[ INFO 2013-12-18 04:20:24 Init] Configuration from the file /etc/foreman/cli_config.yml has been loaded
[ INFO 2013-12-18 04:20:24 Init] Extension module hammer_cli_foreman loaded
[ INFO 2013-12-18 04:20:24 HammerCLI::MainCommand] Called with options: {}
[ INFO 2013-12-18 04:20:24 HammerCLIForeman::Report] Called with options: {}
[ INFO 2013-12-18 04:20:24 HammerCLIForeman::Report::InfoCommand] Called with options: {"id"=>"33"}
[ INFO 2013-12-18 04:22:35 Init] Configuration from the file /etc/foreman/cli_config.yml has been loaded
[ INFO 2013-12-18 04:22:36 Init] Extension module hammer_cli_foreman loaded
[ INFO 2013-12-18 04:22:36 HammerCLI::MainCommand] Called with options: {}
[ INFO 2013-12-18 04:22:36 HammerCLIForeman::Report] Called with options: {}
[ INFO 2013-12-18 04:22:36 HammerCLIForeman::Report::DeleteCommand] Called with options: {"id"=>"33"}
[ERROR 2013-12-18 04:22:36 Exception] 404 Resource Not Found
[ERROR 2013-12-18 04:22:36 Exception] 

RestClient::ResourceNotFound (404 Resource Not Found):
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/abstract_response.rb:48:in `return!'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:220:in `process_result'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:169:in `transmit'
    /usr/lib/ruby/1.8/net/http.rb:543:in `start'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:166:in `transmit'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:60:in `execute'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:31:in `execute'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/resource.rb:80:in `delete'
    /usr/lib/ruby/gems/1.8/gems/foreman_api-0.1.8/lib/foreman_api/base.rb:78:in `send'
    /usr/lib/ruby/gems/1.8/gems/foreman_api-0.1.8/lib/foreman_api/base.rb:78:in `http_call'
    /usr/lib/ruby/gems/1.8/gems/foreman_api-0.1.8/lib/foreman_api/base.rb:61:in `perform_call'
    /usr/lib/ruby/gems/1.8/gems/foreman_api-0.1.8/lib/foreman_api/resources/report.rb:35:in `destroy'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.12/lib/hammer_cli/./apipie/resource.rb:38:in `send'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.12/lib/hammer_cli/./apipie/resource.rb:38:in `call'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.0.12/lib/hammer_cli_foreman/commands.rb:44:in `send_request'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.12/lib/hammer_cli/./apipie/write_command.rb:10:in `execute'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.12/lib/hammer_cli/abstract.rb:24:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.12/lib/hammer_cli/abstract.rb:24:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.12/lib/hammer_cli/abstract.rb:24:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.12/lib/hammer_cli/main.rb:43:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.12/bin/hammer:62
    /usr/bin/hammer:19:in `load'
    /usr/bin/hammer:19

(https://bugzilla.redhat.com/show_bug.cgi?id=1044408)


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #3905: API v2 method delete in reports has wrong route in apidocsClosedMartin Bacovsky12/18/2013Actions
Actions #1

Updated by Dominic Cleal over 10 years ago

  • Related to Bug #3905: API v2 method delete in reports has wrong route in apidocs added
Actions #2

Updated by Dominic Cleal over 10 years ago

  • Status changed from New to Closed
  • Target version set to 1.9.3
  • translation missing: en.field_release set to 3

Fixed in foreman_api 0.1.7 I think, for Foreman 1.3.2.

Actions

Also available in: Atom PDF