Bug 2226980

Summary: systemctl's '--full' option does not work with '--user' option.
Product: Red Hat Enterprise Linux 9 Reporter: Flos Qi Guo <qguo>
Component: systemdAssignee: David Tardon <dtardon>
Status: CLOSED ERRATA QA Contact: Frantisek Sumsal <fsumsal>
Severity: high Docs Contact:
Priority: high    
Version: 9.2CC: dtardon, jamacku, systemd-maint
Target Milestone: rcKeywords: Bugfix, Reproducer, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: systemd-252-18.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-07 08:54:09 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 Flos Qi Guo 2023-07-27 09:21:10 UTC
> Description of problem:
The command "systemctl --user is-enabled <service> -l" does not show the user's service in the installation targets.

> Version-Release number of selected component (if applicable):
systemd-252-14.3 and also the latest systemd-252-16 in CentOS Stream.

> How reproducible:
Always.

> Steps to Reproduce:
1. Fresh install an RHEL9.2
2. Create a test user
3. Create a test service for the test user.
----------------8< ----------------8< ----------------8< ----------------
$ mkdir -p ~/.config/systemd/user

$ cat > ~/.config/systemd/user/test.service <<EOF
[Unit]
Description=Test

[Service]
ExecStart=/bin/sleep infinity

[Install]
WantedBy=default.target
EOF

$ systemctl --user daemon-reload

$ systemctl --user start test.service

$ systemctl --user enable test.service

$ systemctl --user is-enabled test.service -l
----------------8< ----------------8< ----------------8< ----------------

> Actual results:
enabled
Failed to get unit file links for test.service: No such file or directory

> Expected results:
enabled
  /home/testuser/.config/systemd/user/default.target.wants/test.service

> Additional info:
At least upstream has fixed this issue by:
 - https://github.com/systemd/systemd/commit/4870133bfaaf97189a970a29bf47e0e38fa721aa

Comment 2 Plumber Bot 2023-08-22 10:32:58 UTC
fix merged to github main branch -> https://github.com/redhat-plumbers/systemd-rhel9/pull/187

Comment 7 errata-xmlrpc 2023-11-07 08:54:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (systemd bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:6640