Skip to content

Upgrade kardianos service

Arran Walker requested to merge ajwalker/upgrade-kardianos-service into master

What does this MR do?

Upgrades kardianos/service library to be upstream version.

The config options have been modified to maintain backwards compatibility, without having to modify the library itself.

I currently have an MR open for additional Windows support. Hopefully this will be merged, if not, we should maybe fork again but with the latest upstream version (thus this MR would still be relevant).

This MR is split into two commits: The compatibility changes and the dependency updates.

Why was this MR needed?

We'd massively fallen behind on updates, and features that we previously needed are now upstream.

The remaining noticible differences:

  • systemd script previously hard-coded dependencies, so we now have to provide those. It also hard-coded "Restart: always", which we now configure the same via the option.
  • Upstart used console log, whereas it now uses console none, with the option to log by setting the LogOutput option. I don’t think we need to worry about this, as upstart generally isn’t used anymore. Ubuntu moved away in 15.04, RedHat moved away in RHEL 7. openSUSE in 12.1 etc.
  • We apparently only supported sysv for Debian and Redhat. I’ve no idea whether this is relevant anymore, and I’m too worried to change the script, so here we just use the previous detection functions (used to determine what kind of systemw e're on)and scripts, but support systems that might otherwise have been supported by not throwing an error if Redhat/Debian locations are not detected.

What's the best way to test this MR?

  • It's worth comparing the changes between the ayufan version and kardianos. The largest difference (other than additional features in upstream), was the sysv scripts, which we've kept here to ensure compatibility.

  • Testing is basically manual. Unfortunetly, this library itself provides very few unit/integration tests (probably due to what it is, more than anything), but it is used by many users, so I suspect it's well tested in that sense. Other than the sysv scripts (that we're keeping the same), not much has changed with newer versions, so I think we're reasonably safe to upgrade.

What are the relevant issue numbers?

closes #27757 (closed)

Edited by Arran Walker

Merge request reports