all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Friedrich Weber <f.weber@proxmox.com>
Subject: [pve-devel] applied: [PATCH storage v2] iscsi: disable Open-iSCSI login retries
Date: Mon, 14 Oct 2024 10:19:19 +0200	[thread overview]
Message-ID: <d2a7072a-e0a7-429b-9534-267666d93f57@proxmox.com> (raw)
In-Reply-To: <20241011125821.58224-1-f.weber@proxmox.com>

 Am 11/10/2024 um 14:58 schrieb Friedrich Weber:
> Since 90c1b10 ("fix #254: iscsi: add support for multipath targets"),
> iSCSI storage activation checks whether a session exists for each
> discovered portal. If there is a discovered portal without a session,
> it performs a discovery and login in the hope of establishing a
> session to the portal. If the portal is unreachable when trying to log
> in, Open-iSCSI's default behavior is to retry for up to 2 minutes, as
> explained in /etc/iscsi/iscid.conf:
> 
>> # The default node.session.initial_login_retry_max is 8 and
>> # node.conn[0].timeo.login_timeout is 15 so we have:
>> #
>> # node.conn[0].timeo.login_timeout * \
>> node.session.initial_login_retry_max = 120s
> 
> If pvestatd is activating the storage, it will be blocked during that
> time, which is undesirable. This is particularly unfortunate if the
> target announces portals that the host permanently cannot reach. In
> that case, every pvestatd iteration will take 2 minutes. While it can
> be argued that such setups are misconfigured, it is still desirable to
> keep the fallout of that misconfiguration as low as possible.
> 
> In order to reduce the time Open-iSCSI tries to log in, instruct
> Open-ISCSI to not perform login retries for that target. For this, set
> node.session.initial_login_retry_max for the target to 0. This setting
> is stored in Open-iSCSI's records under /etc/iscsi/nodes. As these
> records are overwritten with the defaults from /etc/iscsi/iscsid.conf
> on discovery, the setting needs to be applied after discovery.
> 
> With this setting, one login attempt should take at most 15 seconds.
> This is still higher than pvestatd's iteration time of 10 seconds, but
> more tolerable. Logins will still be continuously retried by pvestatd
> in every iteration until there is a session to each discovered portal.
> 
> Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
> Tested-by: Mira Limbeck <m.limbeck@proxmox.com>
> Reviewed-by: Mira Limbeck <m.limbeck@proxmox.com>
> ---
> 
> Notes:
>     changes since v1:
>     - dropped "to avoid blocking pvestatd" from commit title, as pvestatd
>       will still be blocked, just for a shorter time
>     - changed formatting
>     - added Mira's R-b and T-b (thx!). Took the liberty to include them
>       although the code, strictly speaking, changed
>     
>     v1: https://lore.proxmox.com/pve-devel/20241011093744.25545-1-f.weber@proxmox.com/
> 
>  src/PVE/Storage/ISCSIPlugin.pm | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
>

applied, thanks!

FWIW, for such run command call where the CMD does not need to get arguments
added on some conditional check you could avoid the intermediate variable, i.e.:

run_command([
    $ISCSIADM,
    ...,
]);

but no hard feelings, I kept it as is, this just stuck out to me.


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


      parent reply	other threads:[~2024-10-14  8:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-11 12:58 [pve-devel] " Friedrich Weber
2024-10-11 13:49 ` Mira Limbeck
2024-10-14  8:19 ` Thomas Lamprecht [this message]

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=d2a7072a-e0a7-429b-9534-267666d93f57@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=f.weber@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal