Bug #18967

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

Added by Adam Ruzicka about 1 month ago. Updated about 1 month ago.

Status:New
Priority:Normal
Assigned To:-
Category:-
Target version:Foreman - Team Ivan backlog
Difficulty: Pull request:
Bugzilla link:1431190
Story points-
Velocity based estimate-

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:

History

#1 Updated by Adam Ruzicka about 1 month ago

  • Target version set to Team Ivan backlog

Also available in: Atom PDF