Apologies for the long email ...
I have updated open-iscsi in openSUSE Factory and 13.1 to work with systemd. I have a couple of questions (below), but first some background on what I'm trying to do.
As part of the process of updating open-iscsi to work with systemd, I tried to take advantage of the fact that systemd can start socket-based services on demand. This means that, if set up correctly, the iscsi daemon does not need to be running until and unless it is needed.
To do this, I broke the open-iscsi System V init file into 3 services, based on work being done on open-iscsi upstream:
- At the lowest level is the unit iscsid.socket - The iscsid.service unit is tied to the iscsid.socket unit, and - The iscsi.service unit
The iscsid.socket unit just encapsulates the socket that the iSCSI services uses.
The iscsid.service unit "owns" the iscsid iSCSI daemon.
The iscsi.service unit, at the top level, encapsulates iSCSI sessions, which run on top of the iscsid.service service.
If all three of these new units are enabled, then you get iSCSI as it was in pre-sysytemd days, i.e. an iscsid daemon running in the background, waiting to be needed.
If you instead do not enable the iscsid.service, then you get the same functionality as if it was enabled, except that the daemon is not started unless needed.
Question 1: What is the best way to ensure these units get enabled correctly, i.e. iscsid.socket and iscsi.service enabled and iscsid.service not enabled?
Note that the previous (pre-systemd) open-iscsi package had a file /etc/init.d/boot-iscsi.early (or something like that), which was always installed as enabled. I eliminated the need for this seperate boot-support init file.
I tried to ensure that this package got installed correctly by enabling the iscsid.socket and iscsi.service units automatically upon installation, but it looks like there is an openSUSE policy to not enable any service by default. There also seems to be exceptions, but both the reasons behind the policy and the exceptions to that policy do not seem documented.
Question 2: What is the objection to enabling the iscsid.socket service, since it does not add any resource burden to the system unless it is needed and used? (Same question for iscsi.service.)