Bug 2216790

Summary: rbldnsctl creates broken systemd units
Product: [Fedora] Fedora EPEL Reporter: Paul Arthur <junk+redhat>
Component: rbldnsdAssignee: Paul Howarth <paul>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: epel9CC: paul
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rbldnsd-0.998b-11.fc39 rbldnsd-0.998b-11.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-23 10:36:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Paul Arthur 2023-06-22 15:08:18 UTC
Description of problem:
The systemd units created by rbldnsctl use the `.include` directive, which was deprecated in 2014, started generating warnings in 2018 (https://github.com/systemd/systemd/commit/41b283d0f1f4abd85d0bbeeb7f71bb30f87cfab9) and was removed completely in systemd v246 (https://github.com/systemd/systemd/commit/7ade8982ca1969e251a29589ae918c3b5c595afb).

Because the .include has no effect on modern version of systemd these units have no installation config and cannot be enabled using systemctl.

Version-Release number of selected component (if applicable):


How reproducible:
Always.

Steps to Reproduce:
1. echo 'RBLDNSD="- -q"' > /etc/sysconfig/rbldnsd
2. rbldnsctl create
3. systemctl enable rbldnsd-single.service

Actual results:
systemctl does not enable the service and outputs:

The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled or disabled using systemctl.

Possible reasons for having this kind of units are:
• A unit may be statically enabled by being symlinked from another unit's
  .wants/ or .requires/ directory.
• A unit's purpose may be to act as a helper for some other unit which has
  a requirement dependency on it.
• A unit may be started when needed via activation (socket, path, timer,
  D-Bus, udev, scripted systemctl call, ...).
• In case of template units, the unit is meant to be enabled with some
  instance name specified.

Expected results:
Created symlink /etc/systemd/system/multi-user.target.wants/rbldnsd-single.service → /etc/systemd/system/rbldnsd-single.service.

Additional info:
This package should probably use a template unit (https://fedoramagazine.org/systemd-template-unit-files/) to support multiple instances, instead of a custom script that manages individual service units.

Comment 1 Paul Howarth 2023-06-22 15:20:04 UTC
As you can probably tell, I stopped using rbldnsd myself quite some time ago. I can take a look at it myself but a patch or pull request could speed things up.

Comment 2 Paul Howarth 2023-06-23 10:10:25 UTC
The standard way that rbldnsd is configured (in /etc/sysconfig/rbldnsd) provides for having lots of arbitrary arguments being passed to each rbldnsd instance, which doesn't really map well to template units. What I'll do instead is tweak rbldnsctl not to use the ".include" syntax and just pull in the contents of /etc/systemd/rbldnsd.conf when "rbldnsctl create" is run.

Comment 3 Fedora Update System 2023-06-23 10:34:06 UTC
FEDORA-2023-99dc99c7ba has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-99dc99c7ba

Comment 4 Fedora Update System 2023-06-23 10:36:06 UTC
FEDORA-2023-99dc99c7ba has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Fedora Update System 2023-06-23 10:49:50 UTC
FEDORA-EPEL-2023-284551283c has been submitted as an update to Fedora EPEL 9. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-284551283c

Comment 6 Paul Howarth 2023-06-23 10:52:24 UTC
Please give the update a try and let me know how you get on. It works for me in my own limited testing. If it works for you too, I'll do updates for EPEL-8 and the stable Fedora releases.

Comment 7 Fedora Update System 2023-06-24 01:50:54 UTC
FEDORA-EPEL-2023-284551283c has been pushed to the Fedora EPEL 9 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-284551283c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2023-07-02 00:36:00 UTC
FEDORA-EPEL-2023-284551283c has been pushed to the Fedora EPEL 9 stable repository.
If problem still persists, please make note of it in this bug report.