[systemd-devel] [RFC] iscsid: add --initrd option to set run from initrd hint for systemd

2012-12-10 Thread Chris Leech
See http://www.freedesktop.org/wiki/Software/systemd/RootStorageDaemons --- usr/iscsid.c | 8 1 file changed, 8 insertions(+) diff --git a/usr/iscsid.c b/usr/iscsid.c index b4bb65b..7d71085 100644 --- a/usr/iscsid.c +++ b/usr/iscsid.c @@ -61,6 +61,7 @@ static pid_t log_pid; static

[systemd-devel] [RFC] iscsiadm, iscsid: newroot command to survive switch_root

2012-12-10 Thread Chris Leech
When started from initramfs, iscsid needs to be able to chroot itself to the runtime filesystem before the switch_root occurs. In the initramfs iscsiadm --newroot {root fs mount before switch} should be called before the switch_root. --- usr/iscsiadm.c | 30 +-

[systemd-devel] [RFC] iscsi unit files and helper script

2012-12-10 Thread Chris Leech
iSCSI service and socket files, and the iscsi_mark_root_nodes helper script to preserve sessions started in the initramfs. diff -Naur a/iscsid.service b/iscsid.service --- a/iscsid.service1969-12-31 16:00:00.0 -0800 +++ b/iscsid.service2012-12-10 13:38:38.643307001 -0800 @@ -0,0

[systemd-devel] [RFC] dracut iscsi module: early attempt to launch iscsid from the initramfs

2012-12-10 Thread Chris Leech
Not complete, but working well for iBFT configured iSCSI boot for me. --- modules.d/95iscsi/cleanup-iscsi.sh| 3 ++- modules.d/95iscsi/iscsid-initrd.service | 10 ++ modules.d/95iscsi/iscsid-initrd.socket| 9 + modules.d/95iscsi/iscsiroot.sh| 26

[systemd-devel] [RFC] iscsid / systemd / dracut integration effort

2012-12-10 Thread Chris Leech
Sorry about the cross-posting, but I think that in order to get this right I'm going to need as much feedback as I can get. I think I've got this working pretty well now (at least for my iBFT configured iSCSI root test case), although the dracut module still needs work. This is based on the

Re: [systemd-devel] [RFC] iscsi unit files and helper script

2012-12-11 Thread Chris Leech
, getting the ordering right to not run into problems with automatic mount points. I haven't run into any problems with the patches I posted, but I'm not happy with the unit files just yet. - Chris On 12/10/2012 04:08 PM, Chris Leech wrote: iSCSI service and socket files

Re: [systemd-devel] [RFC] iscsid / systemd / dracut integration effort

2012-12-11 Thread Chris Leech
On Mon, Dec 10, 2012 at 11:56:07PM +, Jóhann B. Guðmundsson wrote: On 12/10/2012 10:08 PM, Chris Leech wrote: 2) Proper ordering of the iscsi.service for non-root filesystems. Any and all feedback and/or help welcome. Looking the unit file for iscsid I do believe I missed

[systemd-devel] remote-fs ordering, iSCSI and _netdev

2014-10-27 Thread Chris Leech
Hi, I was hoping someone could help me make sure I'm not overlooking something with trying to manage mounts on iSCSI disks. I have an iscsi.service which starts and stops sessions to iSCSI targets. It's set with Before=remote-fs-pre.target and Wants=remote-fs-pre.target to ensure that remote fs

Re: [systemd-devel] remote-fs ordering, iSCSI and _netdev

2014-10-30 Thread Chris Leech
On Thu, Oct 30, 2014 at 12:10:16PM +0100, Karel Zak wrote: On Tue, Oct 28, 2014 at 02:29:35AM +0100, Lennart Poettering wrote: On Mon, 27.10.14 14:10, Chris Leech (cle...@redhat.com) wrote: So for any mounts to remote block devices (unlike remote file system protocols which

Re: [systemd-devel] remote-fs ordering, iSCSI and _netdev

2014-10-30 Thread Chris Leech
On Tue, Oct 28, 2014 at 06:41:32AM +0300, Andrei Borzenkov wrote: В Mon, 27 Oct 2014 14:10:47 -0700 Chris Leech cle...@redhat.com пишет: But there are two cases that are problematic, adding entries to fstab at runtime and manually mounting without adding to fstab (while still using

Re: [systemd-devel] remote-fs ordering, iSCSI and _netdev

2014-10-30 Thread Chris Leech
On Tue, Oct 28, 2014 at 01:57:06AM +0100, Zbigniew Jędrzejewski-Szmek wrote: On Mon, Oct 27, 2014 at 02:10:47PM -0700, Chris Leech wrote: ... If there's no matching mount unit from fstab-generator, one gets created dynamically when the fs is mounted by monitoring /proc/self/mountinfo

[systemd-devel] [RFC 0/4] use libmount for mount unit handling

2014-11-06 Thread Chris Leech
everything right. Also, as I mention in that patch description, remounts aren't picking up utab settings but I think that's a libmount issue. Thanks for taking the time to look at this, Chris Leech (4): use libmount to enumerate /proc/self/mountinfo check options as well as fstype for network mounts

[systemd-devel] [RFC 4/4] add remote-fs dependencies if needed after change

2014-11-06 Thread Chris Leech
This is an attempt to add it the remote-fs dependencies to a mount unit if the options change, like when the utab options are picked up after mountinfo has already been processed. It just adds the remote-fs dependencies, leaving the local-fs ones in place. With this change I always get mount

[systemd-devel] [RFC 2/4] check options as well as fstype for network mounts

2014-11-06 Thread Chris Leech
When creating a new mount unit after an event on /proc/self/mountinfo, check the mount options as well as the fstype to determine if this is a remote mount that requires network access. --- src/core/mount.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git

[systemd-devel] [RFC 3/4] monitor for utab changes with inotify

2014-11-06 Thread Chris Leech
Parsing the mount table with libmount races against the mount command, which will handle the actual mounting before updating utab. This means the poll event on /proc/self/mountinfo can kick of a reparse in systemd before the utab information is available. This change adds in an additional event

[systemd-devel] [RFC 1/4] use libmount to enumerate /proc/self/mountinfo

2014-11-06 Thread Chris Leech
This lets libmount add in user options from /run/mount/utab, like _netdev which is needed to get proper ordering against remote-fs.target --- .travis.yml | 2 +- Makefile.am | 4 +++- README | 1 + configure.ac | 13 src/core/build.h | 7 +++

Re: [systemd-devel] remote-fs ordering, iSCSI and _netdev

2014-11-06 Thread Chris Leech
On Fri, Oct 31, 2014 at 09:32:57AM +0100, Karel Zak wrote: It would be really better to have within systemd a generic function is_net_blkdev() than rely on external fragile configuration. I have doubts that anyone uses -o _netdev on command line when manually mounts filesystem. The one

Re: [systemd-devel] [RFC 1/4] use libmount to enumerate /proc/self/mountinfo

2014-11-21 Thread Chris Leech
On Sat, Nov 15, 2014 at 02:09:26PM +0100, Tom Gundersen wrote: Usually we don't do this kind of fallback, but rather disable the relevant functionality if the lib is not available. In this case I guess it means making support for .mount units optional. I could imagine someone doing that in

Re: [systemd-devel] [RFC 4/4] add remote-fs dependencies if needed after change

2014-11-21 Thread Chris Leech
On Sun, Nov 09, 2014 at 08:32:05AM +0300, Andrei Borzenkov wrote: В Thu, 6 Nov 2014 21:11:03 -0800 Chris Leech cle...@redhat.com пишет: This is an attempt to add it the remote-fs dependencies to a mount unit if the options change, like when the utab options are picked up after mountinfo

[systemd-devel] [PATCH v2 2/5] mount: check options as well as fstype for network mounts

2014-11-23 Thread Chris Leech
When creating a new mount unit after an event on /proc/self/mountinfo, check the mount options as well as the fstype to determine if this is a remote mount that requires network access. Signed-off-by: Chris Leech cle...@redhat.com --- src/core/mount.c | 21 - 1 file changed

[systemd-devel] [PATCH v2 5/5] mount: auto-detect iSCSI and FCoE as requiring network

2014-11-23 Thread Chris Leech
This adds auto detection for iSCSI and some FCoE drivers and treats mounts to file-systems on those devices as remote-fs. Signed-off-by: Chris Leech cle...@redhat.com --- src/core/mount.c | 168 +++ 1 file changed, 158 insertions(+), 10

[systemd-devel] [PATCH v2 0/5] mount unit handling improvments with libmount

2014-11-23 Thread Chris Leech
for building without libmount, which is now a hard build requirement. Added iSCSI and FCoE auto-detection. Chris Leech (5): mount: use libmount to enumerate /proc/self/mountinfo mount: check options as well as fstype for network mounts mount: monitor for utab changes with inotify mount: add

[systemd-devel] [PATCH v2 4/5] mount: add remote-fs dependencies if needed after change

2014-11-23 Thread Chris Leech
units with proper remote-fs dependencies when mounted with the _netdev option. Signed-off-by: Chris Leech cle...@redhat.com --- src/core/mount.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/core/mount.c b/src/core/mount.c index ef45115..513dcec 100644 --- a/src/core/mount.c

[systemd-devel] [PATCH v2 3/5] mount: monitor for utab changes with inotify

2014-11-23 Thread Chris Leech
source using inotify to watch for changes to utab. It only watches for IN_MOVED_TO events, matching libmount behavior of always overwriting this file using rename(2). This does add a second pass through the mount table parsing when utab is updated. Signed-off-by: Chris Leech cle...@redhat.com

[systemd-devel] [PATCH v2 1/5] mount: use libmount to enumerate /proc/self/mountinfo

2014-11-23 Thread Chris Leech
This lets libmount add in user options from /run/mount/utab, like _netdev which is needed to get proper ordering against remote-fs.target Signed-off-by: Chris Leech cle...@redhat.com --- .travis.yml | 2 +- Makefile.am | 4 +++- README | 1 + configure.ac | 10

Re: [systemd-devel] ExecStop IPC over same socket used for activation?

2015-02-12 Thread Chris Leech
On Wed, Feb 11, 2015 at 09:29:29PM +0100, Lennart Poettering wrote: Ineed, analysis seems correct. I now made this change: http://lists.freedesktop.org/archives/systemd-devel/2015-February/028058.html Didn't test it though, please test if this fixes things for you! Thanks Lennart, I ran a

[systemd-devel] ExecStop IPC over same socket used for activation?

2015-02-05 Thread Chris Leech
receives the message and exits, but is then restarted right away. This doesn't seem like too crazy of a way to shut things down, should the coordination between the service and the socket unit be waiting for for the ExecStop to complete before monitoring for socket activation again? - Chris Leech