Bug 1001607 - RFE: provide better error when attempting to enable/disable generated units
RFE: provide better error when attempting to enable/disable generated units
Status: NEW
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-08-27 07:41 EDT by Zdenek Kabelac
Modified: 2015-01-31 15:05 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Zdenek Kabelac 2013-08-27 07:41:35 EDT
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):


How reproducible:

Steps to Reproduce:

Actual results:

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
     Docs: man:lvm(8)
  Process: 221 ExecStart=/usr/sbin/lvm vgchange -aay --sysinit (code=exited, status=0/SUCCESS)
 Main PID: 221 (code=exited, status=0/SUCCESS)

Expected results:

vgchange is not executed when the service is disabled
or  systemctl reports a user error possibly suggesting to use  'mask' ?

Additional info:
Comment 1 Zbigniew Jędrzejewski-Szmek 2014-06-23 00:56:13 EDT
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.

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