Okay, checking focal source code..

config::hostid seems to used at:

build_options() <- generic function setting variables
connect_ctrl() <- function connecting to NVMEoF controller
connect() <- function to to connect to NVMEoF
discover() <- same thing
nvmf_hostid_file() <- function reading config file and setting variable

So, for connect() we do have:

                {"hostnqn",         'q', "LIST", CFG_STRING, &cfg.hostnqn,      
   required_argument, "user-defined hostnqn" },
                {"hostid",          'I', "LIST", CFG_STRING, &cfg.hostid,      
required_argument, "user-defined hostid (if default not used)"},

and for discovery we have:

                {"hostnqn",     'q', "LIST", CFG_STRING, &cfg.hostnqn,     
required_argument, "user-defined hostnqn (if default not used)" },
                {"hostid",      'I', "LIST", CFG_STRING, &cfg.hostid,      
required_argument, "user-defined hostid (if default not used)"},

Both are REQUIRED and would always be the same for all nodes (hostid
would always be the same and hostnqn would always be nothing). This, per
se, is already broken as a hostnqn is REQUIRED.

So, for Focal, I would say... re-creating both files IF hostnqn is empty
would ALWAYS be a safe thing to be done. It means that there was no
manual intervention to the config files... and without a hostnqn there
would be no discovery or connection (so end user is not using NVME over
Fabrics anyway).

Now, if user has changed hostnqn, we could display a warning saying the
UUID should be checked for duplicates.

Let me see what you're doing now...

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1867366

Title:
  hostnqn fails to automatically generate after installing nvme-cli

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nvme-cli/+bug/1867366/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to