Fix KeyError: port in portal IP conflict detection
_ip_set() used (ip, port) tuples for conflict matching. Since port is no longer present in listen entries, key on IP only. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -316,7 +316,7 @@ async def _migrate_iscsi_portals(
|
||||
log.error(msg); summary.errors.append(msg); return
|
||||
|
||||
def _ip_set(p: dict) -> frozenset:
|
||||
return frozenset((l["ip"], l["port"]) for l in p.get("listen", []))
|
||||
return frozenset(l["ip"] for l in p.get("listen", []))
|
||||
|
||||
existing_ip_sets = [(_ip_set(p), p["id"]) for p in existing]
|
||||
log.info(" Destination has %d existing portal(s).", len(existing))
|
||||
|
||||
Reference in New Issue
Block a user