Bug 1431190
| Summary: | hammer job-invocation output returns "undefined method `pending?' for nil:NilClass" when called on queued invocation | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Peter Ondrejka <pondrejk> | ||||
| Component: | Remote Execution | Assignee: | Adam Ruzicka <aruzicka> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Roman Plevka <rplevka> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 6.2.8 | CC: | aruzicka, bkearney, egolov, inecas, pcreech, rplevka | ||||
| Target Milestone: | 6.4.0 | Keywords: | Triaged | ||||
| Target Release: | Unused | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2018-10-16 19:11:39 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Created redmine issue http://projects.theforeman.org/issues/18967 from this bug Per discussion with FE, lets get this into 6.3. Upstream bug assigned to aruzicka Upstream bug assigned to aruzicka Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18967 has been resolved. Moving back to ASSIGNED because the hammer PR is still open Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18967 has been resolved. FailedQA: snap#12 the version is now updated (0.1.0), however the `job invocation info` command now errors out with slightly different traceback: 2018-07-14T02:04:00 [W|app|364a9] Action failed NoMethodError: undefined method `pending?' for nil:NilClass /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.5.3/app/controllers/api/v2/job_invocations_controller.rb:85:in `output' /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action' ... (see attachments for more) Created attachment 1459154 [details]
job invocation info traceback
The issue described in #12 is in fact another bug (BZ1607373). I'm setting this to ON_QA again. Steps to reproduce (without hitting the other bug): 1) Schedule a job to execute far in the future (next year or so) 2) Run hammer job-invocation output VERIFIED on sat6.4.0-13 # hammer job-invocation output --id 1 --host e9atdjil6qunlu15.lab.eng.rdu2.redhat.com --async The job is scheduled to start at 2019-07-26T13:29:00.000Z Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2018:2927 |
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: