Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(nvmf): autoconnect logic for nvme-cli 2.5 and newer
In nvme-cli 2.5, the "nvme connect-nbft" functionality has been included in the "nvme connect-all" command. "connect-all" will now try connecting to NBFT targets, too, unless the --no-nbft option is used. "connect-all --nbft" will attempt connecting to NBFT targets only. Preserve the previous priority logic for the 2.5+ command line syntax. The "timeout" case is simplified, it just attempts a "connect-all" and an FC autoconnect. For the regular connect attempts, the priorities remain as before: 1 FC autoconnect from kernel commandline ("rd.nvmf.discover=fc,auto") 2 NBFT 3 discovery.conf / config.json / hostonly parameters determined at initramfs build time 4 FC autoconnect without kernel command line Note that NBFT settings take precedence over explicit command line settings. To enforce use of (only) kernel command line settings for NVMe-oF, use this: rd.nvmf.nostatic rd.nvmf.nonbft rd.nvmf.discover=... Because nvme-cli 2.5 is not released yet and older versions will be around for some time, check whether the nbft-related options are supported, and fall back to plain "connect-all" if not (this will not connect to NBFT targets).
- Loading branch information