[Bug 846897] New: Changes for more complete integration with systemd break Apache when build in chroots

https://bugzilla.novell.com/show_bug.cgi?id=846897 https://bugzilla.novell.com/show_bug.cgi?id=846897#c0 Summary: Changes for more complete integration with systemd break Apache when build in chroots Classification: openSUSE Product: openSUSE 13.1 Version: RC 1 Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: Apache AssignedTo: crrodriguez@opensuse.org ReportedBy: thardeck@suse.com QAContact: qa-bugs@suse.de CC: draht@suse.com Found By: Development Blocker: --- If I build openSUSE 13.1 with Kiwi and include Apache the service does hang after starting. If I remove Apache in the running image and reinstall it, it does work fine. There is no systemd in a chrooted environment that's why the setting isn't set but systemd still waits for a notify so starting the service doesn't work. The source for the issue is this change: - Include mod_systemd for more complete integration with systemd, turn the service to Typé=notify as required https://build.opensuse.org/package/rdiff/Apache/apache2?linkrev=base&rev=379 There should be a check for the distribution in the spec file and not in apache-20-22-upgrade . -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=846897 https://bugzilla.novell.com/show_bug.cgi?id=846897#c1 --- Comment #1 from Cristian Rodríguez <crrodriguez@opensuse.org> 2013-10-21 15:54:40 CLST --- (In reply to comment #0)
If I build openSUSE 13.1 with Kiwi and include Apache the service does hang after starting. If I remove Apache in the running image and reinstall it, it does work fine.
There is no systemd in a chrooted environment that's why the setting isn't set but systemd still waits for a notify so starting the service doesn't work.
The source for the issue is this change: - Include mod_systemd for more complete integration with systemd, turn the service to Typé=notify as required https://build.opensuse.org/package/rdiff/Apache/apache2?linkrev=base&rev=379
There should be a check for the distribution in the spec file and not in apache-20-22-upgrade .
There are dozens of services of type=notify that will hang then.. do you mean that in this piece.. if [ -x /usr/bin/systemd-notify ] && /usr/bin/systemd-notify --booted && ! a2enmod -q systemd; then a2enmod systemd fi calling /usr/bin/systemd-notify --booted hangs ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=846897 https://bugzilla.novell.com/show_bug.cgi?id=846897#c2 --- Comment #2 from Tim Hardeck <thardeck@suse.com> 2013-10-21 21:49:34 UTC --- Yes, I mean this part, but the issue is not notify in general. The issue is that this code path checks for systemd during build time which fails during the kiwi image generation because there is no systemd in the chroot build environment so there won't be any systemd mod entry in sysconfig. Then probably the service uses notify or requires it but Apache doesn't respond because of the missing systemd mod entry. In this succession systemctl doesn't know about the status and hangs if you start Apache. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=846897 https://bugzilla.novell.com/show_bug.cgi?id=846897#c3 --- Comment #3 from Cristian Rodríguez <crrodriguez@opensuse.org> 2013-10-21 20:19:25 CLST --- (In reply to comment #2)
The issue is that this code path checks for systemd during build time which fails during the kiwi image generation because there is no systemd in the chroot build environment so there won't be any systemd mod entry in sysconfig.
Then probably the service uses notify or requires it but Apache doesn't respond because of the missing systemd mod entry.
In this succession systemctl doesn't know about the status and hangs if you start Apache.
Ok, this is what happens then 1) /usr/bin/systemd-notify --booted returns failure during image build 2) due to 1) no module is added to APACHE_MODULES 3) due to 1) and 2) when starting or restarting the apache service, systemd expects a service that notifies, but since the module is not loaded, it hangs until timeout. Got it, I will simply remove the check, a non-existant module in APACHE_MODULES is not an error but just a warning and will do nothing in a non-systemd distro. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=846897 https://bugzilla.novell.com/show_bug.cgi?id=846897#c4 Cristian Rodríguez <crrodriguez@opensuse.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Fix_is_Ready --- Comment #4 from Cristian Rodríguez <crrodriguez@opensuse.org> 2013-10-21 20:30:38 CLST --- request id 204242 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=846897 https://bugzilla.novell.com/show_bug.cgi?id=846897#c5 --- Comment #5 from Bernhard Wiedemann <bwiedemann@suse.com> 2013-10-22 02:00:09 CEST --- This is an autogenerated message for OBS integration: This bug (846897) was mentioned in https://build.opensuse.org/request/show/204243 Factory / apache2 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=846897 https://bugzilla.novell.com/show_bug.cgi?id=846897#c6 Marcus Rückert <mrueckert@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mrueckert@suse.com --- Comment #6 from Marcus Rückert <mrueckert@suse.com> 2013-10-22 12:27:50 UTC --- that solution still fails scenario: 1. admin sees the unknown module systemd suddenly in their config and removes it 2. on the next restart it just hangs as described in comment #1 questions 1. will the admin get some useful informations why the restart is hanging? probably not. 2. why not just have a preexec and let that insert the module + emit warning to admin to not remove that module as it is essential? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=846897 https://bugzilla.novell.com/show_bug.cgi?id=846897#c7 --- Comment #7 from Marcus Rückert <mrueckert@suse.com> 2013-10-22 12:32:22 UTC --- while we are at it... please extend the sysconfig template to mention that the module is required and should not be removed. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=846897 https://bugzilla.novell.com/show_bug.cgi?id=846897#c8 --- Comment #8 from Cristian Rodríguez <crrodriguez@opensuse.org> 2013-10-22 12:06:00 CLST --- (In reply to comment #6)
that solution still fails
scenario:
1. admin sees the unknown module systemd suddenly in their config and removes it 2. on the next restart it just hangs as described in comment #1
questions
1. will the admin get some useful informations why the restart is hanging? probably not. 2. why not just have a preexec and let that insert the module + emit warning to admin to not remove that module as it is essential?
OK, I made mod_systemd static into the server so none of these scenarios will happen.. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=846897 https://bugzilla.novell.com/show_bug.cgi?id=846897#c9 --- Comment #9 from Bernhard Wiedemann <bwiedemann@suse.com> 2013-10-22 18:00:24 CEST --- This is an autogenerated message for OBS integration: This bug (846897) was mentioned in https://build.opensuse.org/request/show/204343 Factory / apache2 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=846897 https://bugzilla.novell.com/show_bug.cgi?id=846897#c10 Cristian Rodríguez <crrodriguez@opensuse.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #10 from Cristian Rodríguez <crrodriguez@opensuse.org> 2013-12-17 06:04:55 CLST --- fixed in 13.1/factory already. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com