Skip to content

Conversation

@archanaserver
Copy link
Contributor

@archanaserver archanaserver commented Nov 27, 2025

Depends on theforeman/foreman#10784

  • Update foreman_recurring_tasks defaults to define 4 generic
    timers:
    • hourly → cron:hourly
    • daily → cron:daily
    • weekly → cron:weekly
    • monthly → cron:monthly
  • Keep ldap:refresh_usergroups as a separate recurring job with
    its existing OnCalendar expression, since it runs every 30
    minutes and does not fit cleanly into the hourly/daily/weekly
    buckets yet.

@archanaserver
Copy link
Contributor Author

Now that Foreman core provides cron:hourly, cron:daily, cron:weekly and cron:monthly rake tasks theforeman/foreman#10784, foremanctl can use those as generic entrypoints for recurring jobs instead of wiring individual rake tasks.

@evgeni
Copy link
Member

evgeni commented Nov 27, 2025

marked as draft, as core patch is not in yet

@archanaserver archanaserver force-pushed the foreman-recurring-jobs branch from 58feb8e to d0abe1e Compare December 3, 2025 10:40
@archanaserver
Copy link
Contributor Author

@evgeni now that #288 is merged, we can look for this one and theforeman/foreman#10784?

@archanaserver archanaserver marked this pull request as ready for review December 3, 2025 10:42
@evgeni
Copy link
Member

evgeni commented Dec 3, 2025

@evgeni now that #288 is merged, we can look for this one and theforeman/foreman#10784?

Yes!

@evgeni
Copy link
Member

evgeni commented Jan 5, 2026

The tests needs to be updated, and we need to wait for theforeman/foreman#10784 to be merged before this can go in.

@archanaserver
Copy link
Contributor Author

The tests needs to be updated, and we need to wait for theforeman/foreman#10784 to be merged before this can go in.

@evgeni which tests you are taking about?

@evgeni
Copy link
Member

evgeni commented Jan 7, 2026

@pytest.mark.parametrize("instance", RECURRING_INSTANCES)
def test_foreman_recurring_timers_enabled_and_running(server, instance):
timer = server.service(f"foreman-recurring@{instance}.timer")
assert timer.is_enabled
assert timer.is_running
@pytest.mark.parametrize("instance", RECURRING_INSTANCES)
def test_foreman_recurring_services_exist(server, instance):
service = server.service(f"foreman-recurring@{instance}.service")
assert service.exists

@archanaserver archanaserver force-pushed the foreman-recurring-jobs branch from d052ec6 to b44e0ee Compare January 8, 2026 06:38
@archanaserver archanaserver force-pushed the foreman-recurring-jobs branch from b44e0ee to 4c9adfb Compare January 8, 2026 06:45
@archanaserver archanaserver requested a review from evgeni January 8, 2026 07:36
@evgeni
Copy link
Member

evgeni commented Jan 8, 2026

Conceptually ACK, this does what it should.

Given the new cron:* rake tasks are 3.18+ only, I'll wait with merging this until we have a 3.17 release of foremanctl branched out.

@evgeni
Copy link
Member

evgeni commented Jan 9, 2026

I've tagged a 1.1.0 as a last 3.16 release and started the 3.17 part here: #368

@ekohl
Copy link
Member

ekohl commented Jan 9, 2026

I think it raises the question how we deal with version support. For now foremanctl has been experimental and we never gave any upgrade guarantees.

When do we start committing to that? Here it would mean to clean up the old tasks (ensuring them as absent) once the version is greater than 3.18.

At the very least this needs to update the compatibility section in README to list Foreman 3.18 as the minimum version.

@evgeni
Copy link
Member

evgeni commented Jan 9, 2026

I think it raises the question how we deal with version support. For now foremanctl has been experimental and we never gave any upgrade guarantees.

And I'd keep it at that for now.

When do we start committing to that? Here it would mean to clean up the old tasks (ensuring them as absent) once the version is greater than 3.18.

At the very least this needs to update the compatibility section in README to list Foreman 3.18 as the minimum version.

Ack, the README will need an update, but that would happen once something like #368 happens anyway for a 3.18-based branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants