Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 790342 - Error in async task is not returned
Error in async task is not returned
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: API (Show other bugs)
6.0.0
Unspecified Unspecified
medium Severity medium (vote)
: Unspecified
: Unused
Assigned To: Lukas Zapletal
Garik Khachikyan
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-14 05:06 EST by Lukas Zapletal
Modified: 2015-01-04 16:59 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
When syncing repositories on the command line fails, asynchronous failures reported an ambiguous error: "undefined method `last' for nil:NilClass" A misconfiguration of the goferd daemon caused the undefined method error. This fix returns a succinct error when reporting failure in the long running sync process.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-04 14:42:14 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:1543 normal SHIPPED_LIVE Important: CloudForms System Engine 1.1 update 2012-12-04 19:39:57 EST

  None (edit)
Description Lukas Zapletal 2012-02-14 05:06:19 EST
Description of problem:

When async operation fails, we parse errors coming from Pulp and if this fails we should report better error than:

undefined method `last' for nil:NilClass

We need to fix this to see root cause in our latest build.
Comment 2 Lukas Zapletal 2012-02-14 05:36:11 EST
Root cause in Pulp:

RequestTimeout: ('6bc4c83a-c059-454a-8851-2ac014eacbf2', 0)
Comment 3 Lukas Zapletal 2012-02-14 05:44:14 EST
Root cause was misconfiguration of goferd.

But fix correcting error message handling delivered to the master.

fae022e 790342 - Error in async task is not returned
Comment 6 Lukas Zapletal 2012-03-22 07:56:25 EDT
Yeah sorry:

1) Do some sync via cli, watch the progress bar
2) Bring the process down by stopping pulp before it is 100%
3) There should be no "undefined method" error in the log
4) The cli should receive some nice error like "Timeout" or "Error sync"
Comment 8 Garik Khachikyan 2012-03-22 08:31:10 EDT
# REOPEN

Still having "undefined method" there:

checking exactly the same scenario as in: comment#6

against:
---
katello-0.2.15-1.git.6.baa234a.el6.noarch
katello-cli-0.2.15-1.git.4.8503392.el6.noarch
candlepin-0.5.26-1.el6.noarch
pulp-1.0.0-6.el6.noarch

---

---
2012-03-22T13:16:58+0100: [Worker(delayed_job host:smqe-sat01.lab.eng.brq.redhat.com pid:10672)] Repository#after_sync failed with NoMethodError: undefined method `state' for "Connection refused - connect(2)":String - 0 failed attempts
2012-03-22T13:16:58+0100: [Worker(delayed_job host:smqe-sat01.lab.eng.brq.redhat.com pid:10672)] PERMANENTLY removing Repository#after_sync because of 1 consecutive failures.
undefined method `state' for "Connection refused - connect(2)":String
/usr/share/katello/app/models/repository.rb:116:in `sync_complete'
/usr/share/katello/app/models/glue/pulp/repo.rb:376:in `after_sync'
/usr/share/katello/app/models/async_operation.rb:41:in `send'
/usr/share/katello/app/models/async_operation.rb:41:in `perform'
/usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/backend/base.rb:87:in `invoke_job'
/usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:120:in `run'
/usr/lib/ruby/1.8/timeout.rb:67:in `timeout'
/usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:120:in `run'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:119:in `run'
/usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:177:in `reserve_and_run_one_job'
/usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:104:in `work_off'
/usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:103:in `times'
/usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:103:in `work_off'
/usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:78:in `start'
/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:77:in `start'
/usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:74:in `loop'
/usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/worker.rb:74:in `start'
/usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/command.rb:104:in `run'
/usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/command.rb:83:in `run_process'
/usr/lib/ruby/gems/1.8/gems/daemons-1.1.4/lib/daemons/application.rb:249:in `call'
/usr/lib/ruby/gems/1.8/gems/daemons-1.1.4/lib/daemons/application.rb:249:in `start_proc'
/usr/lib/ruby/gems/1.8/gems/daemons-1.1.4/lib/daemons/daemonize.rb:197:in `call'
/usr/lib/ruby/gems/1.8/gems/daemons-1.1.4/lib/daemons/daemonize.rb:197:in `call_as_daemon'
/usr/lib/ruby/gems/1.8/gems/daemons-1.1.4/lib/daemons/application.rb:253:in `start_proc'
/usr/lib/ruby/gems/1.8/gems/daemons-1.1.4/lib/daemons/application.rb:293:in `start'
/usr/lib/ruby/gems/1.8/gems/daemons-1.1.4/lib/daemons/controller.rb:70:in `run'
/usr/lib/ruby/gems/1.8/gems/daemons-1.1.4/lib/daemons.rb:195:in `run_proc'
/usr/lib/ruby/gems/1.8/gems/daemons-1.1.4/lib/daemons/cmdline.rb:109:in `call'
/usr/lib/ruby/gems/1.8/gems/daemons-1.1.4/lib/daemons/cmdline.rb:109:in `catch_exceptions'
/usr/lib/ruby/gems/1.8/gems/daemons-1.1.4/lib/daemons.rb:194:in `run_proc'
/usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/command.rb:81:in `run_process'
/usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/command.rb:75:in `daemonize'
/usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/command.rb:73:in `times'
/usr/lib/ruby/gems/1.8/gems/delayed_job-2.1.4/lib/delayed/command.rb:73:in `daemonize'
script/delayed_job:5
2012-03-22T13:16:58+0100: [Worker(delayed_job host:smqe-sat01.lab.eng.brq.redhat.com pid:10672)] 1 jobs processed at 0.0100 j/s, 1 failed ...
Comment 10 Lukas Zapletal 2012-08-28 03:26:54 EDT
This was already fixed during async tasks refactorings.
Comment 12 Garik Khachikyan 2012-10-04 08:48:56 EDT
# VERIFIED

CLI provides better output now when doing pulp stop in the middle of some delayed job (for my case: repo sync).

it throws just:
---
Progress: [###                                               ] 6.4%Connection refused
---

checked on:
---
katello-1.1.12-12.el6cf.noarch
katello-cli-1.1.8-6.el6cf.noarch
pulp-1.1.12-1.el6cf.noarch
Comment 14 errata-xmlrpc 2012-12-04 14:42:14 EST
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.

http://rhn.redhat.com/errata/RHSA-2012-1543.html

Note You need to log in before you can comment on or make changes to this bug.