Project

General

Profile

Actions

Bug #18967

closed

hammer job-invocation output returns "undefined method `pending?' for nil:NilClass" when called on queued invocation

Added by Adam Ruzicka about 7 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1431190

Description of problem:

~]# hammer -v -u admin -p changeme job-invocation output --host="hostname" --id="58"

returns (debug output in attachment):

[ERROR 2017-03-10 09:37:11 Exception] undefined method `pending?' for nil:NilClass
undefined method `pending?' for nil:NilClass
[ERROR 2017-03-10 09:37:11 Exception]

RestClient::InternalServerError (500 Internal Server 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/apipie-bindings-0.0.16/lib/apipie_bindings/api.rb:308:in `block in rest_client_call_block'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:228:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:228: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'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/resource.rb:51:in `get'
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/api.rb:295:in `call_client'
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/api.rb:224:in `http_call'
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/api.rb:174:in `call_action'
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/api.rb:169:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/resource.rb:14:in `call'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.13/lib/hammer_cli/apipie/command.rb:43:in `send_request'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1.10/lib/hammer_cli_foreman/commands.rb:190:in `send_request'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.13/lib/hammer_cli/apipie/command.rb:34:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.13/lib/hammer_cli/abstract.rb:24:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.13/lib/hammer_cli/abstract.rb:24:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.13/lib/hammer_cli/abstract.rb:24:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1.13/bin/hammer:125:in `<top (required)>'
/usr/bin/hammer:23:in `load'
/usr/bin/hammer:23:in `<main>'

This happens only on invocations that are shcheduled for future run, command works all right on succeeded or failed invocations

~]# hammer job-invocation list
---|-------------|-----------|---------|--------|---------|-------|------------------------
ID | DESCRIPTION | STATUS | SUCCESS | FAILED | PENDING | TOTAL | START
---|-------------|-----------|---------|--------|---------|-------|------------------------
58 | Run ls | queued | N/A | N/A | N/A | N/A | 2017-03-10 16:20:00 UTC

Version-Release number of selected component (if applicable):
satellite-6.2.8-4.0.el6sat.noarch

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:
Exception

Expected results:
Some message saying that the job has not run yet

Additional info:

Actions #1

Updated by Adam Ruzicka about 7 years ago

  • Target version set to 113
Actions #2

Updated by The Foreman Bot over 6 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Adam Ruzicka
  • Pull request https://github.com/theforeman/foreman_remote_execution/pull/286 added
Actions #3

Updated by The Foreman Bot over 6 years ago

  • Pull request https://github.com/theforeman/hammer_cli_foreman_remote_execution/pull/16 added
Actions #4

Updated by Adam Ruzicka over 6 years ago

  • Target version changed from 113 to 227
Actions #5

Updated by Anonymous over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #6

Updated by Adam Ruzicka over 6 years ago

  • Status changed from Closed to Ready For Testing

Moving back to Ready for Testing because the hammer PR is still open

Actions #7

Updated by Adam Ruzicka about 6 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF