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 2255969

Summary: Disabling Recurring Logic removes "Next occurrence" date/time from WebUI but hammer and API still shows the date/time
Product: Red Hat Satellite Reporter: Omkar <onerleka>
Component: Tasks PluginAssignee: Adam Ruzicka <aruzicka>
Status: CLOSED ERRATA QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.15.0CC: ahumbe, aruzicka, rlavi, zhunting
Target Milestone: 6.15.0Keywords: Triaged, UserExperience
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-foreman-tasks-9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-04-23 17:16:42 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:

Description Omkar 2023-12-27 12:15:51 UTC
Description of problem:

Disabling Recurring Logic removes "Next occurrence" date/time from WebUI but hammer and API still shows the date/time

Version-Release number of selected component (if applicable):

6.15.0

How reproducible:

100%

Steps to Reproduce:
1. Go to Satellite WebUI --> Monitor --> Recurring Logics
2. Click on "Disable" button for any recurring logic

Actual results:

It removes "Next occurrence" date/time from Satellite WebUI but using hammer command and API query it still reflects "Next Occurrence"

Expected results:

After disabling the Recurring logic it should also remove the date/time in the output of hammer command and API query

Additional info:

In case customer is using hammer or API then this can lead to confusions even if the Recurring Logic is disabled

Comment 1 Lukáš Hellebrandt 2024-01-31 13:34:18 UTC
Verified with Sat 6.15.0 snap 8.0.

Hammer now shows empty space and API shows null for next occurence.

# hammer recurring-logic list
---|-----------|------------|-----------------------------------|---------------------|---------------------|-----------|-----------------|----------|----------|--------
ID | CRON LINE | TASK COUNT | ACTION                            | LAST OCCURRENCE     | NEXT OCCURRENCE     | ITERATION | ITERATION LIMIT | END TIME | STATE    | PURPOSE
---|-----------|------------|-----------------------------------|---------------------|---------------------|-----------|-----------------|----------|----------|--------
12 | 0 0 * * * | 2          | Wait and Insights scheduled sync  | 2024/01/31 10:22:23 | 2024/02/01 00:00:00 | 2         |                 |          | active   |        
1  | 0 0 * * * | 2          | Check for long running tasks      | 2024/01/31 10:22:23 | 2024/02/01 00:00:00 | 2         |                 |          | active   |        
10 | 0 0 * * * | 2          | Wait and Generate all reports job | 2024/01/31 10:22:23 | 2024/02/01 00:00:00 | 2         |                 |          | active   |        
13 | 0 0 * * * | 2          | Insights client status aging      | 2024/01/31 10:22:23 | 2024/02/01 00:00:00 | 2         |                 |          | active   |        
11 | 0 0 * * * | 2          | Wait and Inventory scheduled sync | 2024/01/31 10:22:23 |                     | 2         |                 |          | disabled |        
---|-----------|------------|-----------------------------------|---------------------|---------------------|-----------|-----------------|----------|----------|--------
# hammer recurring-logic info --id 11
ID:              11
Cron line:       0 0 * * *
Action:          Wait and Inventory scheduled sync
Last occurrence: 2024-01-31 10:22:23 UTC
Next occurrence: -
Task count:      2
Action:          Wait and Inventory scheduled sync
Last occurrence: 2024/01/31 10:22:23
Next occurrence: 
Iteration:       2
Iteration limit: Unlimited
Iteration limit: 
Repeat until:    Unlimited
State:           disabled
Purpose:

# hammer recurring-logic info --id 13
ID:              13
Cron line:       0 0 * * *
Action:          Insights client status aging
Last occurrence: 2024-01-31 10:22:23 UTC
Next occurrence: 2024-02-01 00:00:00 UTC
Task count:      2
Action:          Insights client status aging
Last occurrence: 2024/01/31 10:22:23
Next occurrence: 2024/02/01 00:00:00
Iteration:       2
Iteration limit: Unlimited
Iteration limit: 
Repeat until:    Unlimited
State:           active
Purpose:

# curl -k -uadmin:changeme -X GET https://$(hostname)/foreman_tasks/api/recurring_logics
{
  "total": 5,
  "subtotal": 5,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [{"id":12,"cron_line":"0 0 * * *","end_time":null,"iteration":2,"task_group_id":12,"state":"active","max_iteration":null,"purpose":null,"task_count":2,"action":"Wait and Insights scheduled sync","last_occurence":"2024-01-31 10:22:23 UTC","next_occurence":"2024-02-01 00:00:00 UTC"},{"id":1,"cron_line":"0 0 * * *","end_time":null,"iteration":2,"task_group_id":1,"state":"active","max_iteration":null,"purpose":null,"task_count":2,"action":"Check for long running tasks","last_occurence":"2024-01-31 10:22:23 UTC","next_occurence":"2024-02-01 00:00:00 UTC"},{"id":10,"cron_line":"0 0 * * *","end_time":null,"iteration":2,"task_group_id":10,"state":"active","max_iteration":null,"purpose":null,"task_count":2,"action":"Wait and Generate all reports job","last_occurence":"2024-01-31 10:22:23 UTC","next_occurence":"2024-02-01 00:00:00 UTC"},{"id":13,"cron_line":"0 0 * * *","end_time":null,"iteration":2,"task_group_id":13,"state":"active","max_iteration":null,"purpose":null,"task_count":2,"action":"Insights client status aging","last_occurence":"2024-01-31 10:22:23 UTC","next_occurence":"2024-02-01 00:00:00 UTC"},{"id":11,"cron_line":"0 0 * * *","end_time":null,"iteration":2,"task_group_id":11,"state":"disabled","max_iteration":null,"purpose":null,"task_count":2,"action":"Wait and Inventory scheduled sync","last_occurence":"2024-01-31 10:22:23 UTC","next_occurence":null}]
}

# curl -k -uadmin:changeme -X GET https://$(hostname)/foreman_tasks/api/recurring_logics/11
{"id":11,"cron_line":"0 0 * * *","end_time":null,"iteration":2,"task_group_id":11,"state":"disabled","max_iteration":null,"purpose":null,"task_count":2,"action":"Wait and Inventory scheduled sync","last_occurence":"2024-01-31 10:22:23 UTC","next_occurence":null,"tasks":[{"id":"eeee7183-3233-48e9-a8ee-d70f0a4ca605","label":"InventorySync::Async::InventoryScheduledSync","pending":false,"action":"Wait and Inventory scheduled sync","username":"foreman_admin","started_at":"2024-01-31 10:22:23 UTC","ended_at":"2024-01-31 11:41:39 UTC","state":"stopped","result":"success","progress":1.0,"input":{"current_request_id":null,"current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":1},"output":{},"humanized":{"action":"Wait and Inventory scheduled sync","input":[],"output":"","errors":[]},"cli_example":null,"start_at":"2024-01-25 00:00:00 UTC","available_actions":{"cancellable":false,"resumable":false}},{"id":"cf10f351-e8dc-47cd-9722-673a017a5aaf","label":"InventorySync::Async::InventoryScheduledSync","pending":true,"action":"Wait and Inventory scheduled sync","username":"foreman_admin","started_at":null,"ended_at":null,"state":"scheduled","result":"pending","progress":0,"input":{"current_request_id":"7e4007ea-b48a-4f80-8f6c-cd2c219fbfb1","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":1},"output":{},"humanized":{"action":"Wait and Inventory scheduled sync","input":null,"output":null,"errors":null},"cli_example":null,"start_at":"2024-02-01 00:00:00 UTC","available_actions":{"cancellable":true,"resumable":false}}]}

# curl -k -uadmin:changeme -X GET https://$(hostname)/foreman_tasks/api/recurring_logics/13
{"id":13,"cron_line":"0 0 * * *","end_time":null,"iteration":2,"task_group_id":13,"state":"active","max_iteration":null,"purpose":null,"task_count":2,"action":"Insights client status aging","last_occurence":"2024-01-31 10:22:23 UTC","next_occurence":"2024-02-01 00:00:00 UTC","tasks":[{"id":"e8d0db6a-6eda-4fe8-9efc-bc712327a785","label":"InsightsCloud::Async::InsightsClientStatusAging","pending":false,"action":"Insights client status aging","username":"foreman_admin","started_at":"2024-01-31 10:22:23 UTC","ended_at":"2024-01-31 10:22:24 UTC","state":"stopped","result":"success","progress":1.0,"input":{"current_request_id":null,"current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":1},"output":{},"humanized":{"action":"Insights client status aging","input":[],"output":"","errors":[]},"cli_example":null,"start_at":"2024-01-25 00:00:00 UTC","available_actions":{"cancellable":false,"resumable":false}},{"id":"58271c73-c1c9-4215-b4d3-4ac9b1dee424","label":"InsightsCloud::Async::InsightsClientStatusAging","pending":true,"action":"Insights client status aging","username":"foreman_admin","started_at":null,"ended_at":null,"state":"scheduled","result":"pending","progress":0,"input":{"current_request_id":"e2e4bb3c-ba32-4af0-af72-3a17e29f761e","current_timezone":"UTC","current_organization_id":null,"current_location_id":null,"current_user_id":1},"output":{},"humanized":{"action":"Insights client status aging","input":null,"output":null,"errors":null},"cli_example":null,"start_at":"2024-02-01 00:00:00 UTC","available_actions":{"cancellable":true,"resumable":false}}]}

Comment 4 errata-xmlrpc 2024-04-23 17:16:42 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 (Important: Satellite 6.15.0 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-2024:2010