[Bug 691549] New: systemd: obs-worker does not start
https://bugzilla.novell.com/show_bug.cgi?id=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c0 Summary: systemd: obs-worker does not start Classification: openSUSE Product: openSUSE.org Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: BuildService AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dimstar@opensuse.org QAContact: adrian@novell.com Found By: --- Blocker: --- Factory system when enabling systemd and trying to start obsworker, it gives 'successful' but then does not run. #> rcobsworker status obsworker.service - LSB: openSUSE Build Service worker Loaded: loaded (/etc/init.d/obsworker) Active: active (exited) since Wed, 04 May 2011 00:44:18 +0200; 6s ago Process: 3833 ExecStart=/etc/init.d/obsworker start (code=exited, status=0/SUCCESS) Main PID: 3859 (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/obsworker.service restarting the service does not do anything new. -- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c zj jia <zjjia@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |zjjia@novell.com AssignedTo|bnc-team-screening@forge.pr |froh@novell.com |ovo.novell.com | -- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c1 Adrian Schröter <adrian@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|BuildService |backend Version|unspecified |2.3 AssignedTo|froh@novell.com |mls@novell.com Product|openSUSE.org |openSUSE Build Service Target Milestone|--- |2.5 Severity|Major |Enhancement --- Comment #1 from Adrian Schröter <adrian@novell.com> 2011-05-05 08:21:54 UTC --- Yes, we don't support systemd yet with any script. Something for later since it is anyway not default and gives no benefit on an OBS server. Patches are welcome of course :) -- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c2 --- Comment #2 from Dominique Leuenberger <dimstar@opensuse.org> 2011-05-05 08:27:44 UTC --- (In reply to comment #1)
Yes, we don't support systemd yet with any script. Something for later since it is anyway not default and gives no benefit on an OBS server. Patches are welcome of course :)
Understandable. Just to put an emphasis on this here: this is truly valid in large scale deployments. I for one use my workstation as worker, where systemd might sooner or later be used (and does make a difference). I doubt everybody is using full blown server architecture as 'their' obs instance. (The 'issue' apparently seems to be 'screen', which does not have a pty available to detach from') -- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c3 --- Comment #3 from Dominique Leuenberger <dimstar@opensuse.org> 2011-05-05 08:33:39 UTC --- a /etc/init.d/screentest with this content: """ #!/bin/sh case "$1" in start) echo "Trying to start screen" >> /tmp/screentest screen -d -m ;; stop) echo "Stop screen dummy" >> /tmp/screentest ;; esac """ shows that systemctl start screentest.service can not launch this screen session. sh screentest start launches the screen session as expected. -- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c4 --- Comment #4 from Michael Schröder <mls@novell.com> 2011-05-05 15:14:08 UTC --- Could you please 'strace -f -p <systemdpid>' so that we can see what's going on? -- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c5 --- Comment #5 from Dominique Leuenberger <dimstar@opensuse.org> 2011-05-05 15:23:04 UTC --- Created an attachment (id=428234) --> (http://bugzilla.novell.com/attachment.cgi?id=428234) strace of pid1 Certainly. I did the test with my dummy screentest service (probably helps more than the full obs-worker...) strace -o systemd -p 1 -f (systemd per definition is pid1) See the result attached. -- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c6 --- Comment #6 from Michael Schröder <mls@novell.com> 2011-05-05 15:31:32 UTC --- Hmm, execve("/etc/init.d/screentest") = -1 EACCES (Permission denied) Why can't systemd it exec your script? -- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c7 --- Comment #7 from Dominique Leuenberger <dimstar@opensuse.org> 2011-05-05 15:34:58 UTC --- D'oh (chmod 755 missing on my test-script). so screen CAN be started (and the dummy test service works) But obs-worker of course is not affected by my own stupidity. Shall I run an strace when trying to launch obs-worker? (Will have to do this at home though, as there is no server reachable from here) -- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c8 --- Comment #8 from Michael Schröder <mls@novell.com> 2011-05-05 16:04:45 UTC --- Yes please. -- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c9 --- Comment #9 from Dominique Leuenberger <dimstar@opensuse.org> 2011-05-05 19:00:34 UTC --- Created an attachment (id=428275) --> (http://bugzilla.novell.com/attachment.cgi?id=428275) strace of pid1 while starting obsworker There also seem to be a bunch of Access Denied... obs-worker is regularly installed frompackage -- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c10 --- Comment #10 from Michael Schröder <mls@novell.com> 2011-05-06 09:48:15 UTC --- nice: ./bs_worker: Permission denied My guess is that /var/run is mounted noexec. -- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c11 --- Comment #11 from Dominique Leuenberger <dimstar@opensuse.org> 2011-05-06 09:50:36 UTC --- Impressive!
mount | grep run tmpfs on /var/run type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755)
-- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c12 --- Comment #12 from Dominique Leuenberger <dimstar@opensuse.org> 2011-05-06 10:02:50 UTC ---
cat /lib/systemd/system/var-run.mount # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version.
[Unit] Description=Runtime Directory Before=local-fs.target [Mount] What=tmpfs Where=/var/run Type=tmpfs Options=mode=755,nosuid,nodev,noexec -- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c13 Kay Sievers <kasievers@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kasievers@novell.com --- Comment #13 from Kay Sievers <kasievers@novell.com> 2011-05-06 14:57:08 UTC --- (In reply to comment #10)
My guess is that /var/run is mounted noexec.
Yeah, that's not what /var/run is for, hence the noexec. It's for rather tiny runtime-state files, like pid files, of services, not for binaries to execute from there. I guess the build directory should move to its own tmpfs mount in /var, or use /var/tmp instead. -- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c14 --- Comment #14 from Dominique Leuenberger <dimstar@opensuse.org> 2011-05-06 17:03:52 UTC --- For now I changed /etc/sysconfig/obs-worker: -OBS_RUN_DIR="" +OBS_RUN_DIR="/var/tmp/obs/run" Which, of course makes my worker start and build. So it's just about finding a sane default for the obsworker init script. -- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c15 --- Comment #15 from Michael Schröder <mls@novell.com> 2011-05-09 09:11:06 UTC --- tmpfs seems like a bad idea to me, I don't want to waste swap space for this. Seems we have to use /var/lib instead :-(. The "cleared on boot" capability of /var/run would make this a perfect place, though. I don't think the noexec makes any sense on /var/run, it can't be a security issue because programs can be started with /lib/ld-2.11.3.so anyways. -- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c16 --- Comment #16 from Michael Schröder <mls@novell.com> 2011-05-09 09:16:46 UTC --- /tmp and /var/tmp is also a bad idea because of security reasons, as the are writeable by everyone. We need a directory where only root can write. -- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c17 Michael Schröder <mls@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO InfoProvider| |kasievers@novell.com --- Comment #17 from Michael Schröder <mls@novell.com> 2011-05-19 17:41:04 UTC --- Kay, could you please ask Lennart if it's ok to drop the noexec from /var/run (or /run)? -- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c18 --- Comment #18 from Kay Sievers <kasievers@novell.com> 2011-05-31 15:12:37 UTC --- (In reply to comment #15)
I don't think the noexec makes any sense on /var/run, it can't be a security issue because programs can be started with /lib/ld-2.11.3.so anyways.
Sure? How can ld map these pages executable? But we have other tmp-like directories which have exec, so it's does not add too much, I guess. It's currently discussed to drop the noexec. I'll update when a decision is made. -- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c19 Kay Sievers <kasievers@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW InfoProvider|kasievers@novell.com | --- Comment #19 from Kay Sievers <kasievers@novell.com> 2011-06-14 12:17:49 UTC --- http://cgit.freedesktop.org/systemd/commit/?id=fbe092cc70bd90af5fc2d746935b5... -- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c20 Michael Schröder <mls@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CLOSED Resolution| |WORKSFORME --- Comment #20 from Michael Schröder <mls@novell.com> 2011-06-14 12:51:44 UTC --- Cool, thanks a lot Kay! -- 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=691549 https://bugzilla.novell.com/show_bug.cgi?id=691549#c21 --- Comment #21 from Kay Sievers <kasievers@novell.com> 2011-06-14 13:47:52 UTC --- updated systemd is in Base:System same issue in mkinitrd - bnc#699798 and for (sysv+non-initramfs) aaa_base - bnc#699799 -- 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