NVMeOF connector fails to disconnect a volume with the latest nvme-cli

Bug #1843431 reported by Przemyslaw Szczerbik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-brick
Fix Released
High
Przemyslaw Szczerbik

Bug Description

Environment:

CentOS Linux release 7.6.1810 (Core)
os-brick (2.9.1)
nvme version 1.9.9.g5221

Description:

os-brick NVMeOF connector fails to disconnect a volume with the latest version of nvme-cli.
As you can see in attached logs, NVMeOF connector attempts to disconnect a volume by executing following command:
$ nvme disconnect -d /dev/nvme0n1

The command fails with 'Failed to disconnect by device name: /dev/nvme0n1' error.

Initially, I suspected this to be nvme-cli issue because I was unable to reproduce it with nvme-cli v1.7.
I reported a bug to nvme-cli maintainer. The maintainer explained that this was intentional change rather than a bug. For more details, please see https://github.com/linux-nvme/nvme-cli/issues/563.

This means that os-brick NVMeOF connector has to fixed. It can't use a path to nvme block device (i.e. /dev/nvme0n1). I'd suggest calling nvme disconnect with --nqn parameter, rather than device name.

Revision history for this message
Przemyslaw Szczerbik (pszczerx) wrote :
Revision history for this message
Przemyslaw Szczerbik (pszczerx) wrote :

I would be happy to implement a fix this this issue.

Revision history for this message
Jay Bryant (jsbryant) wrote :
Changed in os-brick:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Przemyslaw Szczerbik (pszczerx)
Revision history for this message
Przemyslaw Szczerbik (pszczerx) wrote :

@Jay, I think you copied the wrong link. Fix proposed: https://review.opendev.org/#/c/683917/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-brick (master)

Reviewed: https://review.opendev.org/683917
Committed: https://git.openstack.org/cgit/openstack/os-brick/commit/?id=6ea276c22e204531653110089759d800fd4f7bbf
Submitter: Zuul
Branch: master

commit 6ea276c22e204531653110089759d800fd4f7bbf
Author: Szczerbik, Przemyslaw <email address hidden>
Date: Tue Sep 24 10:45:57 2019 +0100

    nvmeof: Use subnqn to disconnect a volume

    nvme-cli no longer allows to use a path to nvme block device
    (e.g. /dev/nvme0n1) as an argument to nvme disconnect command.
    For more details, please see:
    https://github.com/linux-nvme/nvme-cli/issues/563

    To address this issue, change the command that is executed to
    disconnect a volume from:

    $ nvme disconnect -d <device>

    to:

    $ nvme disconnect -n <subnqn>

    Change-Id: I51a30825da5e7378ebc1d6f4a12645d73d7feb19
    Closes-Bug: #1843431
    Signed-off-by: Szczerbik, Przemyslaw <email address hidden>

Changed in os-brick:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-brick 2.11.0

This issue was fixed in the openstack/os-brick 2.11.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.