Re: [PATCH blktests] nvme/rc: specify hostnqn to hostid to nvme discover and connect
From: Chaitanya Kulkarni <hidden>
Date: 2023-06-28 22:23:26
Also in:
linux-nvme
Shinichiro/Max, On 6/28/2023 5:43 AM, Shin'ichiro Kawasaki wrote:
From: Max Gurtovoy <mgurtovoy@nvidia.com>
After the kernel commit ae8bd606e09b ("nvme-fabrics: prevent overriding
of existing host"), 'nvme discover' and 'nvme connect' commands fail
when pair of hostid and hostnqn is not provide. This caused failure of
many test cases in the nvme group with kernel messages "nvme_fabrics:
found same hostid XXX but different hostnqn YYY".
To avoid the failure, specify valid hostnqn and hostid to the nvme
commands always. Prepare def_hostnqn and def_hostid even when
/etc/nvme/hostnqn or /etc/nvme/hostid is not available. Using these
values, add --hostnqn and --hostid options to the nvme commands in
_nvme_discover() and _nvme_connect_subsys().
Reported-by: Yi Zhang <redacted>
Link: https://lore.kernel.org/linux-nvme/CAHj4cs_qUWzetD0203EKbBLNv3KF=qgTLsWLeHN3PY7UE6mzmw@mail.gmail.com/ (local)
Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Signed-off-by: Shin'ichiro Kawasaki <redacted>Thanks for fixing this quickly. I've tested this patch on my setup where there was no errors. With this patch all the testecases are passing on my non-broken setup, but please wait for Yi's Tested-by tag before applying the patch. with that :- Tested-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> -ck