Bug 1094936 - vdsm: script and/or trigger should not directly enable systemd units
Summary: vdsm: script and/or trigger should not directly enable systemd units
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: vdsm
Classification: oVirt
Component: General
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-3.6.0-rc
: 4.17.8
Assignee: Yaniv Bronhaim
QA Contact: Petr Kubica
URL:
Whiteboard: infra
Depends On:
Blocks: autoenabled-systemd-units
TreeView+ depends on / blocked
 
Reported: 2014-05-06 17:23 UTC by Andy Lutomirski
Modified: 2016-02-10 19:13 UTC (History)
14 users (show)

Fixed In Version: vdsm-4.17.0-1198.git6ede99a
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-13 14:40:30 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-3.6.0+
ylavi: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 42605 0 master ABANDONED introducing systemctl configurator to enable vdsm required services 2020-01-28 09:27:35 UTC
oVirt gerrit 43032 0 master MERGED Introducing vdsm preset systemd file 2020-01-28 09:27:35 UTC

Description Andy Lutomirski 2014-05-06 17:23:51 UTC
My query script thinks that vdsm has a script or trigger that directly enables a systemd unit using 'systemctl enable'.  It probably should not.  Please update this packages to use the macroized scriptlet (https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd).

If your package has an exception from FESCo permitting it to enable
itself, please make sure that the service in question is listed in the
appropriate preset file.

There is a general exception described here:

https://fedoraproject.org/wiki/Starting_services_by_default

If your package falls under the general exception, then it is possible
that no change is required.  Nevertheless, if you are relying on the
exception, please make sure that your rpm scripts are sensible.  The
exception is:

In addition, any service which does not remain persistent on the system (aka, it "runs once then goes away"), does not listen to incoming connections during initialization, and does not require configuration to be functional may be enabled by default (but is not required to do so). An example of "runs once then goes away" service is iptables.

Given that this issue can affect Fedora 20 users who install your
package as a dependency, this bug should be fixed in Fedora 20 and
Rawhide.

Comment 1 Yaniv Bronhaim 2014-09-29 11:21:31 UTC
Vdsm does it during installation, see vdsm.spec in %post

Mooli, please check the macroized scriptlet that we can use instead

Comment 2 Mooli Tayer 2014-09-29 17:21:56 UTC
As I understand from reading:
https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd

vdsmd needs FESCo approval for starting by default, since it is persistent and listens to a network socket. We do not need the same as far as I understand for spervdsmd/vdsm-reg:
https://fedoraproject.org/wiki/Starting_services_by_default

If there is agreement we need to file a bug against systemd to be included in
http://pkgs.fedoraproject.org/cgit/systemd.git/plain/90-default.preset
and explain why vdsm needs to be enabled by default:
(notice libvirtd.service is present there under "Network facing" section)
much like 
https://bugzilla.redhat.com/show_bug.cgi?id=885406

This is AFAIU regardless of starting via Macroized scriptlets/Manual scriptlets
for which I will submit a patch soon.

Comment 3 Mooli Tayer 2014-09-29 17:29:33 UTC
Doing some more reading:
http://www.freedesktop.org/software/systemd/man/systemd.preset.html

This explains well why this is needed:
http://freedesktop.org/wiki/Software/systemd/Preset/

(To allow enablement policy per distribution/site and not per package.)

Comment 4 Mooli Tayer 2014-09-30 20:37:42 UTC
Two important relevant commits should be considered:

spec: use the fedora systemd macros
http://gerrit.ovirt.org/#/c/12285/

spec: fix that vdsmd.service is not enabled after installation
http://gerrit.ovirt.org/#/c/16754/

This one is relevant as well.
spec: restart systemd-modules-load.service on post installation
http://gerrit.ovirt.org/#/c/16610/

Comment 5 Dan Kenigsberg 2015-04-07 04:55:31 UTC
Oved, complying with this Fedora guideline makes sense, and should be simply done in 3.6. We should drop all `/bin/systemctl enable` from the spec, and move them to a vdsm-tool configurator.

Please reconsider doing this in 3.6.

Comment 6 Red Hat Bugzilla Rules Engine 2015-10-18 08:33:40 UTC
Bug tickets that are moved to testing must have target release set to make sure tester knows what to test. Please set the correct target release before moving to ON_QA.

Comment 7 Petr Kubica 2016-01-07 15:19:40 UTC
Verified in vdsm-4.17.15-0.el7ev.noarch

Comment 8 Sandro Bonazzola 2016-01-13 14:40:30 UTC
oVirt 3.6.0 has been released, closing current release


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