NVMe-oF connector doesn't create the hostid

Bug #2016029 reported by Gorka Eguileor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-brick
Fix Released
Medium
Gorka Eguileor

Bug Description

The NVMe-oF os-brick connector creates the /etc/nvme/hostnqn file if it doesn't exist, but it doesn't do the equivalent for the /etc/nvme/hostid file.

Some distribution packages create the file on installation but others may not.

It is recommended for the file to be present so that nvme doesn't randomly generate it.
Randomly generate it means that the value will be different for the same storage array and the same volume if we connect, disconnect, and connect the volume again.

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

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/os-brick/+/880222

Changed in os-brick:
status: New → In Progress
Changed in os-brick:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-brick (master)

Reviewed: https://review.opendev.org/c/openstack/os-brick/+/880222
Committed: https://opendev.org/openstack/os-brick/commit/16c90d5fe97da04c7c42cbd3fe5505153ce95a91
Submitter: "Zuul (22348)"
Branch: master

commit 16c90d5fe97da04c7c42cbd3fe5505153ce95a91
Author: Gorka Eguileor <email address hidden>
Date: Wed Apr 12 20:23:47 2023 +0200

    NVMe-oF: Create /etc/nvme/hostid

    The NVMe-oF connector currently create the `/etc/nvme/hostnqn` file if
    it doesn't exist, but it may still be missing the `/etc/nvme/hostid`
    value.

    Some distribution packages create the file on installation but others
    may not.

    It is recommended for the file to be present so that nvme doesn't
    randomly generate it.

    Randomly generating it means that the value will be different for the
    same storage array and the same volume if we connect, disconnect, and
    connect the volume again.

    This patch ensures that the file will exist and will try to use the
    system's UUID as reported by DMI or a randomly generated one.

    Closes-Bug: #2016029
    Change-Id: I0b60f9078f23f8464d8234841645ed520e8ba655

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 6.4.0

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-brick (stable/2023.1)

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/os-brick/+/905988

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

Reviewed: https://review.opendev.org/c/openstack/os-brick/+/905988
Committed: https://opendev.org/openstack/os-brick/commit/5ab069ab2eebbf942ecf2577399d1da924bac782
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit 5ab069ab2eebbf942ecf2577399d1da924bac782
Author: whoami-rajat <email address hidden>
Date: Thu Aug 24 12:02:43 2023 +0000

    NVMe-oF: Create /etc/nvme/hostid

    The NVMe-oF connector currently create the `/etc/nvme/hostnqn` file if
    it doesn't exist, but it may still be missing the `/etc/nvme/hostid`
    value.

    Some distribution packages create the file on installation but others
    may not.

    It is recommended for the file to be present so that nvme doesn't
    randomly generate it.

    Randomly generating it means that the value will be different for the
    same storage array and the same volume if we connect, disconnect, and
    connect the volume again.

    This patch ensures that the file will exist and will try to use the
    system's UUID as reported by DMI or a randomly generated one.

    BACKPORT NOTE: This patch also includes another patch fixing unittests
                   Otherwise tests would fail

      Fix unit tests when hostid file exists

      After merging change I0b60f9078f23f8464d8234841645ed520e8ba655, we
      noticed an issue with existing unit tests which started failing.
      The reason is 'nvme_hostid' was an additional parameter returned
      in the response while fetching connector properties from nvme
      connector.
      This is environment specific and won't occur in environments where
      '/etc/nvme/hostid' file doesn't exist due to which these tests
      passed in gate but failed in the local run when hostid file
      was present.
      This patch mocks the get_nvme_host_id method for tests so the
      hostid is never returned irrespective of the environment.

      Closes-Bug: #2032941
      Change-Id: I8b1aaedfdb9bef6e34813e39dede9afe98371d2b
      (cherry picked from commit 71627c56ac14bd3d31e78979d430eccee9a92d91)

    Closes-Bug: #2016029
    Change-Id: I0b60f9078f23f8464d8234841645ed520e8ba655
    (cherry picked from commit 16c90d5fe97da04c7c42cbd3fe5505153ce95a91)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-brick 6.2.3

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

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

Other bug subscribers

Remote bug watches

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