Skip to content

Commit f07117d

Browse files
mwilckaafeijoo-suse
authored andcommitted
fix(nvmf): support /etc/nvme/config.json
Since nvme-cli 2.0, configuration of subsystems to connect to is stored under `/etc/nvme` in either `discovery.conf` or `config.json`. Attempt discovery also if the latter exists, but not the former. Also, install "config.json" if it's present on the root FS. As before, "rd.nvmf.discover=fc,auto" will force either file to be ignored, and NBFT-defined targets take precedence if found.
1 parent 902f3a8 commit f07117d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

modules.d/95nvmf/module-setup.sh

+1
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ install() {
130130
inst_multiple nvme
131131
inst_hook cmdline 92 "$moddir/parse-nvmf-boot-connections.sh"
132132
inst_simple "/etc/nvme/discovery.conf"
133+
inst_simple "/etc/nvme/config.json"
133134
inst_rules /usr/lib/udev/rules.d/71-nvmf-iopolicy-netapp.rules
134135
inst_rules "$moddir/95-nvmf-initqueue.rules"
135136
dracut_need_initqueue

modules.d/95nvmf/parse-nvmf-boot-connections.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ parse_nvmf_discover() {
6666
: > /tmp/nvmf_needs_network
6767
elif [ "$trtype" = "fc" ]; then
6868
if [ "$traddr" = "auto" ]; then
69-
rm /etc/nvme/discovery.conf
69+
rm -f /etc/nvme/discovery.conf /etc/nvme/config.json
7070
return 1
7171
fi
7272
if [ "$hosttraddr" = "none" ]; then

0 commit comments

Comments
 (0)