[Bug 18250] New: koha-common should start after memcached
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Bug ID: 18250 Summary: koha-common should start after memcached Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Packaging Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org CC: mirko@abunchofthings.net -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17311 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 61034 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61034&action=edit Bug 18250: Update LSB block of koha-common init script Currently koha-common may start before memcached. We should prevent that. If we add memcached to the LSB section of the koha-common init script, Debian's insserv will know about this requirement. Note: This patch is only a step in resolving the issue. Test plan: [1] Copy the updated koha-common script to /etc/init.d [2] Look for S..koha-common and S..memcached in /etc/rcX.d (say X=5) [3] Run sudo update-rc.d koha-common disable [4] Run sudo update-rc.d koha-common enable [5] Look again for S..koha-common in /etc/rcX.d (say X=5). The number for koha-common should now be higher than for memcached. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 --- Comment #2 from Mirko Tietgen <mirko@abunchofthings.net> --- Memcached is optional for Koha. What happens with this patch if it is not installed? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Mirko Tietgen from comment #2)
Memcached is optional for Koha. What happens with this patch if it is not installed?
True. We need to take care of that too. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- You will see this warning when disabling: insserv: warning: current start runlevel(s) (empty) of script `koha-common' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `koha-common' overrides LSB defaults (0 1 6). -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 61035 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61035&action=edit Bug 18250: Force startup order in postinst script This is a workaround meant to correct upgrading installs. We force the order by disable/enable. Test plan: [1] When upgrading an existing install, check that the startup order after the upgrade has been corrected in /etc/rcX.d (say X=5). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- We should check if this change is enough for a new install. When we are installing koha-common with this new LSB block, you would expect a better startup order in /etc/rc.d. When we are upgrading, we could try to force the order as is done in the second patch. Must still be tested. It is a kind of workaround. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #3)
(In reply to Mirko Tietgen from comment #2)
Memcached is optional for Koha. What happens with this patch if it is not installed?
True. We need to take care of that too.
Maybe an easy way out here is the $all-approach in insserv? (Start after anything else..) Or removing the memcached from init.d with sed when there is no memcached. Only problem there: what happens if someone installs memcached later? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Tested a notexisting service with disable/enable: insserv: Service notexistingservice has to be enabled to start service koha-common insserv: exiting now! -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Or should we do in postinst: if memcached_is_installed if memcached_not_yet_in_lsb_header add to init.d/koha-common disable, enable fi fi That way we would only do the reshuffle once.. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- So far my proposals; this report now first needs some feedback. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 --- Comment #11 from Mirko Tietgen <mirko@abunchofthings.net> --- To avoid workarounds, we could just make memcached mandatory. It is widely available in Debian versions. Feels like a cleaner approach to me. Any reasons not to do it? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18342 --- Comment #12 from Mason James <mtj@kohaaloha.com> --- (In reply to Mirko Tietgen from comment #11)
To avoid workarounds, we could just make memcached mandatory. It is widely available in Debian versions. Feels like a cleaner approach to me. Any reasons not to do it?
Mirko, sounds like a great idea to me I created a bug for this (BZ-18342) -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Jacek Ablewicz <abl@biblos.pk.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16758 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Jacek Ablewicz <abl@biblos.pk.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |abl@biblos.pk.edu.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |18342 See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=18342 | CC| |jonathan.druart@bugs.koha-c | |ommunity.org Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18342 [Bug 18342] Set memcached as 'enabled' by default -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Bug 18342 got pushed in the meantime. Any further thoughts about this approach? Changing status to enter the arena ;) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 --- Comment #14 from Mirko Tietgen <mirko@abunchofthings.net> --- I'll have a look at this again. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 --- Comment #15 from Mirko Tietgen <mirko@abunchofthings.net> --- Testplan does not work apply to systemd. However the patch still works, systemd generates a target file /run/systemd/generator.late/multi-user.target.wants/koha-common.service Without patches
# Automatically generated by systemd-sysv-generator
[Unit] Documentation=man:systemd-sysv-generator(8) SourcePath=/etc/init.d/koha-common Description=LSB: Start required services for each Koha instance Before=multi-user.target Before=multi-user.target Before=multi-user.target Before=graphical.target After=remote-fs.target
[…] With the patches applied I get
# Automatically generated by systemd-sysv-generator
[Unit] Documentation=man:systemd-sysv-generator(8) SourcePath=/etc/init.d/koha-common Description=LSB: Start required services for each Koha instance Before=multi-user.target Before=multi-user.target Before=multi-user.target Before=graphical.target After=remote-fs.target After=memcached.service
[…] which means the patches do what they are supposed to do. I don't know if we have an official policy regarding SysVinit vs. systemd. As far as I can see we rely on the backwards compatibility provided by systemd in other places too. I'll send a signoff and consider to bundle it together with bug 17311 for a 18.05.00-2 release. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |helix84@centrum.sk --- Comment #16 from Mirko Tietgen <mirko@abunchofthings.net> --- *** Bug 20820 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61034|0 |1 is obsolete| | --- Comment #17 from Mirko Tietgen <mirko@abunchofthings.net> --- Created attachment 75587 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75587&action=edit Bug 18250: Update LSB block of koha-common init script Currently koha-common may start before memcached. We should prevent that. If we add memcached to the LSB section of the koha-common init script, Debian's insserv will know about this requirement. Note: This patch is only a step in resolving the issue. Test plan: [1] Copy the updated koha-common script to /etc/init.d [2] Look for S..koha-common and S..memcached in /etc/rcX.d (say X=5) [3] Run sudo update-rc.d koha-common disable [4] Run sudo update-rc.d koha-common enable [5] Look again for S..koha-common in /etc/rcX.d (say X=5). The number for koha-common should now be higher than for memcached. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61035|0 |1 is obsolete| | --- Comment #18 from Mirko Tietgen <mirko@abunchofthings.net> --- Created attachment 75589 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75589&action=edit Bug 18250: Force startup order in postinst script This is a workaround meant to correct upgrading installs. We force the order by disable/enable. Test plan: [1] When upgrading an existing install, check that the startup order after the upgrade has been corrected in /etc/rcX.d (say X=5). Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Mirko Tietgen <mirko@abunchofthings.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17311 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17311 [Bug 17311] koha-common service should be restarted on upgrade -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75587|0 |1 is obsolete| | --- Comment #19 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 76855 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76855&action=edit Bug 18250: Update LSB block of koha-common init script Currently koha-common may start before memcached. We should prevent that. If we add memcached to the LSB section of the koha-common init script, Debian's insserv will know about this requirement. Note: This patch is only a step in resolving the issue. Test plan: [1] Copy the updated koha-common script to /etc/init.d [2] Look for S..koha-common and S..memcached in /etc/rcX.d (say X=5) [3] Run sudo update-rc.d koha-common disable [4] Run sudo update-rc.d koha-common enable [5] Look again for S..koha-common in /etc/rcX.d (say X=5). The number for koha-common should now be higher than for memcached. Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75589|0 |1 is obsolete| | --- Comment #20 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 76856 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76856&action=edit Bug 18250: Force startup order in postinst script This is a workaround meant to correct upgrading installs. We force the order by disable/enable. Test plan: [1] When upgrading an existing install, check that the startup order after the upgrade has been corrected in /etc/rcX.d (say X=5). Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Passed QA |Pushed to Master --- Comment #21 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Pushed to Master |Pushed to Stable --- Comment #22 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.05.x for 18.05.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Bug 18250 depends on bug 18342, which changed state. Bug 18342 Summary: Set memcached as 'enabled' by default https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18342 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |fridolin.somers@biblibre.co | |m Status|Pushed to Stable |RESOLVED --- Comment #23 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- depends on Bug 18342 not in 17.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18250 Tomáš Wünsch <fraktik@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fraktik@gmail.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org