linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/9] Make iscsid-kernel communications namespace-aware
@ 2023-02-08 17:40 Lee Duncan
  2023-02-08 17:40 ` [RFC PATCH 1/9] iscsi: create per-net iscsi netlink kernel sockets Lee Duncan
                   ` (10 more replies)
  0 siblings, 11 replies; 42+ messages in thread
From: Lee Duncan @ 2023-02-08 17:40 UTC (permalink / raw)
  To: linux-scsi, open-iscsi, netdev; +Cc: Lee Duncan

From: Lee Duncan <lduncan@suse.com>

This is a request for comment on a set of patches that
modify the kernel iSCSI initiator communications so that
they are namespace-aware. The goal is to allow multiple
iSCSI daemon (iscsid) to run at once as long as they
are in separate namespaces, and so that iscsid can
run in containers.

Comments and suggestions are more than welcome. I do not
expect that this code is production-ready yet, and
networking isn't my strongest suit (yet).

These patches were originally posted in 2015 by Chris
Leech. There were some issues at the time about how
to handle namespaces going away. I hope to address
any issues raised with this patchset and then
to merge these changes upstream to address working
in working in containers.

My contribution thus far has been to update these patches
to work with the current upstream kernel.

Chris Leech/Lee Duncan (9):
  iscsi: create per-net iscsi netlink kernel sockets
  iscsi: associate endpoints with a host
  iscsi: sysfs filtering by network namespace
  iscsi: make all iSCSI netlink multicast namespace aware
  iscsi: set netns for iscsi_tcp hosts
  iscsi: check net namespace for all iscsi lookup
  iscsi: convert flashnode devices from bus to class
  iscsi: rename iscsi_bus_flash_* to iscsi_flash_*
  iscsi: filter flashnode sysfs by net namespace

 drivers/infiniband/ulp/iser/iscsi_iser.c |   7 +-
 drivers/scsi/be2iscsi/be_iscsi.c         |   6 +-
 drivers/scsi/bnx2i/bnx2i_iscsi.c         |   6 +-
 drivers/scsi/cxgbi/libcxgbi.c            |   6 +-
 drivers/scsi/iscsi_tcp.c                 |   7 +
 drivers/scsi/qedi/qedi_iscsi.c           |   6 +-
 drivers/scsi/qla4xxx/ql4_os.c            |  64 +--
 drivers/scsi/scsi_transport_iscsi.c      | 625 ++++++++++++++++-------
 include/scsi/scsi_transport_iscsi.h      |  63 ++-
 9 files changed, 537 insertions(+), 253 deletions(-)

-- 
2.39.1


^ permalink raw reply	[flat|nested] 42+ messages in thread
* [PATCH v2 00/11] Make iscsid-kernel communications namespace-aware
@ 2023-05-06 23:29 Chris Leech
  2023-05-06 23:29 ` [PATCH 11/11] iscsi: force destroy sesions when a network namespace exits Chris Leech
  0 siblings, 1 reply; 42+ messages in thread
From: Chris Leech @ 2023-05-06 23:29 UTC (permalink / raw)
  To: Lee Duncan, linux-scsi, open-iscsi, netdev; +Cc: Chris Leech

This set of patches modifies the kernel iSCSI initiator communications
so that they are namespace-aware. The goal is to allow multiple iSCSI
daemon (iscsid) to run at once as long as they are in separate
namespaces, and so that iscsid can run in containers.

Container runtime environments seem to want to containerize their own
components, and there have been complaints about the need to run iscsid
from the host network namespace. There are still priviledged
capabilities needed for iscsid, but these changes address the namespace
issue.

I've tested with iscsi_tcp and iser over rxe with an unmodified iscsid
running in a podman container.

Note that with iscsi_tcp, the connected socket will keep the network
namespace alive after container exit. The namespace will exit once the
connection terminates, and I'd recommend running with a iSCSI
noop_out_timeout set to error out the connection after the routing has
been removed.

v2: Changes from Lee's last RFC posting
- Minor changes to patches 2 & 3 to not break iSER

- Large changes in patch 6, merging in patches posted to the previous
  discussion. Use of current when setting the netns on an iscsi_tcp
  session has been removed, instead an unbound (from a host) session
  creation with an explicit netns interface has been added. Similar
  changes for iSER endpoints have been added, and iSER support for
  non-default network namespaces was enabled.

- The addition of patches 10 & 11 from the previous discussions to force
  removal of sessions on namespace exit.

Chris Leech, Lee Duncan (11):
  iscsi: create per-net iscsi netlink kernel sockets
  iscsi: associate endpoints with a host
  iscsi: sysfs filtering by network namespace
  iscsi: make all iSCSI netlink multicast namespace aware
  iscsi: check net namespace for all iscsi lookup
  iscsi: set netns for tcp and iser hosts
  iscsi: convert flashnode devices from bus to class
  iscsi: rename iscsi_bus_flash_* to iscsi_flash_*
  iscsi: filter flashnode sysfs by net namespace
  iscsi: make session and connection lists per-net
  iscsi: force destroy sesions when a network namespace exits

 drivers/infiniband/ulp/iser/iscsi_iser.c |  61 +-
 drivers/scsi/be2iscsi/be_iscsi.c         |   6 +-
 drivers/scsi/bnx2i/bnx2i_iscsi.c         |   6 +-
 drivers/scsi/cxgbi/libcxgbi.c            |   6 +-
 drivers/scsi/iscsi_tcp.c                 |  15 +-
 drivers/scsi/libiscsi.c                  |  16 +
 drivers/scsi/qedi/qedi_iscsi.c           |   6 +-
 drivers/scsi/qla4xxx/ql4_os.c            |  64 +-
 drivers/scsi/scsi_transport_iscsi.c      | 790 ++++++++++++++++-------
 include/scsi/libiscsi.h                  |   4 +
 include/scsi/scsi_transport_iscsi.h      |  75 ++-
 11 files changed, 725 insertions(+), 324 deletions(-)

-- 
2.39.2


^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2023-05-10 20:15 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-08 17:40 [RFC 0/9] Make iscsid-kernel communications namespace-aware Lee Duncan
2023-02-08 17:40 ` [RFC PATCH 1/9] iscsi: create per-net iscsi netlink kernel sockets Lee Duncan
2023-03-14 16:21   ` Hannes Reinecke
2023-02-08 17:40 ` [RFC PATCH 2/9] iscsi: associate endpoints with a host Lee Duncan
2023-03-14 16:23   ` Hannes Reinecke
2023-03-17 21:42     ` Lee Duncan
2023-04-12  2:31     ` Chris Leech
2023-04-20 16:42   ` Chris Leech
2023-04-21  5:05     ` Chris Leech
2023-04-21  5:05       ` [PATCH] iscsi iser: fix iser, allow virtual endpoints again Chris Leech
2023-04-21  5:05       ` [PATCH] iscsi iser: direct network namespace support for endpoints Chris Leech
2023-04-21  5:05       ` [PATCH] iscsi iser: enable network namespace awareness in iser Chris Leech
2023-02-08 17:40 ` [RFC PATCH 3/9] iscsi: sysfs filtering by network namespace Lee Duncan
2023-03-14 16:24   ` Hannes Reinecke
2023-02-08 17:40 ` [RFC PATCH 4/9] iscsi: make all iSCSI netlink multicast namespace aware Lee Duncan
2023-03-14 16:27   ` Hannes Reinecke
2023-04-10 19:10     ` Chris Leech
2023-04-11  6:22       ` Hannes Reinecke
2023-04-10 19:10     ` [PATCH 10/11] iscsi: make session and connection lists per-net Chris Leech
2023-04-11  6:17       ` Hannes Reinecke
2023-04-10 19:10     ` [PATCH 11/11] iscsi: force destroy sesions when a network namespace exits Chris Leech
2023-04-11  6:21       ` Hannes Reinecke
2023-04-11 18:19         ` Chris Leech
2023-04-12  6:02           ` Hannes Reinecke
2023-02-08 17:40 ` [RFC PATCH 5/9] iscsi: set netns for iscsi_tcp hosts Lee Duncan
2023-03-14 16:29   ` Hannes Reinecke
2023-04-11  0:21     ` Chris Leech
2023-04-11  6:58       ` Hannes Reinecke
2023-04-11 18:03         ` Chris Leech
2023-02-08 17:40 ` [RFC PATCH 6/9] iscsi: check net namespace for all iscsi lookup Lee Duncan
2023-03-14 17:44   ` Hannes Reinecke
2023-02-08 17:40 ` [RFC PATCH 7/9] iscsi: convert flashnode devices from bus to class Lee Duncan
2023-03-14 17:45   ` Hannes Reinecke
2023-02-08 17:40 ` [RFC PATCH 8/9] iscsi: rename iscsi_bus_flash_* to iscsi_flash_* Lee Duncan
2023-03-14 17:46   ` Hannes Reinecke
2023-02-08 17:40 ` [RFC PATCH 9/9] iscsi: filter flashnode sysfs by net namespace Lee Duncan
2023-03-14 17:47   ` Hannes Reinecke
2023-02-08 19:23 ` [RFC 0/9] Make iscsid-kernel communications namespace-aware (resent) Lee Duncan
2023-03-14 16:20 ` [RFC 0/9] Make iscsid-kernel communications namespace-aware Hannes Reinecke
  -- strict thread matches above, loose matches on Subject: below --
2023-05-06 23:29 [PATCH v2 00/11] " Chris Leech
2023-05-06 23:29 ` [PATCH 11/11] iscsi: force destroy sesions when a network namespace exits Chris Leech
2023-05-10 20:09   ` michael.christie
2023-05-10 20:14     ` michael.christie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).