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 2053876 - Multiple instances of scheduled tasks of more types
Summary: Multiple instances of scheduled tasks of more types
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: RH Cloud - Inventory
Version: 6.11.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: 6.11.0
Assignee: Shimon Shtein
QA Contact: addubey
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-12 21:22 UTC by Pavel Moravec
Modified: 2022-07-05 14:33 UTC (History)
4 users (show)

Fixed In Version: rubygem-foreman_rh_cloud-5.0.35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-07-05 14:33:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github theforeman foreman_rh_cloud pull 725 0 None open Move REX related registration to initializer 2022-05-02 14:23:29 UTC
Red Hat Product Errata RHSA-2022:5498 0 None None None 2022-07-05 14:33:23 UTC

Description Pavel Moravec 2022-02-12 21:22:57 UTC
Description of problem:
On a freshly installed Sat7.0 snap9, I do see multiple instances of several scheduled tasks:

hammer> task list --organization-id 1 --search 'state = scheduled"
-------------------------------------|---------------------------------------|-----------|---------|------------|----------|----------|---------------|------------
ID                                   | ACTION                                | STATE     | RESULT  | STARTED AT | ENDED AT | DURATION | OWNER         | TASK ERRORS
-------------------------------------|---------------------------------------|-----------|---------|------------|----------|----------|---------------|------------
a45b89ae-77cf-4a1d-b2be-03ecf941acc3 | Clean up StoredValues                 | scheduled | pending |            |          | 00:00:00 |               |            
cb8ae27f-57ea-42ca-8088-0576ca14474d | Create RSS notifications              | scheduled | pending |            |          | 00:00:00 |               |            
0073bfda-5b5b-490e-861d-6f3ee7b1a903 | Generate all reports job              | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
0e1020b6-ccd6-4764-9702-655057c10b55 | Generate all reports job              | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
2583a6ba-e3e7-4c17-8e91-bfc6d958d69b | Generate all reports job              | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
60c7ee9b-a418-4a45-baeb-ec2146e4c003 | Generate all reports job              | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
addc47d8-93ab-4309-9e39-5f6a8fc654ca | Generate all reports job              | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
cea46767-fbdb-48bb-a4c3-b52293b6e49c | Generate all reports job              | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
3dba08a4-f8e1-4bf8-8578-a6f13dfda1ce | Insights client status aging          | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
5b8e6bb3-5b8c-4b89-88b9-8a3a78bdd0e0 | Insights client status aging          | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
758fd231-099c-48b3-9e64-1167ef7c5f9e | Insights client status aging          | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
a03ea2cf-305a-4555-a199-bce4eac621ce | Insights client status aging          | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
beb85a93-2ab3-4594-bb6f-d92dc3cadf2b | Insights client status aging          | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
5e65a817-0b35-49f3-928d-8ab5599c8847 | Insights scheduled sync               | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
6e696576-6aee-44e9-b860-20fc5e966390 | Insights scheduled sync               | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
9d1020fe-0b14-4293-934f-0f97f52d0897 | Insights scheduled sync               | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
017ec16a-fb80-4168-9d9a-828fa87af550 | Inventory scheduled sync              | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
08e914a4-efc0-45e3-9778-8d27a2e44588 | Inventory scheduled sync              | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
d26404f6-b036-4e9d-9880-4d17142cf91d | Inventory scheduled sync              | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
d923533b-7f5a-4d81-bf6a-0894c14f19b5 | Inventory scheduled sync              | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
e9e92d8a-4913-4959-bc34-a06f25a308c3 | Inventory scheduled sync              | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
a335333a-d050-4e2f-8f69-0c78b766987c | Pulp disk space notification          | scheduled | pending |            |          | 00:00:00 |               |            
fa6637f8-cabe-484d-b35e-7281558cbf32 | Subscription expiration notification  | scheduled | pending |            |          | 00:00:00 |               |            
92a63948-4a39-4b4d-ad39-4ec920b68ef0 | Subscription Manifest validity check  | scheduled | pending |            |          | 00:00:00 |               |            
-------------------------------------|---------------------------------------|-----------|---------|------------|----------|----------|---------------|------------
hammer>

A brief checking of dynflow_delayed_plans shows all of them are planned to the very first midnight - so all e.g. "Inventory scheduled sync" are identical copies. Not sure if/what harm it is or how the repetitive tasks will respawn after the midnight.


Version-Release number of selected component (if applicable):
Sat 7.0 snap 9


How reproducible:
100%


Steps to Reproduce:
1. Fresh install of Sat7.0 on either RHEL7 or RHEL8
2. hammer task list --organization-id 1 --search 'state = scheduled"


Actual results:
Multiple instances of same scheduled task type.


Expected results:
Just one instance of each type.


Additional info:

Comment 1 Pavel Moravec 2022-02-13 08:43:29 UTC
.. and some of the duplicated instances failed, e.g.:

ForemanInventoryUpload::Async::GenerateAllReportsJob : one task succeeded, second failed with :

5: ForemanInventoryUpload::Async::QueueForUploadJob

 Error:

Errno::ENOENT

No such file or directory @ rb_file_s_rename - (/var/lib/foreman/red_hat_inventory/generated_reports/report_for_1.tar.xz, /var/lib/foreman/red_hat_inventory/uploads/report_for_1.tar.xz) 

(as the concurrent task deleted the file, I expect)

Comment 6 Pavel Moravec 2022-05-17 07:30:52 UTC
I can confirm that the current snap (satellite-6.11.0-0.11.beta / tfm-rubygem-foreman_rh_cloud-5.0.35-1) does not exhibit the issue:


# hammer task list --organization-id 1 --search 'state = scheduled'
-------------------------------------|---------------------------------------|-----------|---------|------------|----------|----------|---------------|------------
ID                                   | ACTION                                | STATE     | RESULT  | STARTED AT | ENDED AT | DURATION | OWNER         | TASK ERRORS
-------------------------------------|---------------------------------------|-----------|---------|------------|----------|----------|---------------|------------
02d8f220-3983-43a4-a435-6267fb6ca3bb | Generate all reports job              | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
1dfda996-d12e-4c08-aa39-df46159562d0 | Insights scheduled sync               | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
217f98d1-8ef5-48f3-a509-1964f9fe459e | Pulp disk space notification          | scheduled | pending |            |          | 00:00:00 |               |            
35d38c3d-0d07-4e9a-9684-edb71610bcaa | Subscription Manifest validity check  | scheduled | pending |            |          | 00:00:00 |               |            
4be553bf-7a09-4f7c-aacb-b77ce502543b | Clean up StoredValues                 | scheduled | pending |            |          | 00:00:00 |               |            
a37f437f-dd1d-413a-8385-e9fcec41f35a | Insights client status aging          | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
c3f5261a-fb56-499c-8043-f46bb65178e3 | Subscription expiration notification  | scheduled | pending |            |          | 00:00:00 |               |            
e67ecb0d-a2c9-4788-a28b-f8fe7f41572b | Inventory scheduled sync              | scheduled | pending |            |          | 00:00:00 | foreman_admin |            
ee1f99c0-aa61-4c7c-b631-4c8f34d46e7c | Create RSS notifications              | scheduled | pending |            |          | 00:00:00 |               |            
-------------------------------------|---------------------------------------|-----------|---------|------------|----------|----------|---------------|------------
#

Comment 10 errata-xmlrpc 2022-07-05 14:33:11 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 (Moderate: Satellite 6.11 Release), 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-2022:5498


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