Bug 4205 - various services refuse to be disabled
Summary: various services refuse to be disabled
Status: RESOLVED INVALID
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 2120
  Show dependency treegraph
 
Reported: 2012-01-20 14:30 CET by Dick Gevers
Modified: 2012-03-07 16:00 CET (History)
2 users (show)

See Also:
Source RPM: systemd-38-7.mga2
CVE:
Status comment:


Attachments

Description Dick Gevers 2012-01-20 14:30:58 CET
Description of problem:
Have a working systemd machine.

'systemctl list-unts' sees various services active that one wants disabled:

# systemctl stop fedora-storage-init-late.service
# systemctl stop fedora-storage-init.service
# systemctl disable fedora-storage-init-late.service
# systemctl disable fedora-storage-init.service
# systemctl disable rpcbind.target

Reboot and afterwards:

# systemctl list-units shows:
...
fedora-storage-init-late.service    loaded active exited ....
fedora-storage-init.service         loaded active exited ....
...
rpcbind.target                      loaded active active ...

But on the other hand, disabling in the same manner for example remote-fs.service does actually disable the service.

In Mageia 2 all of such 'disable' actions should really work, IMHO.
Dick Gevers 2012-01-20 14:31:53 CET

Blocks: (none) => 2120

Comment 1 D Morgan 2012-01-26 22:40:31 CET
what are the complete output of those commands ?

CC: (none) => dmorganec

Comment 2 Dick Gevers 2012-01-27 09:39:14 CET
There was no output at all that I could see (other than reported above).
Comment 3 D Morgan 2012-02-11 03:37:21 CET
what about this bug with systemd 40 ?
Comment 4 Dick Gevers 2012-02-11 14:35:20 CET
My last bootup was with systemd 40 installed and the problem was still the same as posted.
Comment 5 Colin Guthrie 2012-02-14 18:23:35 CET
Some services are enabled "statically", that is they are hard deps of other services.

e.g.:
[colin@jimmy ~]$ systemctl status rpcbind.target
rpcbind.target - RPC Port Mapper
	  Loaded: loaded (/lib/systemd/system/rpcbind.target; static)
	  Active: active since Tue, 14 Feb 2012 16:54:15 +0000; 18min ago


Notice the word "static" there.

This means that there is a hard require on something else.

In this particular case this file makes it static:
/lib/systemd/system/multi-user.target.wants/rpcbind.target

As you can see this is in the "/lib" tree rather than the "/etc" tree.

The difference between /lib and /etc is the the the former is reserved for packaging and the latter for user actions.

[colin@jimmy ~]$ rpm -qf /lib/systemd/system/multi-user.target.wants/rpcbind.target
systemd-units-40-2.mga2

So in this case, rpcbind.target is a hard requirement of multi-user.target.


Also in this case if you look at "man systemd.special" you will see:

       rpcbind.target
           systemd automatically adds dependencies of type After for this target unit to all SysV init script service units with an
           LSB header referring to the $rpcbind facility.

So it's really not something you want to disable until all sysvinit systems are completly nuked otherwise problems will occur.


The other services you mention are similarly forced on in the packaging.

It may be that we need to revise this decision however. 

As the storage-init services should be noops when not needed, I do not think it's a net gain to allow administrators to disable them and end up with a broken system. Far better to always have them enabled. If you feel very strongly about this you can mask the service by creating a file in /etc/systemd/system/$name.service which is a symlink to /dev/null and it will be permanently nuked.


I agree however that there is some discrepancy between rpcbind.target and remote-fs.service however targets are a little different to services and as such I think this is OK and acceptable.

It is certainly not appropriate that any given "disable" operation should magically world. If dependencies are involved should it also disable the services that depend on it, or should it fail?  As I said, some services are static, but I agree that better information should be returned to the user when a given action does not succeed (I have some other niggles myself regarding enabling template units) i.e. I'd like "systemctl enable openvpn@home.service" to work as expected rather than throwing up a confusing error.

But IMO these kind of UI discussions are better had upstream on IRC or mailing lists or via their bugtracker rather than downstream with us.

CC: (none) => mageia

Comment 6 Colin Guthrie 2012-03-07 16:00:41 CET
Considering the above comment (I noticed a typo: "magically world" should be "magically work"), I think we can close this as invalid. I would still welcome better feedback to users, but this is very much an upstream issue.

Status: NEW => RESOLVED
Resolution: (none) => INVALID


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