all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Friedrich Weber <f.weber@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Mira Limbeck <m.limbeck@proxmox.com>
Subject: Re: [pve-devel] [PATCH storage v4] fix #957 iscsi: improve iscsi_test_portal logic
Date: Thu, 20 Mar 2025 11:48:41 +0100	[thread overview]
Message-ID: <34756381-1f1b-4208-8db6-ed0dfe4c5652@proxmox.com> (raw)
In-Reply-To: <82400f36-7792-4cc5-9dca-08b8e061b8b9@proxmox.com>

On 20/03/2025 11:15, Mira Limbeck wrote:
> [...]
>>
>>> +	# check session state instead if available
>>> +	my $sessions = iscsi_session($cache, $target);
>>> +	for my $session ($sessions->@*) {
>>> +	    next if $session->{portal} ne $portal;
>>> +	    return iscsi_test_session($session->{session_id});
>>
>> So if we have a session but it is not LOGGED_IN, we return 0.
>> I know this is what I suggested in my v3 comment, but now I'm not so
>> sure anymore. Couldn't it be the case that the session is broken for
>> some reason, but discovery would still works? In such a case, we would
>> now consider the portal offline. We could instead fall back to a TCP ping:
>> 	
>> 	my $state = iscsi_test_session($session->{session_id});
>> 	return $state if $state;
>>
>> Any opinions (from others)?
> After talking off-list about this, we do want to fall back to the
> tcp_ping if the session is not logged in. For discovery no session is
> needed. So even without a login, it might still be reachable via ping
> and a discovery possible.

Yeah, let's fall back to a tcp_ping if there is a session that is not
LOGGED_IN. Sorry for the confusion with my earlier suggestion on v3.

One minor thing I forgot -- the commit message might benefit from a few
more details:

- mention that when we test connectivity of a portal, we now first check
whether a logged-in session to that portal is already present and fall
back to the TCP ping only if there is no such session
- acknowledge that this is not going to remove TCP pings (and thus the
log messages on the target side) completely -- TCP pings are still done
e.g. if there is no active session yet.

And finally, the first line is missing a colon after "fix #957", but
this is a really minor thing now -- we can also fix when applying, just
mentioning it here for completeness.

@Victor, if you send a v5 I'll do some final testing on that version
and, if everything looks good, add my Tested-by/Reviewed-by trailers there.

[1]
https://pve.proxmox.com/wiki/Developer_Documentation#Commits_and_Commit_Messages


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


      reply	other threads:[~2025-03-20 10:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-15 12:08 Victor Seva via pve-devel
2025-03-18 16:11 ` Friedrich Weber
2025-03-20 10:15   ` Mira Limbeck
2025-03-20 10:48     ` Friedrich Weber [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=34756381-1f1b-4208-8db6-ed0dfe4c5652@proxmox.com \
    --to=f.weber@proxmox.com \
    --cc=m.limbeck@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