[Bug 1867366] Re: hostnqn fails to automatically generate after installing nvme-cli
Dan Streetman
1867366 at bugs.launchpad.net
Fri Sep 18 18:31:33 UTC 2020
focal, fresh install:
root at lp1867366-f:~# dpkg -l nvme-cli
dpkg-query: no packages found matching nvme-cli
root at lp1867366-f:~# grep . /etc/nvme/*
grep: /etc/nvme/*: No such file or directory
root at lp1867366-f:~# apt install nvme-cli
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
nvme-cli
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 283 kB of archives.
After this operation, 687 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-proposed/universe amd64 nvme-cli amd64 1.9-1ubuntu0.1 [283 kB]
Fetched 283 kB in 1s (419 kB/s)
Selecting previously unselected package nvme-cli.
(Reading database ... 47175 files and directories currently installed.)
Preparing to unpack .../nvme-cli_1.9-1ubuntu0.1_amd64.deb ...
Unpacking nvme-cli (1.9-1ubuntu0.1) ...
Setting up nvme-cli (1.9-1ubuntu0.1) ...
Processing triggers for man-db (2.9.1-1) ...
root at lp1867366-f:~# dpkg -l |grep nvme-cli
ii nvme-cli 1.9-1ubuntu0.1 amd64 userspace tooling to control NVMe drives
root at lp1867366-f:~# grep . /etc/nvme/host*
/etc/nvme/hostid:af9719f8-34c3-4652-9afd-28eccbbd10f5
/etc/nvme/hostnqn:nqn.2014-08.org.nvmexpress:uuid:25d4c6e2-ec73-4fd6-9e20-d55292ec7510
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to nvme-cli in Ubuntu.
https://bugs.launchpad.net/bugs/1867366
Title:
hostnqn fails to automatically generate after installing nvme-cli
Status in nvme-cli package in Ubuntu:
Fix Released
Status in nvme-cli source package in Bionic:
In Progress
Status in nvme-cli source package in Focal:
Fix Committed
Status in nvme-cli source package in Groovy:
Fix Released
Status in nvme-cli package in Debian:
Unknown
Bug description:
[impact]
"nvme gen-hostnqn" does not work, leading to no content in
/etc/nvme/hostnqn
also, /etc/nvme/hostid is generated at build time instead of install
time, leading to a hardcoded value for all systems, while the file is
supposed to contain a unique value (uuid) for the system
[test case]
hostnqn tests:
$ cat /etc/nvme/hostnqn
$ nvme gen-hostnqn
"gen-hostnqn" not supported. Install lib uuid and rebuild.
hostid test for unique value:
$ cat /etc/nvme/hostid
9ce77162-5a3e-439b-a73f-cdf2449521b6
(that specific uuid is hardcoded into the nvme-cli 1.9-1 package)
[regression potential]
any regression would likely involve a failure of nvme to interact with
nvmeof devices, or for other systems connecting to this nvme fabric
target to encounter errors
also, the upload for Focal includes a postinst check for the hardcoded
hostid value (from the 1.9-1 package), and if it's found *and* the
hostnqn is not set (meaning the system has not been setup yet), it
regenerates it (so the host has a unique generated value). Any
regression in this area would likely involve the same issues as above
with NVMEoF problems, either in connecting or operating the system as
a target.
see comments 11-17 for more analysis of the issue and regression
potential.
[scope]
xenial does not include the gen-hostnqn command, so this is needed
only for bionic and later.
in bionic, the 'gen-hostnqn' command exists, but the /etc/nvme/hostnqn
file is not (yet) provided by the package, however per recommendation
in comment 17, the postinst script is being added to the bionic
upload, so the hostid and hostnqn files will be generated at package
installation.
[other info]
to fix this in debian:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=969183
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=969340
[original description]
hostnqn fails to automatically generate after installing nvme-cli
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: nvme-cli 1.9-1
ProcVersionSignature: Ubuntu 5.4.0-9.12-generic 5.4.3
Uname: Linux 5.4.0-9-generic x86_64
ApportVersion: 2.20.11-0ubuntu18
Architecture: amd64
Date: Fri Mar 6 14:09:20 2020
Dependencies:
gcc-9-base 9.2.1-21ubuntu1
libc6 2.30-0ubuntu3
libgcc1 1:9.2.1-21ubuntu1
libidn2-0 2.2.0-2
libunistring2 0.9.10-2
InstallationDate: Installed on 2020-03-05 (0 days ago)
InstallationMedia: Ubuntu-Server 20.04 LTS "Focal Fossa" - Alpha amd64 (20200124)
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: nvme-cli
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.nvme.hostnqn: [modified]
mtime.conffile..etc.nvme.hostnqn: 2020-03-06T11:27:08.674276
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nvme-cli/+bug/1867366/+subscriptions
More information about the foundations-bugs
mailing list