[Bug 1802354] Re: iscsid does not run if there are only initramfs initiated targets

Scott Moser ssmoser2+ubuntu at gmail.com
Fri Nov 9 02:19:59 UTC 2018


@Steve,

That feels overly indirect.
If open-iscsi.service (or anything) knows that iscsid should be running,
then why be sly?

Thats essentially what we were trying to do, and in some cases it didn't
work.  Starting a persistent daemon by requesting to list the current
sessions seems like an arbitrary side-effect.

fwiw, in my testing here 'iscsiadm -m session -s' ends up connecting to
the socket (thus starting the service) and writing:
  iscsiadm: Could not execute operation on all sessions: session not found
and then exiting 2.
That is all working "as designed".

If we want to start the service, or make sure that its running. It seems
better just to start the service.  If we want to do that by the indirect
mechanism of connecting to a socket, then I suggest we do *that* directly
like in 'connect-abstract-socket.py':

  #!/usr/bin/python3
  from socket import socket, AF_UNIX, SOCK_STREAM
  import sys
  name = "ISCSIADM_ABSTRACT_NAMESPACE" if len(sys.argv) < 2 else sys.argv[1]
  print("Connecting to @%s" % name)
  socket(AF_UNIX, SOCK_STREAM).connect(('\0' + name))
  print("Connected to @%s" % name)
On Thu, Nov 8, 2018 at 6:20 PM Steve Langasek
<steve.langasek at canonical.com> wrote:
>
> Instead of manually invoking systemctl here which seems like an
> abstraction violation to me, I would suggest that open-iscsi.service
> should issue an iscsiadm command that talks to the socket and triggers
> the daemon to be started.
>
> In effect, '/sbin/iscsiadm -m node --loginall=automatic' already does
> this but only for the case that /etc/iscsi/nodes is non-empty.
>
> I would suggest 'iscsiadm -m session -s'.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1802354
>
> Title:
>   iscsid does not run if there are only initramfs initiated targets
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/open-iscsi/+bug/1802354/+subscriptions

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to open-iscsi in Ubuntu.
https://bugs.launchpad.net/bugs/1802354

Title:
  iscsid does not run if there are only initramfs initiated targets

Status in open-iscsi package in Ubuntu:
  Confirmed

Bug description:
  It was reported that after the changes made in bug 1755858, the iscsid
  service was not running when initramfs (via iscsi_* params or iBft)
  set up an iscsi mount.

  This seems to not be a problem until there is a restart of the iscsi
  *host* service or some other hiccup.  Thus, in normal testing you will
  not see this issue.

  --
  Related bugs:
   * bug 1755858: iscsid autostarts on all servers when it has nothing to do.

  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: open-iscsi 2.0.874-5ubuntu2.3 [modified: lib/systemd/system/open-iscsi.service]
  ProcVersionSignature: Ubuntu 4.15.0-36.39-generic 4.15.18
  Uname: Linux 4.15.0-36-generic x86_64
  ApportVersion: 2.20.9-0ubuntu7.4
  Architecture: amd64
  Date: Thu Nov  8 17:42:46 2018
  ProcEnviron:
   TERM=screen.xterm-256color
   PATH=(custom, no user)
   LANG=C.UTF-8
   SHELL=/bin/bash
  SourcePackage: open-iscsi
  UpgradeStatus: No upgrade log present (probably fresh install)
  mtime.conffile..etc.iscsi.iscsid.conf: 2018-10-12T16:51:00.187144

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/open-iscsi/+bug/1802354/+subscriptions



More information about the foundations-bugs mailing list