Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 790342

Summary: Error in async task is not returned
Product: Red Hat Satellite Reporter: Lukas Zapletal <lzap>
Component: APIAssignee: Lukas Zapletal <lzap>
Status: CLOSED ERRATA QA Contact: Garik Khachikyan <gkhachik>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.0CC: achan, asettle, dmacpher, gkhachik, jrist, mkoci, mmccune
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 19:42:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lukas Zapletal 2012-02-14 10:06:19 UTC
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 10:36:11 UTC
Root cause in Pulp:

RequestTimeout: ('6bc4c83a-c059-454a-8851-2ac014eacbf2', 0)

Comment 3 Lukas Zapletal 2012-02-14 10:44:14 UTC
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 11:56:25 UTC
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 12:31:10 UTC
# 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 07:26:54 UTC
This was already fixed during async tasks refactorings.

Comment 12 Garik Khachikyan 2012-10-04 12:48:56 UTC
# 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 19:42:14 UTC
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