Bug #4033

Need a clearer / user friendly message when deletion of smart proxy fails

Added by Og Maciel almost 4 years ago. Updated over 3 years ago.

Status:Duplicate
Priority:Normal
Assigned To:-
Category:-
Target version:-
Difficulty: Bugzilla link:
Found in release: Pull request:
Story points-
Velocity based estimate-

Description

[root@qe-blade-04 ~]# hammer -v proxy list
[ INFO 2014-01-16 11:12:06 Init] Initialization of Hammer CLI (0.0.14) has started...
[ INFO 2014-01-16 11:12:06 Init] Configuration from the file /etc/foreman/cli_config.yml has been loaded
[ INFO 2014-01-16 11:12:06 Modules] Extension module hammer_cli_foreman (0.0.15) loaded
[ INFO 2014-01-16 11:12:07 HammerCLI::MainCommand] Called with options: {"verbose"=>true}
[ INFO 2014-01-16 11:12:07 HammerCLIForeman::SmartProxy] Called with options: {}
[ INFO 2014-01-16 11:12:07 HammerCLIForeman::SmartProxy::ListCommand] Called with options: {}
[DEBUG 2014-01-16 11:12:07 HammerCLIForeman::SmartProxy::ListCommand] Retrieved data:
[
  [0] {
    "url"        => "https://[EDITED]:8443",
    "updated_at" => "2014-01-16T02:12:44Z",
    "features"   => [
      [0] {
        "id"   => 1,
        "name" => "TFTP" 
      },
      [1] {
        "id"   => 4,
        "name" => "Puppet" 
      },
      [2] {
        "id"   => 5,
        "name" => "Puppet CA" 
      }
    ],
    "id"         => 1,
    "created_at" => "2014-01-16T02:12:44Z",
    "name"       => "[EDITED]" 
  }
]
----------------------------------------------------------------------------------
ID | NAME                               | URL
----------------------------------------------------------------------------------
1  | qe-blade-04.[EDITED] | https://qe-blade-04.[EDITED]
----------------------------------------------------------------------------------
[root@qe-blade-04 ~]# hammer -v proxy delete --id 1
[ INFO 2014-01-16 11:12:15 Init] Initialization of Hammer CLI (0.0.14) has started...
[ INFO 2014-01-16 11:12:15 Init] Configuration from the file /etc/foreman/cli_config.yml has been loaded
[ INFO 2014-01-16 11:12:15 Modules] Extension module hammer_cli_foreman (0.0.15) loaded
[ INFO 2014-01-16 11:12:15 HammerCLI::MainCommand] Called with options: {"verbose"=>true}
[ INFO 2014-01-16 11:12:15 HammerCLIForeman::SmartProxy] Called with options: {}
[ INFO 2014-01-16 11:12:15 HammerCLIForeman::SmartProxy::DeleteCommand] Called with options: {"id"=>"1"}
[ERROR 2014-01-16 11:12:15 Exception] Error: 500 Internal Server Error
Could not delete the proxy:
  Error: 500 Internal Server Error
[ERROR 2014-01-16 11:12:15 Exception]

RestClient::InternalServerError (500 Internal Server Error):
    /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.9/lib/foreman_api/base.rb:78:in `send'
    /usr/lib/ruby/gems/1.8/gems/foreman_api-0.1.9/lib/foreman_api/base.rb:78:in `http_call'
    /usr/lib/ruby/gems/1.8/gems/foreman_api-0.1.9/lib/foreman_api/base.rb:61:in `perform_call'
    /usr/lib/ruby/gems/1.8/gems/foreman_api-0.1.9/lib/foreman_api/resources/smart_proxy.rb:71:in `destroy'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/./apipie/resource.rb:38:in `send'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/./apipie/resource.rb:38:in `call'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.0.15/lib/hammer_cli_foreman/commands.rb:34:in `send_request'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/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.14/lib/hammer_cli/abstract.rb:22: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.14/lib/hammer_cli/abstract.rb:22: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.14/lib/hammer_cli/abstract.rb:22: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.14/bin/hammer:61
    /usr/bin/hammer:19:in `load'
    /usr/bin/hammer:19

Also:

11:28 AM Dominic likely the host if it's the proxy automatically added by the installer

delete_proxy.log (13.9 KB) Og Maciel, 01/16/2014 04:44 PM


Related issues

Related to Foreman - Bug #3194: Ugly errors when destroy actions are stopped by FKs Duplicate 10/03/2013
Duplicates Foreman - Bug #5788: before_destroy missing from EnsureNotUsedBy.new in SmartP... Closed 05/19/2014

History

#1 Updated by Dominic Cleal almost 4 years ago

  • Related to Bug #3194: Ugly errors when destroy actions are stopped by FKs added

#2 Updated by Dominic Cleal almost 4 years ago

Linked to #3194 as I suspect this is FKs. Foreman's production.log for the request might confirm, Og?

#3 Updated by Og Maciel almost 4 years ago

Including partial production.log file with (I believe) the call and stacktrace for this.

#4 Updated by Dmitri Dolguikh almost 4 years ago

  • Target version set to Sprint 21

#5 Updated by Dmitri Dolguikh over 3 years ago

  • Target version changed from Sprint 21 to Sprint 22

#6 Updated by Dmitri Dolguikh over 3 years ago

  • Target version deleted (Sprint 22)

#7 Updated by Dominic Cleal over 3 years ago

  • Duplicates Bug #5788: before_destroy missing from EnsureNotUsedBy.new in SmartProxy model added

#8 Updated by Dominic Cleal over 3 years ago

  • Status changed from New to Duplicate

#5788 should now provide a clear error message.

Also available in: Atom PDF