smalenfant opened a new issue, #8062:
URL: https://github.com/apache/trafficcontrol/issues/8062
<!--
## This Improvement request (usability, performance, tech debt, etc.)
affects these Traffic Control components:
- Traffic Control Cache Config (`t3c`, formerly ORT)
- Traffic Control Health Client (tc-health-client)
- Traffic Monitor
- Traffic Ops
- Traffic Portal
- Traffic Router
- Traffic Stats
- Grove
## Current behavior:
As we are upgrading OS from Centos 7 to Rocky Linux 9, we hit the issue
where all the components are using SystemV and not Systemd. It is possible "but
not default" to install initscripts on these servers but I'm seeing improper
use of systemd in the build spec of some of the components.
For example, traffic_ops is using init.d (like all of the components) but it
uses systemctl to stop services (instead of service). This means we are already
using a mix of both which doesn't work. Traffic Ops can be installed, but can't
be removed cleanly due to failing script:
```
Running transaction
Preparing :
Running scriptlet: traffic_ops-6.1.0-11828.224f98d0.el9.x86_64
Failed to
stop traffic_ops.service: Unit traffic_ops.service not loaded.
error: %preun(traffic_ops-6.1.0-11828.224f98d0.el9.x86_64) scriptlet failed,
exit status 5
```
To uninstall, those scripts needs to be bypassed:
```
yum remove --setopt=tsflags=noscripts traffic_ops
```
Furthermore, `initscripts` installs fails if there is a file in /etc/init.d
directory. That means that you need to install initscripts before installing
traffic_ops.
## New behavior:
We should support both SystemV and Systemd during the install.
If not, we could possibly change the RPM requirements to add initscripts. If
we do that, we also need to check if the current service is using systemd and
need to issue a `systemctl daemon-reload` during the install. If not done, you
can't start/stop services as it doesn't detect the new /etc/init.d scripts.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]