Bug#932799: open-iscsi: Initiator doesn't login and connect on boot
On Thu, 2019-08-01 at 16:49 +0300, Dokuchaev Ivan wrote: > There's also a ens19 interface, but it's management-only, and only > has > IP address assigned, no static routes/bonds/etc. Physically it's a VM > on > PVE hypervisor, all connected via virtual bridge to a router, and the > target is located on a MS Windows Server by another admin, and iSCSI > performs as expected on other initiators like the ones on Synology > DSM > and vmWare ESXi 6.x. > > Journalctl shows that iscsid has been started (iscsi.service unit is > not > present): > > jul 24 16:19:19 nfs-server iscsid[372]: iSCSI logger with pid=375 > started! > jul 24 16:19:19 nfs-server iscsid[375]: iSCSI daemon with pid=376 > started! > > But LUN is not mounted, requiring manual intervention with "iscsiadm > -m > node -L all && systemctl restart iscsid nfs-kernel-server" in order > to > drive to reappear. > It is a stacked setup so it is hard to say where may lie the problem. But the default Debian iSCSI setup works good. root@debian-btrfs:~# systemctl status iscsi ● open-iscsi.service - Login to default iSCSI targets Loaded: loaded (/lib/systemd/system/open-iscsi.service; enabled; vendor preset: enabled) Active: active (exited) since Thu 2019-08-01 20:50:41 IST; 2min 19s ago Docs: man:iscsiadm(8) man:iscsid(8) Process: 407 ExecStartPre=/bin/systemctl --quiet is-active iscsid.service (code=exited, status=0/SUCCESS) Process: 408 ExecStart=/sbin/iscsiadm -m node --loginall=automatic (code=exited, status=0/SUCCESS) Process: 436 ExecStart=/lib/open-iscsi/activate-storage.sh (code=exited, status=0/SUCCESS) Main PID: 436 (code=exited, status=0/SUCCESS) Aug 01 20:50:15 debian-btrfs systemd[1]: Starting Login to default iSCSI targets... Aug 01 20:50:41 debian-btrfs iscsiadm[408]: Logging in to [iface: default, target: iqn.2003-01.org.linux-iscsi.debian.x8664, portal: 172.16.20.40, Aug 01 20:50:41 debian-btrfs iscsiadm[408]: Logging in to [iface: default, target: iqn.2003-01.org.linux-iscsi.debian.x8664, portal: 172.16.20.41, Aug 01 20:50:41 debian-btrfs iscsiadm[408]: Logging in to [iface: default, target: iqn.2003-01.org.linux-iscsi.debian.x8664, portal: 172.16.20.42, Aug 01 20:50:41 debian-btrfs iscsiadm[408]: Logging in to [iface: default, target: iqn.2003-01.org.linux-iscsi.debian.x8664, portal: 172.16.20.43, Aug 01 20:50:41 debian-btrfs iscsiadm[408]: Login to [iface: default, target: iqn.2003-01.org.linux-iscsi.debian.x8664, portal: 172.16.20.40,3260] Aug 01 20:50:41 debian-btrfs iscsiadm[408]: Login to [iface: default, target: iqn.2003-01.org.linux-iscsi.debian.x8664, portal: 172.16.20.41,3260] Aug 01 20:50:41 debian-btrfs iscsiadm[408]: Login to [iface: default, target: iqn.2003-01.org.linux-iscsi.debian.x8664, portal: 172.16.20.42,3260] Aug 01 20:50:41 debian-btrfs iscsiadm[408]: Login to [iface: default, target: iqn.2003-01.org.linux-iscsi.debian.x8664, portal: 172.16.20.43,3260] Aug 01 20:50:41 debian-btrfs systemd[1]: Started Login to default iSCSI targets. root@debian-btrfs:~# systemctl status iscsid ● iscsid.service - iSCSI initiator daemon (iscsid) Loaded: loaded (/lib/systemd/system/iscsid.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2019-08-01 20:50:15 IST; 2min 53s ago Docs: man:iscsid(8) Process: 400 ExecStartPre=/lib/open-iscsi/startup-checks.sh (code=exited, status=0/SUCCESS) Process: 403 ExecStart=/sbin/iscsid (code=exited, status=0/SUCCESS) Main PID: 405 (iscsid) Tasks: 2 (limit: 2353) Memory: 4.9M CGroup: /system.slice/iscsid.service ├─404 /sbin/iscsid └─405 /sbin/iscsid Aug 01 20:50:15 debian-btrfs systemd[1]: Starting iSCSI initiator daemon (iscsid)... Aug 01 20:50:15 debian-btrfs iscsid[403]: iSCSI logger with pid=404 started! Aug 01 20:50:15 debian-btrfs systemd[1]: Started iSCSI initiator daemon (iscsid). Aug 01 20:50:16 debian-btrfs iscsid[404]: iSCSI daemon with pid=405 started! Aug 01 20:50:41 debian-btrfs iscsid[404]: Connection2:0 to [target: iqn.2003-01.org.linux-iscsi.debian.x8664, portal: 172.16.20.41,3260] through [ Aug 01 20:50:41 debian-btrfs iscsid[404]: Connection1:0 to [target: iqn.2003-01.org.linux-iscsi.debian.x8664, portal: 172.16.20.40,3260] through [ Aug 01 20:50:41 debian-btrfs iscsid[404]: Connection4:0 to [target: iqn.2003-01.org.linux-iscsi.debian.x8664, portal: 172.16.20.43,3260] through [ Aug 01 20:50:41 debian-btrfs iscsid[404]: Connection3:0 to [target: iqn.2003-01.org.linux-iscsi.debian.x8664, portal: 172.16.20.42,3260] through [ > Configuration files haven't changed since initial bugreport, both > iscsid.conf and default (inside /etc/iscsi/nodes/TARGETNAME/ADDRESS) > have 'node.startup = automatic' and 'node.conn[0].startup = > automatic' > values in them. > > I don't know it it's related, but I can't simply reboot the service > with > an active iSCSI portal login, with a strange error: > > connection1:0: ping timeout of 5 secs expired, recv timeout 5, last >
Bug#932799: open-iscsi: Initiator doesn't login and connect on boot
-- Updated System Information: Debian Release: 10.0 APT prefers proposed-updates APT policy: (500, 'proposed-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 4.19.0-5-amd64 (SMP w/1 CPU core) Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8), LANGUAGE=ru_RU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Package version: open-iscsi/stable,now 2.0.874-7.1 amd64 [installed] Versions of packages open-iscsi depends on: ii debconf [debconf-2.0] 1.5.71 ii libc6 2.28-10 ii libisns0 0.97-3 ii libmount1 2.33.1-0.1 ii lsb-base 10.2019051400 ii udev 241-5 Versions of packages open-iscsi recommends: ii busybox 1:1.30.1-4 I've managed to pull the service for maintenance, and upgraded it to Debian 10. So far the issue still exists, so it's not only related to oldstable release. Network setup is fairly trivial: /etc/network/interfaces: source /etc/network/interfaces.d/* auto lo iface lo inet loopback /etc/network/interfaces.d/ens18: auto ens18 iface ens18 inet static address 192.168.1.3/24 gateway 192.168.1.1 There's also a ens19 interface, but it's management-only, and only has IP address assigned, no static routes/bonds/etc. Physically it's a VM on PVE hypervisor, all connected via virtual bridge to a router, and the target is located on a MS Windows Server by another admin, and iSCSI performs as expected on other initiators like the ones on Synology DSM and vmWare ESXi 6.x. Journalctl shows that iscsid has been started (iscsi.service unit is not present): jul 24 16:19:19 nfs-server iscsid[372]: iSCSI logger with pid=375 started! jul 24 16:19:19 nfs-server iscsid[375]: iSCSI daemon with pid=376 started! But LUN is not mounted, requiring manual intervention with "iscsiadm -m node -L all && systemctl restart iscsid nfs-kernel-server" in order to drive to reappear. Configuration files haven't changed since initial bugreport, both iscsid.conf and default (inside /etc/iscsi/nodes/TARGETNAME/ADDRESS) have 'node.startup = automatic' and 'node.conn[0].startup = automatic' values in them. I don't know it it's related, but I can't simply reboot the service with an active iSCSI portal login, with a strange error: connection1:0: ping timeout of 5 secs expired, recv timeout 5, last rx 4355513531, last ping 4355514784, now 4355516096 connection1:0: detected conn error (1022) Shouldn't systemd take care of logout from the portal, when the unit is stopping? pEpkey.asc Description: application/pgp-keys
Bug#932799: open-iscsi: Initiator doesn't login and connect on boot
Control: tag -1 +moreinfo On Tue, 2019-07-23 at 15:32 +0300, Dokuchaev Ivan wrote: > After installing and configuring the targets, specifying node.startup > = > automatic doesn't get accounted, resulting in fatal service > disruption > and requiring manual intervention. > Solution described in > https://serverfault.com/questions/246572/open-iscsi-does-not-login-into-targets-on-boot > no longer applies, since Debian has moved > on to Systemd, and /etc/network/if-up.d/open-iscsi script no longer > exists. You need to provide more information. * Does the iscsi/iscsid daemon service not start * Does the iscsi automatic loging not occur The integration with systemd may have nothing to do with the issue you are facing. Whatever the case, there will be logs. Please go through them and share the relevant bits for this bug. -- Ritesh Raj Sarraf | http://people.debian.org/~rrs Debian - The Universal Operating System signature.asc Description: This is a digitally signed message part
Bug#932799: open-iscsi: Initiator doesn't login and connect on boot
Subject: open-iscsi: Initiator doesn't login and connect on boot Package: open-iscsi Version: 2.0.874-3~deb9u1 Severity: important After installing and configuring the targets, specifying node.startup = automatic doesn't get accounted, resulting in fatal service disruption and requiring manual intervention. Solution described in https://serverfault.com/questions/246572/open-iscsi-does-not-login-into-targets-on-boot no longer applies, since Debian has moved on to Systemd, and /etc/network/if-up.d/open-iscsi script no longer exists. -- System Information: Debian Release: 9.9 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 4.9.0-9-amd64 (SMP w/1 CPU core) Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8), LANGUAGE=ru_RU.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages open-iscsi depends on: ii debconf [debconf-2.0] 1.5.61 ii init-system-helpers 1.48 ii libc6 2.24-11+deb9u4 ii libisns0 0.97-2 ii libmount1 2.29.2-1+deb9u1 ii lsb-base 9.20161125 ii udev 232-25+deb9u11 Versions of packages open-iscsi recommends: ii busybox 1:1.22.0-19+b3 open-iscsi suggests no packages. -- Configuration Files: /etc/iscsi/iscsid.conf changed: iscsid.startup = /sbin/iscsid node.startup = automatic node.leading_login = Yes node.session.timeo.replacement_timeout = 120 node.conn[0].timeo.login_timeout = 15 node.conn[0].timeo.logout_timeout = 15 node.conn[0].timeo.noop_out_interval = 5 node.conn[0].timeo.noop_out_timeout = 5 node.session.err_timeo.abort_timeout = 15 node.session.err_timeo.lu_reset_timeout = 30 node.session.err_timeo.tgt_reset_timeout = 30 node.session.initial_login_retry_max = 8 node.session.cmds_max = 128 node.session.queue_depth = 64 node.session.xmit_thread_priority = -20 node.session.iscsi.InitialR2T = No node.session.iscsi.ImmediateData = Yes node.session.iscsi.FirstBurstLength = 262144 node.session.iscsi.MaxBurstLength = 16776192 node.conn[0].iscsi.MaxRecvDataSegmentLength = 262144 node.conn[0].iscsi.MaxXmitDataSegmentLength = 0 discovery.sendtargets.iscsi.MaxRecvDataSegmentLength = 32768 node.session.nr_sessions = 1 node.session.iscsi.FastAbort = Yes /etc/iscsi/send_targets/192.168.1.2\,3260/iqn.1991-05.com.microsoft\:win-target-hv-target\,192.168.1.2\,3260\,1\,default/default: # BEGIN RECORD 2.0-874 node.name = iqn.1991-05.com.microsoft:win-target-hv-target node.tpgt = 1 node.startup = automatic node.leading_login = No iface.iscsi_ifacename = default iface.transport_name = tcp iface.vlan_id = 0 iface.vlan_priority = 0 iface.iface_num = 0 iface.mtu = 0 iface.port = 0 iface.tos = 0 iface.ttl = 0 iface.tcp_wsf = 0 iface.tcp_timer_scale = 0 iface.def_task_mgmt_timeout = 0 iface.erl = 0 iface.max_receive_data_len = 0 iface.first_burst_len = 0 iface.max_outstanding_r2t = 0 iface.max_burst_len = 0 node.discovery_address = 192.168.1.2 node.discovery_port = 3260 node.discovery_type = send_targets node.session.initial_cmdsn = 0 node.session.initial_login_retry_max = 8 node.session.xmit_thread_priority = -20 node.session.cmds_max = 128 node.session.queue_depth = 32 node.session.nr_sessions = 1 node.session.auth.authmethod = None node.session.timeo.replacement_timeout = 120 node.session.err_timeo.abort_timeout = 15 node.session.err_timeo.lu_reset_timeout = 30 node.session.err_timeo.tgt_reset_timeout = 30 node.session.err_timeo.host_reset_timeout = 60 node.session.iscsi.FastAbort = Yes node.session.iscsi.InitialR2T = No node.session.iscsi.ImmediateData = Yes node.session.iscsi.FirstBurstLength = 262144 node.session.iscsi.MaxBurstLength = 16776192 node.session.iscsi.DefaultTime2Retain = 0 node.session.iscsi.DefaultTime2Wait = 2 node.session.iscsi.MaxConnections = 1 node.session.iscsi.MaxOutstandingR2T = 1 node.session.iscsi.ERL = 0 node.conn[0].address = 192.168.1.2 node.conn[0].port = 3260 node.conn[0].startup = manual node.conn[0].tcp.window_size = 524288 node.conn[0].tcp.type_of_service = 0 node.conn[0].timeo.logout_timeout = 15 node.conn[0].timeo.login_timeout = 15 node.conn[0].timeo.auth_timeout = 45 node.conn[0].timeo.noop_out_interval = 5 node.conn[0].timeo.noop_out_timeout = 5 node.conn[0].iscsi.MaxXmitDataSegmentLength = 0 node.conn[0].iscsi.MaxRecvDataSegmentLength = 262144 node.conn[0].iscsi.HeaderDigest = None node.conn[0].iscsi.DataDigest = None node.conn[0].iscsi.IFMarker = No node.conn[0].iscsi.OFMarker = No # END RECORD -- debconf information: open-iscsi/downgrade_and_break_system: open-iscsi/upgrade_recovery_error: open-iscsi/upgrade_even_with_failed_sessions: open-iscsi/remove_even_with_active_sessions: pEpkey.asc Description: application/pgp-keys