Please see these two PR's for what lead to this issue:
The problem is that #2155 makes two errors:
- The change to Makefile.am adds
systemd_file="$(top_srcdir)/build-aux/rpm/systemd/opentsdb.service" ; \ but the systemd_file variable is immediately overwritten by the next line which contains: systemd_file="$(top_srcdir)/build-aux/rpm/systemd/opentsdb@.service" ; \. This variable is then used by the next two lines and only the opentsdb@.service file is installed. It looks like the echo and install lines need to also be added for the opentsdb.service file.
- The change to the opentsdb.spec.in file is missing the opentsdb.service file in the %files section. This results in the file not existing in the RPM and the scriptlet to attempt to link against a missing file.
Interestingly in RHEL 8 (actually I'm using AlmaLinux 8), this doesn't really cause much of an issue. Systemd seems to fallback to using a wrapper around the sysv init.d script in some way. However, in RHEL 9 (again I'm actually using AlmaLinux 9), the opentsdb systemd service shows as bad and there is no way that I have found to get it to use the sysv init.d script.
Please see these two PR's for what lead to this issue:
systemctl enable opentsdb@4242. Apparently this isn't documented very well and users unfamiliar with parameterized services may not know how to utilize this unit file so the next PR was added.The problem is that #2155 makes two errors:
systemd_file="$(top_srcdir)/build-aux/rpm/systemd/opentsdb.service" ; \but the systemd_file variable is immediately overwritten by the next line which contains:systemd_file="$(top_srcdir)/build-aux/rpm/systemd/opentsdb@.service" ; \. This variable is then used by the next two lines and only the opentsdb@.service file is installed. It looks like the echo and install lines need to also be added for the opentsdb.service file.Interestingly in RHEL 8 (actually I'm using AlmaLinux 8), this doesn't really cause much of an issue. Systemd seems to fallback to using a wrapper around the sysv init.d script in some way. However, in RHEL 9 (again I'm actually using AlmaLinux 9), the opentsdb systemd service shows as bad and there is no way that I have found to get it to use the sysv init.d script.