Fixed
Details
Assignee
Benjamin ReedBenjamin ReedReporter
Ubence QuevedoUbence QuevedoHB Grooming Date
Apr 18, 2023HB Backlog Status
Refined BacklogComponents
Sprint
NoneFix versions
Affects versions
Priority
High
Details
Details
Assignee
Benjamin Reed
Benjamin ReedReporter
Ubence Quevedo
Ubence QuevedoHB Grooming Date
Apr 18, 2023
HB Backlog Status
Refined Backlog
Components
Sprint
None
Fix versions
Affects versions
Priority
PagerDuty
PagerDuty
PagerDuty
Created April 18, 2023 at 6:38 PM
Updated June 15, 2023 at 3:48 PM
Resolved June 15, 2023 at 3:48 PM
When upgrading from Sentinel 31.0.4 to Sentinel 31.0.6, the sentinel.service file isn’t updated and tries to start the service from
/etc/init.d/sentinel
, but the file no longer exists there but rather at/opt/sentinel/bin/sentinel
.Doing a clean install of Sentinel 31.0.6 also does not generate an appropriate service file that points to
/opt/sentinel/bin/sentinel
.My testing was done with RHEL9, but this likely affects all other RHEL based distros. Debian/Ubuntu seem to be properly configured,
Further detail from testing on RHEL9:
On a test system, I did an install of Sentinel 31.0.4 and then upgraded it to 31.0.6 and here are my findings.
The
/etc/init.d/sentinel
script exists:/etc/init.d ├── /etc/init.d/README └── /etc/init.d/sentinel 0 directories, 2 files
The Sentinel service references
/etc/init.d/sentinel
and is being run from there:# /usr/lib/systemd/system/sentinel.service [Unit] Description=The OpenNMS Sentinel distributed client. Requires=network.target network-online.target After=network.target network-online.target [Service] User=sentinel EnvironmentFile=-/opt/sentinel/etc/sentinel PIDFile=/opt/sentinel/data/log/sentinel.pid Type=forking ExecStart=/etc/init.d/sentinel start ExecStop=/etc/init.d/sentinel stop AmbientCapabilities=CAP_NET_RAW CAP_NET_BIND_SERVICE [Install] WantedBy=multi-user.target
There is no
/opt/sentinel/bin/sentinel
file:[root@rhel9h ~]# ls -la /opt/sentinel/bin/sentinel ls: cannot access '/opt/sentinel/bin/sentinel': No such file or directory
With Sentinel 31.0.6, the
/etc/init.d/sentinel
file does not exist:[root@rhel9h ~]# tree -f /etc/init.d /etc/init.d └── /etc/init.d/README 0 directories, 1 file
The Sentinel service still references
/etc/init.d/sentinel
, but that file doesn't exist:[root@rhel9h ~]# systemctl cat sentinel # /usr/lib/systemd/system/sentinel.service [Unit] Description=The OpenNMS Sentinel distributed client. Requires=network.target network-online.target After=network.target network-online.target [Service] User=sentinel EnvironmentFile=-/opt/sentinel/etc/sentinel PIDFile=/opt/sentinel/data/log/sentinel.pid Type=forking ExecStart=/etc/init.d/sentinel start ExecStop=/etc/init.d/sentinel stop AmbientCapabilities=CAP_NET_RAW CAP_NET_BIND_SERVICE [Install] WantedBy=multi-user.target
The Sentinel executable does exist at
/opt/sentinel/bin/sentinel
:[root@rhel9h ~]# ls -la /opt/sentinel/bin/sentinel -rwxr-xr-x. 1 sentinel sentinel 5629 Apr 11 16:51 /opt/sentinel/bin/sentinel
The user would either need to modify the service file to point to
/opt/sentinel/bin/sentinel
or copy/make a symbolic link of that file to be at/etc/init.d/sentinel
.The service file should ultimately be updated to point to
/opt/sentinel/bin/sentinel
similar to how other service file units work to more natively work with systemd.