Katello-backup/restore/service deprecation

Katello-backup/restore/service scripts are all moving to foreman-maintain (as discussed in previous threads) and the development is wrapping up with the last two PRs getting close to merging (backup and restore).

This brings up the question of how are we going to handle deprecating the existing backup/restore/service scripts?

My thought is to add deprecation warnings to the existing katello-backup/restore scripts in katello 3.7 since they were included in 3.7 branching. This means we would need to add foreman-maintain as a dependency to katello 3.7, since the new functionality is there. Then the old scripts can be removed in katello 3.8.

I’m curious to hear thoughts on this, I know many people use katello-backup/restore and would like to handle the removal gracefully.

Backup/restore i have less concerns about, but katello-service is widely
documented and used.

I would be in favor of shipping a wrapper script (katello-service) that
runs the appropriate foreman-maintain command.


@Justin_Sherrill I think we can do that for service, its will be very hard to with katello-backup since the structure changed to use subcommands.

How long are you thinking of keeping the redirect for katello-service?

A couple of releases, possibly printing out a giant deprecation warning
in the process?


@Justin_Sherrill How does this schedule sound?

  • Katello-backup - deprecate in 3.7, remove in 3.8
  • Katello-restore - deprecate in 3.7, remove in 3.8
  • Katello-service - remove and add redirect in 3.7 and 3.8, remove completely in 3.9 (or equivalent release)
1 Like

I mostly wonder if katello-service could be replaced by pure systemctl. I suspect most of our scripts can use systemctl leaving katello-service as a tool for users.

There are cases where I highly doubt if it’s needed. One example is our puppet upgrade hook in the installer. Here we stop all services while just stopping puppet and puppetserver is probably enough. systemctl can do that just fine. Another is katello-service start --only postgresql in our regular upgrade hook where systemctl start postgresql should be fine.

The two benefits of katello-service (and foreman-mantain service) is using the service-wait script and ordering the service starting/stopping order. If these aren’t needed, then I don’t see an issue with using systemctl. I think its a case-by-case thing.

We’ve dropped service_wait from katello-installer.


There is also a PR to remove service-wait from packaging:


1 Like