[opensuse-packaging] Starting services by default
Hi, with systemd we nowadays handle enabling services by default via the systemd-preset-* packages. But AFAICS this really only handles automatic enablement of the service (== systemctl enable). The service are still not running after that. For that I still need to either reboot a call systemctl start manually. Is that really the expected behavior? If yes, what is the correct way to automatically have a service started after installation. Currently I am looking at open-iscsi which has iscsid.socket and iscsi.service listed in /usr/lib/systemd/system-preset/90-default-openSUSE.preset. Both are correctly enable after installation, but only started after reboot. -- Ralf -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On 04/15/2014 06:16 AM, Ralf Haferkamp wrote:
Hi,
with systemd we nowadays handle enabling services by default via the systemd-preset-* packages. But AFAICS this really only handles automatic enablement of the service (== systemctl enable). The service are still not running after that. For that I still need to either reboot a call systemctl start manually. Is that really the expected behavior? If yes, what is the correct way to automatically have a service started after installation.
Currently I am looking at open-iscsi which has iscsid.socket and iscsi.service listed in /usr/lib/systemd/system-preset/90-default-openSUSE.preset. Both are correctly enable after installation, but only started after reboot.
The systemd packaging guidelines should have the answer http://en.opensuse.org/openSUSE:Systemd_packaging_guidelines HTH, Robert -- Robert Schweikert MAY THE SOURCE BE WITH YOU Public Cloud Architect LINUX SUSE-IBM Software Integration Center Tech Lead rjschwei@suse.com rschweik@ca.ibm.com 781-464-8147 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Tue, Apr 15, 2014 at 08:46:56AM -0400, Robert Schweikert wrote:
On 04/15/2014 06:16 AM, Ralf Haferkamp wrote:
Hi,
with systemd we nowadays handle enabling services by default via the systemd-preset-* packages. But AFAICS this really only handles automatic enablement of the service (== systemctl enable). The service are still not running after that. For that I still need to either reboot a call systemctl start manually. Is that really the expected behavior? If yes, what is the correct way to automatically have a service started after installation.
Currently I am looking at open-iscsi which has iscsid.socket and iscsi.service listed in /usr/lib/systemd/system-preset/90-default-openSUSE.preset. Both are correctly enable after installation, but only started after reboot.
The systemd packaging guidelines should have the answer
http://en.opensuse.org/openSUSE:Systemd_packaging_guidelines
I agree they should, but currently they don't have the answer :), unless I am completely overlooking something. The wiki page documents the systemd related macros and how the preset file is supposed to be used. But as written above, iscsid.socket is already present in the preset file and the iscsid.socket is correctly enabled after installing the package. It's just not started. For that to happen I still need to call systemctl start iscsid.socket manually (or reboot). And probably that even is how it all is supposed to work, I am just not sure, that why asking. -- Ralf -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
* Ralf Haferkamp <rhafer@suse.de> [04-15-14 09:31]:
On 04/15/2014 06:16 AM, Ralf Haferkamp wrote:
with systemd we nowadays handle enabling services by default via the systemd-preset-* packages. But AFAICS this really only handles automatic enablement of the service (== systemctl enable). The service are still not running after that. For that I still need to either reboot a call systemctl start manually. Is that really the expected behavior? If yes, what is the correct way to automatically have a service started after installation.
Currently I am looking at open-iscsi which has iscsid.socket and iscsi.service listed in /usr/lib/systemd/system-preset/90-default-openSUSE.preset. Both are correctly enable after installation, but only started after reboot.
The systemd packaging guidelines should have the answer
http://en.opensuse.org/openSUSE:Systemd_packaging_guidelines I agree they should, but currently they don't have the answer :), unless I am completely overlooking something. The wiki page documents the systemd related macros and how the preset file is supposed to be used. But as written above, iscsid.socket is already present in the preset file and the iscsid.socket is correctly enabled after installing the
On Tue, Apr 15, 2014 at 08:46:56AM -0400, Robert Schweikert wrote: package. It's just not started. For that to happen I still need to call systemctl start iscsid.socket manually (or reboot). And probably that even is how it all is supposed to work, I am just not sure, that why asking.
Per Jessen <per@computer.org>, in openSUSE discussed this in two threads, 18 March to 20 March: How do I make systemd wait for iscsi to start before attempting to mount iscsi-based filesystems? and displaying systemd startup order? Maybe the thread will help. -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://linuxcounter.net -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
В Tue, 15 Apr 2014 12:16:20 +0200 Ralf Haferkamp <rhafer@suse.de> пишет:
Hi,
with systemd we nowadays handle enabling services by default via the systemd-preset-* packages. But AFAICS this really only handles automatic enablement of the service (== systemctl enable). The service are still not running after that. For that I still need to either reboot a call systemctl start manually. Is that really the expected behavior?
Was it different with sysvinit? I.e. is it regression? -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Tue, Apr 15, 2014 at 09:18:35PM +0400, Andrey Borzenkov wrote:
В Tue, 15 Apr 2014 12:16:20 +0200 Ralf Haferkamp <rhafer@suse.de> пишет:
Hi,
with systemd we nowadays handle enabling services by default via the systemd-preset-* packages. But AFAICS this really only handles automatic enablement of the service (== systemctl enable). The service are still not running after that. For that I still need to either reboot a call systemctl start manually. Is that really the expected behavior?
Was it different with sysvinit? I.e. is it regression?
At least when comparing cronjobs to systemd timers it is: For a cronjob you simply place the script e.g. in /etc/cron.daily. For systemd you need the 1. script, the 2. service file, 3. the timer file, 4. extend presets, add 5. rpm macros to the spec file and still 6. reboot or start the service. For me the solution was easy: Keep the cronjob. ciao Arvin -- Arvin Schnell, <aschnell@suse.de> Senior Software Engineer, Research & Development SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Arvin Schnell <aschnell@suse.de> writes:
At least when comparing cronjobs to systemd timers it is: For a cronjob you simply place the script e.g. in /etc/cron.daily.
Plus a sysconfig setting to configure it. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (6)
-
Andreas Schwab
-
Andrey Borzenkov
-
Arvin Schnell
-
Patrick Shanahan
-
Ralf Haferkamp
-
Robert Schweikert