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] iscsi: fix activation of second iSCSI storage on other cluster nodes
Date: Mon, 11 Nov 2024 22:18:05 +0100 [thread overview]
Message-ID: <d3529a04-64bc-44d1-98c5-5103b4217e6c@proxmox.com> (raw)
In-Reply-To: <20241105163744.84687-1-f.weber@proxmox.com>
Am 05.11.24 um 17:37 schrieb Friedrich Weber:
> Assume a cluster that already has an iSCSI storage A configured. After
> adding a new iSCSI storage B with a different target on node 1, B will
> only become active on node 1, not on the other nodes. On other nodes,
> pvestatd logs 'storage B is not online'. The storage does not become
> available even after a reboot. A workaround is to manually perform
> iSCSI discovery against B's targets on the other nodes once.
>
> This happens because the connectivity check of the iSCSI plugin on
> node B does not correctly handle the case that iscsiadm already knows
> portals (i.e., A's portals) but not B's portals.
>
> The connectivity check calls `iscsi_portals` to determine the portals
> to ping, which calls `iscsiadm -m node` to query all known portals,
> and extracts all portals to the storage's target. If the iscsiadm
> command fails, `iscsi_portals` returns the portal given in the storage
> config. This works as expected if the storage is the first iSCSI
> storage, because then iscsiadm does not know any portals and thus
> exits with code 21.
>
> However, since there already is an iSCSI storage A, iscsiadm exits
> cleanly but its output does not contain any portals for B's target.
> Hence, `iscsi_portals` returns an empty array of portals, so the
> connectivity check fails and node 2 never performs discovery for B.
>
> To fix this, let `iscsi_portals` also return the portal from B's
> storage config if iscsiadm exited cleanly but its output contained no
> matching portal.
>
> Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
> ---
> src/PVE/Storage/ISCSIPlugin.pm | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
>
applied, thanks!
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
prev parent reply other threads:[~2024-11-11 21:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-05 16:37 [pve-devel] " Friedrich Weber
2024-11-11 21:18 ` 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=d3529a04-64bc-44d1-98c5-5103b4217e6c@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox