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: POST --- QA Contact: Frantisek Sumsal <fsumsal>
Severity: high Docs Contact:
Priority: high    
Version: 9.2CC: dtardon, systemd-maint
Target Milestone: rcKeywords: Bugfix, Reproducer, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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