Red Hat Bugzilla – Bug 1001607
RFE: provide better error when attempting to enable/disable generated units
Last modified: 2015-01-31 15:05:13 EST
Description of problem:
As a systemd user I'm pretty much confused from the functionality of the command: 'systemctl disable'
When I see service 'lvm2-activation.service' and I run 'disable' on this service it's still being loaded and executed upon next restart of the system.
I think it's a bug in systemd - since there is not any distinguish between normal and generator service and I also believe it's a regular user request to disable even generator (knowing it's something special).
If I install lvm2 on a system, which doesn't need LVs for booting and it's using LV only seldomly, there is no reason to have vgchange executed on system startup.
There seem to be a way to disable it via 'systemctl mask'.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
after 'systemctl disable' and reboot:
lvm2-activation.service - Activation of LVM2 logical volumes
Loaded: loaded (/etc/lvm/lvm.conf)
Active: inactive (dead) since Ne 2013-08-25 11:36:14 CEST; 2 days ago
Process: 221 ExecStart=/usr/sbin/lvm vgchange -aay --sysinit (code=exited, status=0/SUCCESS)
Main PID: 221 (code=exited, status=0/SUCCESS)
vgchange is not executed when the service is disabled
or systemctl reports a user error possibly suggesting to use 'mask' ?
It doesn't make much sense to enable or disable generated units. But we should provide a better error message. We could load the unit, and if the path matches one of the generator directories, issue a nice hint.