Bug 2226980 - systemctl's '--full' option does not work with '--user' option.
Summary: systemctl's '--full' option does not work with '--user' option.
Keywords:
Status: POST
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: systemd
Version: 9.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: David Tardon
QA Contact: Frantisek Sumsal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-27 09:21 UTC by Flos Qi Guo
Modified: 2023-08-03 13:37 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github redhat-plumbers systemd-rhel9 pull 187 0 None open (#2226980) core: use correct scope of looking up units 2023-08-03 13:37:39 UTC
Github systemd systemd pull 25659 0 None Merged core: use correct scope of looking up units 2023-08-03 13:18:57 UTC
Red Hat Issue Tracker RHELPLAN-163662 0 None None None 2023-07-27 09:22:22 UTC

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


Note You need to log in before you can comment on or make changes to this bug.