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 1594570 - Uncaught exception when pulp task isnt created from dynflow step
Summary: Uncaught exception when pulp task isnt created from dynflow step
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: Unspecified
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: vijsingh
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-24 14:58 UTC by Pavel Moravec
Modified: 2021-12-10 16:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-03 16:28:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 24077 0 None None None 2018-06-26 12:55:36 UTC

Description Pavel Moravec 2018-06-24 14:58:31 UTC
Description of problem:
When a Content Host:
- installs package (or does any other activity that triggers Actions::Katello::Host::UploadPackageProfile task) 
- and promptly unregisters itself,

the UploadPackageProfile task can fail on Actions::Pulp::Consumer::GenerateApplicability step as pulp returns "Pulp consumer 8b042949-3daa-49a2-9827-21ccd982227b not found" instead of task ID for the regenerate_applicability task. This is not further handled properly by katello or foreman tasks, since:

- task itself raises uncaught exception (see below)
- sometimes the task ends up in paused/error state (this is bit tricky to reproduce)

Please improve this error handling.


Version-Release number of selected component (if applicable):
Sat6.3.1
tfm-rubygem-katello-3.4.5.64-1.el7sat.noarch
tfm-rubygem-dynflow-0.8.34-1.fm1_15.el7sat.noarch


How reproducible:
100% (the error)
20% (the stuck task)


Steps to Reproduce:
1. Register a system to Satellite, attach a subscription
2. Artificially send package profile (just for the sake of speeding up the reproducer; it is a race condition; the real use case behind involves package removal at this state, what triggers *one* profile upload that *might* repro the bug)

for i in $(seq 1 20); do katello-package-upload --force & done

3. Few seconds after that, unregister the system

4. Optionally, for reproducing also the paused/error tasks, restart foreman-tasks service few seconds after system unregistered. (this step isnt required for the uncaught exception)

5. Check tasks with error result, optionally in paused/error state/result.


Actual results:
5. There will be always error-result tasks (that's OK) with exception (that's not OK):
 Error:

NoMethodError

undefined method `each' for true:TrueClass

---
- "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.4.5.64/app/lib/actions/pulp/abstract_async_task.rb:108:in
  `external_task='"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/action/polling.rb:83:in
  `initiate_external_action'"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/action/polling.rb:18:in
  `run'"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/action/cancellable.rb:13:in
  `run'"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.4.5.64/app/lib/actions/pulp/abstract_async_task.rb:45:in
  `run'"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/action.rb:518:in
  `block (3 levels) in execute_run'"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/middleware/stack.rb:26:in
  `pass'"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/middleware.rb:18:in
  `pass'"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/middleware.rb:31:in
  `run'"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/middleware/stack.rb:22:in
  `call'"
- "/opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.34/lib/dynflow/middleware/stack.rb:26:in
  `pass'"
..

Optionally, if you are unlucky enough, such a task is paused and hangs paused forever.


Expected results:
Provide better error text (i.e. pass the "Pulp consumer 8b042949-3daa-49a2-9827-21ccd982227b not found." error text) in the dynflow external task error text.

Ensure such task is not paused when foreman-tasks is being restarted while processing this task.


Additional info:

Comment 4 Adam Ruzicka 2018-06-26 12:55:34 UTC
Created redmine issue http://projects.theforeman.org/issues/24077 from this bug

Comment 5 Bryan Kearney 2020-01-15 21:00:42 UTC
The Satellite Team is attempting to provide an accurate backlog of bugzilla requests which we feel will be resolved in the next few releases. We do not believe this bugzilla will meet that criteria, and have plans to close it out in 1 month. This is not a reflection on the validity of the request, but a reflection of the many priorities for the product. If you have any concerns about this, feel free to contact Red Hat Technical Support or your account team. If we do not hear from you, we will close this bug out. Thank you.

Comment 6 Bryan Kearney 2020-02-03 16:28:03 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact Red Hat Technical Support. Thank you.


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