Skip to content

Commit

Permalink
feat(nvmf): set rd.neednet=1 if tcp records encountered
Browse files Browse the repository at this point in the history
This is currently always the case for NBFT records.
We can do this now, as we run before parse-ip-options.sh
  • Loading branch information
mwilck authored and johannbg committed Sep 30, 2022
1 parent 4b69e63 commit cf8986a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions modules.d/95nvmf/parse-nvmf-boot-connections.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ parse_nvmf_discover() {
warn "traddr is mandatory for $trtype"
return 0
fi
if [ "$trtype" = "fc" ]; then
if [ "$trtype" = "tcp" ]; then
: > /tmp/nvmf_needs_network
elif [ "$trtype" = "fc" ]; then
if [ "$traddr" = "auto" ]; then
rm /etc/nvme/discovery.conf
return 1
Expand All @@ -71,7 +73,7 @@ parse_nvmf_discover() {
warn "host traddr is mandatory for fc"
return 0
fi
elif [ "$trtype" != "rdma" ] && [ "$trtype" != "tcp" ]; then
elif [ "$trtype" != "rdma" ]; then
warn "unsupported transport $trtype"
return 0
fi
Expand Down Expand Up @@ -100,6 +102,11 @@ for d in $(getargs rd.nvmf.discover -d nvmf.discover=); do
}
done

if [ -e /tmp/nvmf_needs_network ]; then
echo "rd.neednet=1" > /etc/cmdline.d/nvmf-neednet.conf
rm -f /tmp/nvmf_needs_network
fi

# Host NQN and host id are mandatory for NVMe-oF
if [ -f "/etc/nvme/hostnqn" ] && [ -f "/etc/nvme/hostid" ]; then

Expand Down

0 comments on commit cf8986a

Please sign in to comment.