[RFC] Convert Katello Sync Plans to use Foreman-Tasks

Sync Plans Foreman-tasks conversion

Motivations:

  • PulpV3 will not support sync plans
  • Current pulp-driven sync plans are problematic and difficult to debug

Proposal:

  • Maintain api/cli compatibility
  • Translate interval + time into cron-syntax at the model level, converting to system timezone. Create and update a recurring logic for each sync plan.
  • Store recurring logic id on each sync plan.
  • Enabled/disable:
  • Add support for enabling or disabling a recurring logic
  • Provide new interval in addition to ‘hourly, weekly’ called ‘cron entry’ and provide a cron field for direct entering.
  • Plan out and design combined recurring logic UI, that would eventually replace the sync plans UI

Upgrade Migration:

  • Remove all schedules from pulp
  • Create recurring logics in foreman-tasks

Tasks:

Possible Future Enhancements

  • Concurrent Repo-sync limit
  • Repository schedules (instead of or in addition to product schedules)

Is this required by this RFC or a re-factoring that you are proposing be baked into this work?

Will cron be the only UI option or will I be able to use UI widgets to select elements of the schedule?

Fair to assume “sync now” will continue to work for sync plans?

Is this required by this RFC or a re-factoring that you are proposing be baked into this work?

This RFC will require an upgrade rake task, and i’ve made it my mission to not add any more upgrade rake tasks to the installer (and @ekohl will kill me if i try). So call it ‘refactoring that i am proposing be baked into this work’.

Expose direct cron syntax to users in api/cli/ui.
The user could still select ‘daily’, weekly, monthly, but could also choose a custom cron syntax.

Fair to assume “sync now” will continue to work for sync plans?
Correct