Bug 1343132 - Dangling symlink /etc/systemd/system/syslog.service
Summary: Dangling symlink /etc/systemd/system/syslog.service
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rsyslog
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jiří Vymazal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-06 15:12 UTC by Jan Pazdziora
Modified: 2017-02-09 04:20 UTC (History)
15 users (show)

Fixed In Version: rsyslog-8.24.0-1.fc25 rsyslog-8.24.0-2.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-02-09 04:20:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
proposed patch (436 bytes, patch)
2017-01-13 09:27 UTC, Jiří Vymazal
no flags Details | Diff
proposed patch (440 bytes, patch)
2017-01-16 10:44 UTC, Jiří Vymazal
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1055421 1 None None None 2021-01-20 06:05:38 UTC

Internal Links: 1055421

Description Jan Pazdziora 2016-06-06 15:12:52 UTC
Description of problem:

The Docker image fedora:23 contains symlink /etc/systemd/system/syslog.service which points to /usr/lib/systemd/system/rsyslog.service which does not exist. 

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

fedora:23
fedora:rawhide

How reproducible:

Deterministic.

Steps to Reproduce:
1. $ docker run --rm -ti fedora:23 ls -la /etc/systemd/system/syslog.service /usr/lib/systemd/system/rsyslog.service

Actual results:

ls: cannot access /usr/lib/systemd/system/rsyslog.service: No such file or directory
lrwxrwxrwx. 1 root root 39 Mar  4 05:18 /etc/systemd/system/syslog.service -> /usr/lib/systemd/system/rsyslog.service

Expected results:

No dangling symlink.

Additional info:

Dangling symlinks are not nice and they have the potential to confuse things when systemd in containers is used.  Probably just remove /etc/systemd/system/syslog.service, or point it to some better target.

This is a copy of https://fedorahosted.org/spin-kickstarts/ticket/60.

Comment 1 Kevin Fenzi 2016-06-06 22:01:28 UTC
Well, it would be good to find out what makes this file and make it stop doing so, but I am not sure what that is. ;( 

Does it appear on a non container install?

Comment 2 Jan Pazdziora 2016-06-07 06:49:04 UTC
The file exists on non-container Fedora 23 installation. It is not owned by any package.

It seems to come from:

$ rpm -q --scripts systemd | grep -1 syslog

# Stop-gap until rsyslog.rpm does this on its own. (This is supposed
# to fail when the link already exists)
ln -s /usr/lib/systemd/system/rsyslog.service /etc/systemd/system/syslog.service >/dev/null 2>&1 || :

Comment 3 Kevin Fenzi 2016-06-07 20:33:22 UTC
Adding a systemd maintainer here to look at why that rsyslog bit is still there. ;)

Comment 4 Zbigniew Jędrzejewski-Szmek 2016-06-08 01:36:55 UTC
Yeah, I'm not sure why systemd is providing this (it's an alias syslog.service → rsyslog.service). If anything rsyslog should have that. I'd be happy to drop it.

(But note that it shouldn't cause any problems. Systemd doesn't really care where the symlink points).

Comment 5 Zbigniew Jędrzejewski-Szmek 2016-06-08 01:46:54 UTC
Does rsyslog need the syslog.service → rsyslog.service alias? If yes, let's move the symlink to rsyslog. Afterwards, we'll drop it from systemd (should not be an issue to have it in two place temporarily).

Comment 6 Jan Pazdziora 2016-06-08 06:22:52 UTC
If something, the symlink likely should live in /usr and not in /etc because /etc is reserved for admin's local modifications.

Comment 7 Ville Skyttä 2016-06-29 10:09:09 UTC
FWIW, /usr/lib/systemd/system/syslog.socket documents that the "Best way to achieve" this would be to simply uncomment the current ";Alias=syslog.service" in rsyslog.service.

Comment 8 Zbigniew Jędrzejewski-Szmek 2016-06-29 12:13:30 UTC
No, not really. The Alias= setting only works after the unit is loaded. If nothing refers to rsyslog.service, but something wants syslog.service, it will not work. A symlink is better, if all use cases are to be supported.

Comment 10 Fedora End Of Life 2016-11-25 09:13:29 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 11 Jan Pazdziora 2016-11-25 14:13:06 UTC
Issue still present:

# for i in 23 24 25 rawhide ; do echo fedora:$i: ; docker run --rm -ti fedora:$i ls -la /etc/systemd/system/syslog.service /usr/lib/systemd/system/rsyslog.service ; donefedora:23:
ls: cannot access /usr/lib/systemd/system/rsyslog.service: No such file or directory
lrwxrwxrwx. 1 root root 39 Jun 20 05:17 /etc/systemd/system/syslog.service -> /usr/lib/systemd/system/rsyslog.service
fedora:24:
ls: cannot access '/usr/lib/systemd/system/rsyslog.service': No such file or directory
lrwxrwxrwx. 1 root root 39 Aug 15 05:18 /etc/systemd/system/syslog.service -> /usr/lib/systemd/system/rsyslog.service
fedora:25:
ls: cannot access '/usr/lib/systemd/system/rsyslog.service': No such file or directory
lrwxrwxrwx. 1 root root 39 Nov 15 20:04 /etc/systemd/system/syslog.service -> /usr/lib/systemd/system/rsyslog.service
fedora:rawhide:
ls: cannot access '/usr/lib/systemd/system/rsyslog.service': No such file or directory
lrwxrwxrwx. 1 root root 39 Nov  7 11:00 /etc/systemd/system/syslog.service -> /usr/lib/systemd/system/rsyslog.service

Comment 12 Jiří Vymazal 2017-01-13 09:27:31 UTC
Created attachment 1240269 [details]
proposed patch

Comment 13 Jiří Vymazal 2017-01-13 09:29:40 UTC
added a patch do do symlink in rsyslog package, it will be included in rsyslog-8.24.0, therefore you can drop it from systemd after it rolls out

Comment 14 Fedora Update System 2017-01-13 14:05:30 UTC
rsyslog-8.24.0-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-f1200343ac

Comment 15 Jan Pazdziora 2017-01-13 15:16:35 UTC
The patch which adds

ln -s /usr/lib/systemd/system/rsyslog.service /etc/systemd/system/syslog.service >/dev/null 2>&1 || :

breaks requirements per man systemd.unit(5) which says

       │/etc/systemd/system     │ Local configuration │

The symlink IMHO should be

ln -s /usr/lib/systemd/system/rsyslog.service /usr/lib/systemd/system/syslog.service >/dev/null 2>&1 || :

Comment 16 Fedora Update System 2017-01-14 06:21:33 UTC
rsyslog-8.24.0-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-f1200343ac

Comment 17 Jiří Vymazal 2017-01-16 10:44:52 UTC
Created attachment 1241167 [details]
proposed patch

Comment 18 Jiří Vymazal 2017-01-16 10:45:47 UTC
edited proposed patch to conform to systemd doc

Comment 19 Jiří Vymazal 2017-01-16 11:22:22 UTC
After considering https://bugzilla.redhat.com/show_bug.cgi?id=1055421#c2 and systemd syslog doc: https://www.freedesktop.org/wiki/Software/systemd/syslog/ removing proposed patch entirely, leaving this to service alias (enabled in rsyslog 8.24.0)

Comment 20 Fedora Update System 2017-01-16 19:52:02 UTC
rsyslog-8.24.0-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 21 Jiří Vymazal 2017-01-17 14:09:46 UTC
re-opening because symlink removal done in 8.24.0.1-2

Comment 22 Fedora Update System 2017-01-17 14:10:33 UTC
rsyslog-8.24.0-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-83155d0a69

Comment 23 Fedora Update System 2017-01-17 21:51:15 UTC
rsyslog-8.24.0-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-83155d0a69

Comment 24 Fedora Update System 2017-02-09 04:20:23 UTC
rsyslog-8.24.0-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.


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