All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michaelc-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org>
To: open-iscsi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Cc: Chris Leech <cleech-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	systemd-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	agrover-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Subject: Re: [RFC] iscsi unit files and helper script
Date: Tue, 11 Dec 2012 15:47:03 -0600	[thread overview]
Message-ID: <50C7A9D7.8080900@cs.wisc.edu> (raw)
In-Reply-To: <1355177316-25803-4-git-send-email-cleech-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

Thanks for working on this. Just one question. Is this patch for some
other package? How does it relate to the unit files in Tomasz's
patchset? He unit files with the same name.


On 12/10/2012 04:08 PM, Chris Leech wrote:
> 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.service	1969-12-31 16:00:00.000000000 -0800
> +++ b/iscsid.service	2012-12-10 13:38:38.643307001 -0800
> @@ -0,0 +1,9 @@
> +[Unit]
> +Description=Open-iSCSI
> +Documentation=man:iscsid(8) man:iscsiadm(8)
> +After=network.target NetworkManager-wait-online.service iscsiuio.service tgtd.service targetcli.service
> +
> +[Service]
> +Type=simple
> +ExecStart=/usr/sbin/iscsid -f -n
> +ExecStop=/sbin/iscsiadm -k 0 2
> diff -Naur a/iscsid.socket b/iscsid.socket
> --- a/iscsid.socket	1969-12-31 16:00:00.000000000 -0800
> +++ b/iscsid.socket	2012-12-10 13:38:38.643307001 -0800
> @@ -0,0 +1,9 @@
> +[Unit]
> +Description=Open-iSCSI iscsid Socket
> +Documentation=man:iscsid(8) man:iscsiadm(8)
> +
> +[Socket]
> +ListenStream=@ISCSIADM_ABSTRACT_NAMESPACE
> +
> +[Install]
> +WantedBy=sockets.target
> diff -Naur a/iscsi.service b/iscsi.service
> --- a/iscsi.service	1969-12-31 16:00:00.000000000 -0800
> +++ b/iscsi.service	2012-12-10 13:38:38.643307001 -0800
> @@ -0,0 +1,18 @@
> +[Unit]
> +Description=Login and scanning of iSCSI devices
> +Documentation=man:iscsiadm(8) man:iscsid(8)
> +#Requires=iscsid.service
> +#BindTo=iscsid.service
> +After=network.target NetworkManager-wait-online.service iscsid.service
> +ConditionPathExists=/etc/iscsi/initiatorname.iscsi
> +
> +[Service]
> +Type=oneshot
> +ExecStart=/usr/libexec/iscsi_mark_root_nodes
> +ExecStart=/sbin/iscsiadm -m node --loginall=automatic
> +ExecStop=/bin/sync
> +ExecStop=/sbin/iscsiadm -m node --logoutall=automatic
> +RemainAfterExit=true
> +
> +[Install]
> +WantedBy=remote-fs.target
> diff -Naur a/iscsiuio.service b/iscsiuio.service
> --- a/iscsiuio.service	1969-12-31 16:00:00.000000000 -0800
> +++ b/iscsiuio.service	2012-12-10 13:38:38.643307001 -0800
> @@ -0,0 +1,11 @@
> +[Unit]
> +Description=iSCSI UserSpace I/O driver
> +Documentation=man:iscsiuio(8)
> +Requires=iscsid.service
> +BindTo=iscsid.service
> +Before=iscsid.service
> +After=network.target NetworkManager-wait-online.service
> +
> +[Service]
> +Type=simple
> +ExecStart=/usr/sbin/iscsiuio -f
> diff -Naur a/iscsiuio.socket b/iscsiuio.socket
> --- a/iscsiuio.socket	1969-12-31 16:00:00.000000000 -0800
> +++ b/iscsiuio.socket	2012-12-10 13:38:38.643307001 -0800
> @@ -0,0 +1,9 @@
> +[Unit]
> +Description=Open-iSCSI iscsiuio
> +Documentation=man:iscsiuio(8)
> +
> +[Socket]
> +ListenStream=@ISCSID_UIP_ABSTRACT_NAMESPACE
> +
> +[Install]
> +WantedBy=sockets.target
> diff -Naur a/usr/libexec/iscsi_mark_root_nodes b/usr/libexec/iscsi_mark_root_nodes
> --- a/usr/libexec/iscsi_mark_root_nodes	1969-12-31 16:00:00.000000000 -0800
> +++ b/usr/libexec/iscsi_mark_root_nodes	2012-12-10 13:38:47.322082141 -0800
> @@ -0,0 +1,14 @@
> +#!/bin/bash
> +
> +ISCSIADM=/sbin/iscsiadm
> +SESSION_FILE=/run/initramfs/iscsi.sessions
> +
> +if [ ! -f $SESSION_FILE ] ; then
> +  exit 0
> +fi
> +
> +while read t num i target; do
> +  ip=${i%:*}
> +  $ISCSIADM -m node -p $ip -T $target -o update -n node.startup -v onboot
> +done < $SESSION_FILE
> +
> 

-- 
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To post to this group, send email to open-iscsi-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to open-iscsi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at http://groups.google.com/group/open-iscsi?hl=en.


  parent reply	other threads:[~2012-12-11 21:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-10 22:08 [RFC] iscsid / systemd / dracut integration effort Chris Leech
     [not found] ` <1355177316-25803-1-git-send-email-cleech-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-12-10 22:08   ` [RFC] iscsid: add --initrd option to set run from initrd hint for systemd Chris Leech
2012-12-10 22:08   ` [RFC] iscsiadm, iscsid: newroot command to survive switch_root Chris Leech
2012-12-10 22:08   ` [RFC] iscsi unit files and helper script Chris Leech
     [not found]     ` <1355177316-25803-4-git-send-email-cleech-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-12-11 21:47       ` Mike Christie [this message]
     [not found]         ` <50C7A9D7.8080900-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org>
2012-12-11 22:43           ` Chris Leech
2012-12-10 22:08   ` [RFC] dracut iscsi module: early attempt to launch iscsid from the initramfs Chris Leech
2012-12-10 23:56   ` [systemd-devel] [RFC] iscsid / systemd / dracut integration effort "Jóhann B. Guðmundsson"
     [not found]     ` <50C67697.7020208-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-12-11 23:26       ` Chris Leech
     [not found]         ` <20121211232646.GC5307-r8IHplWLGbA5tHQWs+pTeqPFFGjUI2lm2LY78lusg7I@public.gmane.org>
2012-12-12  0:46           ` "Jóhann B. Guðmundsson"
2012-12-12 20:45           ` Tomasz Torcz
     [not found]             ` <20121212204545.GA23313-bmXekecGUa3k6X4NQihNpw@public.gmane.org>
2012-12-13  0:45               ` Andy Grover
2013-09-23 17:33           ` The Lee-Man
     [not found]             ` <b993ef26-ea4e-4dbe-8d9a-d86ad50c9fbc-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2013-09-23 17:40               ` The Lee-Man
2013-10-01  2:24             ` Lennart Poettering
2012-12-14 19:01   ` Mike Christie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50C7A9D7.8080900@cs.wisc.edu \
    --to=michaelc-hcno3ddehluvc3sceru5cw@public.gmane.org \
    --cc=agrover-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=cleech-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=open-iscsi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=systemd-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.