Re: [systemd-devel] Bug in source_io_register?
On Tue, 15.10.13 18:22, David Strauss (da...@davidstrauss.net) wrote: This appears to be a case of having more than one source enabled for the same fd, even if they're for different conditions (EPOLLIN vs. EPOLLOUT). I'm looking now at changing the code to use only one source but in a disabled, EPOLLIN only, EPOLLIN only, or EPOLLIN | EPOLLOUT state. This is explicitly not supported by epoll, as discussed earlier. You should get an EEXIST if you try to do this, and rightfully so. Lennart -- Lennart Poettering - Red Hat, Inc. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Bug in source_io_register?
On Wed, Oct 16, 2013 at 4:34 AM, Lennart Poettering lenn...@poettering.net wrote: This is explicitly not supported by epoll, as discussed earlier. You should get an EEXIST if you try to do this, and rightfully so. Yes, but I only truly understood what you meant after having failure as the teacher (and then fixing it). ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] Add sabridge for socket activation of traditional daemons
On Tue, Oct 15, 2013 at 2:58 AM, David Strauss da...@davidstrauss.net wrote: On Mon, Oct 14, 2013 at 5:53 PM, Kay Sievers k...@vrfy.org wrote: Please give it a name a human can parse and pronounce. :) sa-bridge? act-bridge? other suggestions? We really should avoid non-obvious or not commonly used abbreviations. Neither s nor a are anywhere obvious here. Also this thing does not actually *activate* anything it just proxies. And long-running processes should get a d(aemon) at the end. So why not just call it systemd-socket-proxyd. I named it in the spirit of cgtop, systemctl, etc., none of which use delimiters. cg is pretty well known, there is even a libcg. Also command line tools, can be argued, are nice to have shorter, the proxy just shows up in ps, and should identify itself without needlessy cryptic names. Thanks, Kay ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] moving from SysV to systemd - issue with / being ro
Hi, I want to switch init system from SysV to systemd-196. Sys is PXE booted disk-less appliance with rootfs based on overlayfs. Currently I can PXEboot, successfully switch root from initrd to overlayfs based root, systemd starts and executes many of it's units. Unfortunately user units are failing due / is read-only. When I issue mount -o remount,rw / - root becomes rw - so it looks like systemd for some reason isn't remounting root to rw. Interesting is that exactly the same initrd-overlayfs script (see below) works OK for SysV - so I think issue isn't in my pivot_root procedure but rather systemd receives / in rw but leaves in ro (as mount -o remount,rw / allows to write to /). Script switching initrd to overlayfs root looks following: /bin/mount -n -t tmpfs none /rw /bin/mkdir -p /rw/rootfs /bin/mount -n -t overlayfs -o lowerdir=/rootfs-ro,upperdir=/rw/rootfs none /rootfs cd /rootfs /bin/mkdir -p initrd proc sys /sbin/pivot_root . initrd exec /usr/sbin/chroot . /usr/lib/systemd/systemd Where issue might be? ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] moving from SysV to systemd - issue with / being ro
On Wed, Oct 16, 2013 at 06:18:12PM +0200, Warpme wrote: Hi, I want to switch init system from SysV to systemd-196. Sys is PXE booted disk-less appliance with rootfs based on overlayfs. Currently I can PXEboot, successfully switch root from initrd to overlayfs based root, systemd starts and executes many of it's units. Unfortunately user units are failing due / is read-only. When I issue mount -o remount,rw / - root becomes rw - so it looks like systemd for some reason isn't remounting root to rw. Interesting is that exactly the same initrd-overlayfs script (see below) works OK for SysV - so I think issue isn't in my pivot_root procedure but rather systemd receives / in rw but leaves in ro (as mount -o remount,rw / allows to write to /). Script switching initrd to overlayfs root looks following: /bin/mount -n -t tmpfs none /rw /bin/mkdir -p /rw/rootfs /bin/mount -n -t overlayfs -o lowerdir=/rootfs-ro,upperdir=/rw/rootfs none /rootfs cd /rootfs /bin/mkdir -p initrd proc sys /sbin/pivot_root . initrd exec /usr/sbin/chroot . /usr/lib/systemd/systemd Where issue might be? What's in /etc/fstab? Zbyszek ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] moving from SysV to systemd - issue with / being ro
On 10/16/13 7:02 PM, Zbigniew Jędrzejewski-Szmek wrote: On Wed, Oct 16, 2013 at 06:18:12PM +0200, Warpme wrote: Hi, I want to switch init system from SysV to systemd-196. Sys is PXE booted disk-less appliance with rootfs based on overlayfs. Currently I can PXEboot, successfully switch root from initrd to overlayfs based root, systemd starts and executes many of it's units. Unfortunately user units are failing due / is read-only. When I issue mount -o remount,rw / - root becomes rw - so it looks like systemd for some reason isn't remounting root to rw. Interesting is that exactly the same initrd-overlayfs script (see below) works OK for SysV - so I think issue isn't in my pivot_root procedure but rather systemd receives / in rw but leaves in ro (as mount -o remount,rw / allows to write to /). Script switching initrd to overlayfs root looks following: /bin/mount -n -t tmpfs none /rw /bin/mkdir -p /rw/rootfs /bin/mount -n -t overlayfs -o lowerdir=/rootfs-ro,upperdir=/rw/rootfs none /rootfs cd /rootfs /bin/mkdir -p initrd proc sys /sbin/pivot_root . initrd exec /usr/sbin/chroot . /usr/lib/systemd/systemd Where issue might be? What's in /etc/fstab? Zbyszek Zbyszku, Here is my fstab: none / auto remount,rw 0 0 pzdr ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] moving from SysV to systemd - issue with / being ro
Am 16.10.2013 19:22, schrieb Warpme: On 10/16/13 7:02 PM, Zbigniew Jędrzejewski-Szmek wrote: On Wed, Oct 16, 2013 at 06:18:12PM +0200, Warpme wrote: Hi, I want to switch init system from SysV to systemd-196. Sys is PXE booted disk-less appliance with rootfs based on overlayfs. Currently I can PXEboot, successfully switch root from initrd to overlayfs based root, systemd starts and executes many of it's units. Unfortunately user units are failing due / is read-only. When I issue mount -o remount,rw / - root becomes rw - so it looks like systemd for some reason isn't remounting root to rw. Interesting is that exactly the same initrd-overlayfs script (see below) works OK for SysV - so I think issue isn't in my pivot_root procedure but rather systemd receives / in rw but leaves in ro (as mount -o remount,rw / allows to write to /). Script switching initrd to overlayfs root looks following: /bin/mount -n -t tmpfs none /rw /bin/mkdir -p /rw/rootfs /bin/mount -n -t overlayfs -o lowerdir=/rootfs-ro,upperdir=/rw/rootfs none /rootfs cd /rootfs /bin/mkdir -p initrd proc sys /sbin/pivot_root . initrd exec /usr/sbin/chroot . /usr/lib/systemd/systemd Where issue might be? What's in /etc/fstab? Zbyszek Zbyszku, Here is my fstab: none / auto remount,rw 0 0 why none and remount? typically the line looks like this UUID=b834776d-69d1-49c6-97c1-d6d758a438f0 / ext4 defaults i doubt that anything smells what none means signature.asc Description: OpenPGP digital signature ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] moving from SysV to systemd - issue with / being ro
On Wed, Oct 16, 2013 at 07:22:28PM +0200, Warpme wrote: On 10/16/13 7:02 PM, Zbigniew Jędrzejewski-Szmek wrote: On Wed, Oct 16, 2013 at 06:18:12PM +0200, Warpme wrote: Hi, I want to switch init system from SysV to systemd-196. Sys is PXE booted disk-less appliance with rootfs based on overlayfs. Currently I can PXEboot, successfully switch root from initrd to overlayfs based root, systemd starts and executes many of it's units. Unfortunately user units are failing due / is read-only. When I issue mount -o remount,rw / - root becomes rw - so it looks like systemd for some reason isn't remounting root to rw. Interesting is that exactly the same initrd-overlayfs script (see below) works OK for SysV - so I think issue isn't in my pivot_root procedure but rather systemd receives / in rw but leaves in ro (as mount -o remount,rw / allows to write to /). Script switching initrd to overlayfs root looks following: /bin/mount -n -t tmpfs none /rw /bin/mkdir -p /rw/rootfs /bin/mount -n -t overlayfs -o lowerdir=/rootfs-ro,upperdir=/rw/rootfs none /rootfs cd /rootfs /bin/mkdir -p initrd proc sys /sbin/pivot_root . initrd exec /usr/sbin/chroot . /usr/lib/systemd/systemd Where issue might be? What's in /etc/fstab? Zbyszek Zbyszku, Here is my fstab: none / auto remount,rw 0 0 OK, so fstab-generator will ignore the mount point becuase of the 'none'. This means that systemd will not remount it. Actually, I don't understand why / is mounted read-only: -w is the default for mount, and you don't specify -r anywhere. Maybe it's specific to overlayfs. I think that your best option is to add /bin/mount -o remount,rw / in the script. The other option — modifying systemd — is also possible, but it won't happen without a good reason. Your usecase should be trivially solved by modifying the script, so it's not good enough. Zbyszek ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] moving from SysV to systemd - issue with / being ro
On 10/16/13 7:40 PM, Zbigniew Jędrzejewski-Szmek wrote: On Wed, Oct 16, 2013 at 07:22:28PM +0200, Warpme wrote: On 10/16/13 7:02 PM, Zbigniew Jędrzejewski-Szmek wrote: On Wed, Oct 16, 2013 at 06:18:12PM +0200, Warpme wrote: Hi, I want to switch init system from SysV to systemd-196. Sys is PXE booted disk-less appliance with rootfs based on overlayfs. Currently I can PXEboot, successfully switch root from initrd to overlayfs based root, systemd starts and executes many of it's units. Unfortunately user units are failing due / is read-only. When I issue mount -o remount,rw / - root becomes rw - so it looks like systemd for some reason isn't remounting root to rw. Interesting is that exactly the same initrd-overlayfs script (see below) works OK for SysV - so I think issue isn't in my pivot_root procedure but rather systemd receives / in rw but leaves in ro (as mount -o remount,rw / allows to write to /). Script switching initrd to overlayfs root looks following: /bin/mount -n -t tmpfs none /rw /bin/mkdir -p /rw/rootfs /bin/mount -n -t overlayfs -o lowerdir=/rootfs-ro,upperdir=/rw/rootfs none /rootfs cd /rootfs /bin/mkdir -p initrd proc sys /sbin/pivot_root . initrd exec /usr/sbin/chroot . /usr/lib/systemd/systemd Where issue might be? What's in /etc/fstab? Zbyszek Zbyszku, Here is my fstab: none / auto remount,rw 0 0 OK, so fstab-generator will ignore the mount point becuase of the 'none'. This means that systemd will not remount it. Actually, I don't understand why / is mounted read-only: -w is the default for mount, and you don't specify -r anywhere. Maybe it's specific to overlayfs. I think that your best option is to add /bin/mount -o remount,rw / in the script. The other option — modifying systemd — is also possible, but it won't happen without a good reason. Your usecase should be trivially solved by modifying the script, so it's not good enough. Zbyszek Zbyszku, I add remount just after pivot_root. No change. I don't get one thing: why exactly such script works OK for SysV ? If it works for SysV - it means script leaves / in rw mode. So it leaves / in rw mode also for systemd (only difference between SysV and systemd is script last line). So logic say for me that systemd changes / mode to ro. But why? br ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] moving from SysV to systemd - issue with / being ro
On Wed, Oct 16, 2013 at 08:31:02PM +0200, Warpme wrote: Zbyszku, I add remount just after pivot_root. No change. I don't get one thing: why exactly such script works OK for SysV ? If it works for SysV - it means script leaves / in rw mode. So it leaves / in rw mode also for systemd (only difference between SysV and systemd is script last line). So logic say for me that systemd changes / mode to ro. But why? br That's strange. Can you show what 'systemctl show /' shows? And the fragment, which is a file specified by FragmentPath= in the above output, probably /run/systemd/generator/-.mount ? Zbyszek ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] moving from SysV to systemd - issue with / being ro
On 10/16/13 9:02 PM, Zbigniew Jędrzejewski-Szmek wrote: On Wed, Oct 16, 2013 at 08:31:02PM +0200, Warpme wrote: Zbyszku, I add remount just after pivot_root. No change. I don't get one thing: why exactly such script works OK for SysV ? If it works for SysV - it means script leaves / in rw mode. So it leaves / in rw mode also for systemd (only difference between SysV and systemd is script last line). So logic say for me that systemd changes / mode to ro. But why? br That's strange. Can you show what 'systemctl show /' shows? And the fragment, which is a file specified by FragmentPath= in the above output, probably /run/systemd/generator/-.mount ? Zbyszek Pls find output of 'systemctl show /' Id=-.mount Names=-.mount RequiredBy=local-fs.target tmp.mount media.mount var-lib-mysql\x2dtemp.mount sys-kernel-config.mount systemd-journald.socket systemd-ask-password-wall Before=local-fs.target tmp.mount media.mount var-lib-mysql\x2dtemp.mount sys-kernel-config.mount systemd-journald.socket systemd-ask-password-wall.pat Description=/ LoadState=loaded ActiveState=active SubState=mounted FragmentPath=/run/systemd/generator/-.mount SourcePath=/etc/fstab InactiveExitTimestamp=Wed, 2013-10-16 18:30:03 CEST InactiveExitTimestampMonotonic=2836321 ActiveEnterTimestamp=Wed, 2013-10-16 18:30:03 CEST ActiveEnterTimestampMonotonic=2836321 ActiveExitTimestampMonotonic=0 InactiveEnterTimestampMonotonic=0 CanStart=no CanStop=no CanReload=yes CanIsolate=no StopWhenUnneeded=no RefuseManualStart=yes RefuseManualStop=yes AllowIsolate=no DefaultDependencies=no OnFailureIsolate=no IgnoreOnIsolate=yes IgnoreOnSnapshot=no DefaultControlGroup=name=systemd:/system/-.mount ControlGroup=cpu:/system/-.mount name=systemd:/system/-.mount NeedDaemonReload=no JobTimeoutUSec=0 ConditionTimestampMonotonic=0 ConditionResult=no Where=/ What=none Options=rw,relatime,rw,lowerdir=/rootfs-ro,upperdir=/rw/rootfs Type=overlayfs TimeoutUSec=1min 30s ControlPID=0 DirectoryMode=0755 Result=success UMask=0022 LimitCPU=18446744073709551615 LimitFSIZE=18446744073709551615 LimitDATA=18446744073709551615 LimitSTACK=18446744073709551615 LimitCORE=18446744073709551615 LimitRSS=18446744073709551615 LimitNOFILE=4096 LimitAS=18446744073709551615 LimitNPROC=62989 LimitMEMLOCK=65536 LimitLOCKS=18446744073709551615 LimitSIGPENDING=62989 LimitMSGQUEUE=819200 LimitNICE=0 LimitRTPRIO=0 LimitRTTIME=18446744073709551615 OOMScoreAdjust=0 Nice=0 : File /run/systemd/generator/-.mount # Automatically generated by systemd-fstab-generator [Unit] SourcePath=/etc/fstab DefaultDependencies=no Before=local-fs.target [Mount] What=none Where=/ Type=auto FsckPassNo=0 Options=remount,rw Maybe we should disable [re]mounting / by systemd at all? br ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] [PATCH] Add sabridge for socket activation of traditional daemons
On Wed, Oct 16, 2013 at 6:59 AM, Kay Sievers k...@vrfy.org wrote: Also this thing does not actually *activate* anything it just proxies. I was going more for socket *activated* proxy, in the sense that the proxy uses socket activation to get its listen() fd. And long-running processes should get a d(aemon) at the end. Agreed here. Not sure why I forgot about that. I'll add that in. So why not just call it systemd-socket-proxyd. It doesn't emphasize the main reason someone would use this over existing tools. (Admittedly, sa doesn't do so too directly, either.) Say the word proxy to someone who's a developer or in IT, and they'll already assume it's a proxy based on *sockets*, even if they don't know what sockets are, exactly. We can compare to these established ones: * haproxy can do pure TCP (protocol neutrality) at scale (event-driven), but it can't start with socket activation or use Unix sockets. * socat is also protocol-neutral, but it assumes any inherited socket is post-accept(). It can only do listen() if it doesn't inherit the socket. There are also questions about its performance and reliability at scale (it's thread-based). It's not really designed to be a long-running daemon. * nginx can inherit sockets and run at scale (event-driven), but it's protocol-constrained to HTTP and SMTP, maybe one more. The proxy here (1) accepts an inherited socket for activation, (2) works with Unix domain sockets, (3) is protocol-neutral, and (4) should work at scale. Of those four characteristics, I consider the first (socket activation) the most novel and the main reason someone would opt for this proxy over other, established ones. This systemd-bundled proxy should work for creating socket-activate-able MySQL, Redis, Tomcat, Cassandra, some of which may never get native socket activation support. Would systemd-activated-proxyd work? I'd also consider systemd-socket-activated-proxyd. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] moving from SysV to systemd - issue with / being ro
On Wed, Oct 16, 2013 at 09:19:43PM +0200, Warpme wrote: Maybe we should disable [re]mounting / by systemd at all? All systemd does, is call 'mount -o remount /'. I have no idea how you end up with a read-only filesystem. As a work-around, you can add /etc/systemd/system/systemd-remount-fs.service.d/90-remount.conf with [Service] ExecStartPost=mount -o remount,rw / and/or run systemd in debug mode (add systemd.log_level=debug on the kernel command line), to see what is going on. Zbyszek ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] moving from SysV to systemd - issue with / being ro
On Wed, Oct 16, 2013 at 7:35 PM, Reindl Harald h.rei...@thelounge.net wrote: none / auto remount,rw 0 0 why none and remount? none because at the time fstab is read, / is already mounted; therefore the device already known. Specifying the root device in fstab is in most cases really pointless and makes stuff just needlessly inflexible. If no specific device is referenced, the rootfs (with fstab) can just be moved around without editing fstab. I usually use ROOT instead of none; doesn't matter, it just should not start with a / to be a *name* and not a *device*. typically the line looks like this UUID=b834776d-69d1-49c6-97c1-d6d758a438f0 / ext4 defaults i doubt that anything smells what none means It typically makes not much sense to specify the id of the rootfs in a file stored *on* the rootfs. Kay ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] moving from SysV to systemd - issue with / being ro
В Thu, 17 Oct 2013 00:07:55 +0200 Kay Sievers k...@vrfy.org пишет: typically the line looks like this UUID=b834776d-69d1-49c6-97c1-d6d758a438f0 / ext4 defaults i doubt that anything smells what none means It typically makes not much sense to specify the id of the rootfs in a file stored *on* the rootfs. You need to store it (default root device) somewhere to pass onto initrd. /etc/fstab is as good a place as any other. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel