Bug 789245

Summary: systemctl -all list-units reports load errors for wanted and conflicting "ghost" services
Product: [Fedora] Fedora Reporter: Alexander Murashkin <alexandermurashkin>
Component: systemdAssignee: systemd-maint
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 16CC: johannbg, lpoetter, metherid, notting, plautrba, systemd-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-10 20:53:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Alexander Murashkin 2012-02-10 07:39:50 UTC
Description of problem:

systemctl -all list-units reports load errors for non-installed services when the services are mentioned in some other places as wanted or conflicting. It happens, for example, for services in  

- Should-Start and Should-Stop lines of /etc/rc.d/init.d scripts
- Conflicts= lines in systemd unit configuration files

$ grep Should /etc/rc.d/init.d/libvirtd
# Should-Start: $named
# Should-Start: xend
# Should-Start: hal
# Should-Start: avahi-daemon
# Should-Stop: $named

$ grep postfix /lib/systemd/system/sm-client.service
Conflicts=postfix.service exim.service

$ systemctl --all list-units 
...
xend.service   error  inactive dead   xend.service
exim.service   error  inactive dead   exim.service
...

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

systemd-37-11.fc16.x86_64
libvirt-0.9.6-4.fc16.x86_64
sendmail-8.14.5-11.fc16.x86_64

How reproducible:

Steps to Reproduce:
1. Install libvirt-0.9.6-4.fc16.x86_64 and sendmail-8.14.5-11.fc16.x86_64
2. Do not install xen and exim packages, remove them if installed
3. systemctl --all list-units | egrep 'xen|exim'
  
Actual results:

systemctl --all list-units reports xen.service load error

xend.service   error  inactive dead   xend.service
exim.service   error  inactive dead   exim.service

Expected results:

Something different, for example

xend.service   missing  inactive dead   xend.service
exim.service   missing  inactive dead   exim.service

or completely empty output

Additional info:

Systemd shall report load problems differently depending on

- if the unit in question is required, wanted, conflicting, etc
- whether the unit is installed at all

Comment 1 Lennart Poettering 2012-02-10 20:53:45 UTC
Well, normally systemd won't show you these units which couldn't be loaded. But with "--all" you ask for them to be shown. So what you are describing is expected behaviour not a problem.