You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A service file symbolically linked from a directory inside systemd path can be enabled and then gives bad error when started #22000
Linux GreenOne 5.13.0-22-generic #22-Ubuntu SMP Fri Nov 5 13:21:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux Linux kubuntu 5.13.0-19-generic #19-Ubuntu SMP Thu Oct 7 21:58:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
CPU architecture issue was seen on
Intel i9-9880H anbd virtualbox
We create a unit file in home directory and link it to systemd path. It refuses to enable the unit file saying symbolic links are not supported. I am not sure why that is the case but at least the warning is meaningful. Now try to make a unit file in a subdirectory of systemd path (for example /etc/systemd/system/myown.d). It will enable the service file and when you try to run the file, the error is misleading.
I guess the correct behaviour would be catching that systemd is dealing with a linked file already at enabling phase.
I feel that this is still present in systemd 251. Any unit file I symlink is considered "bad" in systemctl list-unit-files.
@volter Did you give the symbolic link the same name as the original file? I found that when those two have different names, systemd reports the state of the unit as bad. Interestingly, even in that case I could start the service, although enabling the service failed. I wonder where this behavior is documented?
I used the systemctl-link command, which I guess gives the same names. In my setup, I resolved the problem by moving the directory containing the units out of /etc/systemd/system. The new issue yuwata requested actually exists: #24605
Activity
felagund commentedon Jan 4, 2022
Not sure if this is not somehow related: #661
yuwata commentedon Jan 5, 2022
Confirmed that v250 still has the issue.
shared/install: reuse the standard symlink verification subroutine
shared/install: reuse the standard symlink verification subroutine
shared/install: reuse the standard symlink verification subroutine
volter commentedon Sep 8, 2022
I feel that this is still present in systemd 251. Any unit file I symlink is considered "bad" in systemctl list-unit-files.
yuwata commentedon Sep 8, 2022
@volter Then, please open a new issue page with debugging logs. Thank you.
barosl commentedon Sep 22, 2022
@volter Did you give the symbolic link the same name as the original file? I found that when those two have different names, systemd reports the state of the unit as
bad. Interestingly, even in that case I could start the service, although enabling the service failed. I wonder where this behavior is documented?volter commentedon Sep 22, 2022
I used the systemctl-link command, which I guess gives the same names. In my setup, I resolved the problem by moving the directory containing the units out of /etc/systemd/system. The new issue yuwata requested actually exists: #24605