Fix discovery duplicate
This commit is contained in:
@@ -33,7 +33,6 @@ RELEASES_DIR="${RELEASES_DIR:-/releases}"
|
|||||||
TADDR="${TARGET_ADDR:-0.0.0.0}"
|
TADDR="${TARGET_ADDR:-0.0.0.0}"
|
||||||
TPORT="${TARGET_PORT:-4420}"
|
TPORT="${TARGET_PORT:-4420}"
|
||||||
SUBNQN_BASE="${SUBNQN_BASE:-nqn.2026-06.org.example.fleet:rootfs}"
|
SUBNQN_BASE="${SUBNQN_BASE:-nqn.2026-06.org.example.fleet:rootfs}"
|
||||||
DISCOVERY_NQN="nqn.2014-08.org.nvmexpress.discovery"
|
|
||||||
# Legacy fixed namespace UUIDs (pre per-version-UUID builds baked these into the
|
# Legacy fixed namespace UUIDs (pre per-version-UUID builds baked these into the
|
||||||
# UKI cmdline). Used as a fallback when verity.json lacks the per-version pair.
|
# UKI cmdline). Used as a fallback when verity.json lacks the per-version pair.
|
||||||
LEGACY_DATA_UUID="f1ee7000-0000-4000-8000-000000000001"
|
LEGACY_DATA_UUID="f1ee7000-0000-4000-8000-000000000001"
|
||||||
@@ -148,11 +147,12 @@ cmd_add() {
|
|||||||
rpc nvmf_subsystem_add_ns "$nqn" "rootfs_$s" -u "$du"
|
rpc nvmf_subsystem_add_ns "$nqn" "rootfs_$s" -u "$du"
|
||||||
rpc nvmf_subsystem_add_ns "$nqn" "roothash_$s" -u "$hu"
|
rpc nvmf_subsystem_add_ns "$nqn" "roothash_$s" -u "$hu"
|
||||||
rpc nvmf_subsystem_add_listener "$nqn" -t tcp -a "$TADDR" -s "$TPORT"
|
rpc nvmf_subsystem_add_listener "$nqn" -t tcp -a "$TADDR" -s "$TPORT"
|
||||||
# Ensure the discovery subsystem has this listener too. The target already
|
# NOTE: we deliberately do NOT (re)add the discovery-subsystem listener here.
|
||||||
# registered it at startup, so this is normally a no-op that SPDK reports as
|
# The long-lived target registers it ONCE at startup (spdk-target.sh), and a
|
||||||
# "Listener already exists" — fully suppress stdout+stderr (rpc.py prints the
|
# subsystem becomes discoverable simply by having its own listener on the same
|
||||||
# JSON error to STDOUT, so 2>/dev/null alone wouldn't hide it).
|
# address. Re-adding it would make the nvmf_tgt DAEMON log "Listener already
|
||||||
rpc nvmf_subsystem_add_listener "$DISCOVERY_NQN" -t tcp -a "$TADDR" -s "$TPORT" >/dev/null 2>&1 || true
|
# exists" to the container stdout on every add — noise the client can't
|
||||||
|
# suppress (the daemon, not rpc.py, emits it). One registration is enough.
|
||||||
echo "==> release $v ONLINE (existing connections untouched)"
|
echo "==> release $v ONLINE (existing connections untouched)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user