Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1822697

Summary: hostnqn not generated properly on RHEL 8.2 Release Candidate 1
Product: Red Hat Enterprise Linux 8 Reporter: Clayton Skaggs <clayton.skaggs>
Component: nvme-cliAssignee: David Milburn <dmilburn>
Status: CLOSED ERRATA QA Contact: Zhang Yi <yizhan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 8.2CC: akarlsso, dhorak, dmilburn, emilne, jdonohue, ng-hsg-engcustomer-iop-bz, rhandlin, sschremm, toneata, tumeya
Target Milestone: rcKeywords: ZStream
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: nvme-cli-1.10.1-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1831140 1831146 (view as bug list) Environment:
Last Closed: 2020-11-04 01:43:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1831140, 1831146    

Description Clayton Skaggs 2020-04-09 16:04:59 UTC
Description of problem:
After installing nvme-cli on RHEL 8.2 RC1 all hosts had an identical hostnqn generated:
nqn.2014-08.org.nvmexpress:uuid:24ffc04c-74ed-413d-9261-0a40bfb4585f



Version-Release number of selected component (if applicable):
RHEL 8.2 RC1  (4.18.0-193.el8.x86_64)

How reproducible:
I haven't reinstalled again but my guess is it is pretty reproducible.


Steps to Reproduce:
1. Install RC1 on 2 hosts
2. Install nvme-cli
3. cat /etc/nvme/hostnqn on both hosts and compare

Actual results:
All fresh installs have an identical nqn generated

Expected results:
All fresh installs have a unique nqn generated

Additional info:

Comment 1 Ewan D. Milne 2020-04-15 14:29:41 UTC
NetApp thinks this may have started on 8.2 snapshot 3 perhaps?
They say this didn't happen in 8.1, or 7.7, or 8.2 Beta.

Comment 2 Steve Schremmer 2020-04-15 14:46:31 UTC
Did the nvme-cli package get updated after Beta?

I'm wondering if it could be related to one of these upstream changes to nvme-cli:

commit 48c10dbfaf00777170e209db20f7d07e47f7a983
Author: Andy Lutomirski <luto>
Date:   Thu Oct 3 11:47:02 2019 -0700

    Use a systemd app-specific machine ID for hostnqn

    If /etc/nvme/hostnqn is not present, the fabric commands will ask
    systemd for an app-specific machine ID as a fallback.  This should
    improve functionality if /etc/nvme/hostnqn is not present and should
    allow packagers to avoid creating /etc/nvme/hostnqn.

commit 6180aa0e32ba7d0e8dfa8435d212208569168773
Author: Simon Schricker <sschricker>
Date:   Fri May 17 15:36:37 2019 +0200

    nvme-cli: Add script to determine host NQN

    * Based on the system-UUID, via dmidecode
    * verifies UUID format
    * tries to catch fake/lazy UUIDs

Comment 3 Ewan D. Milne 2020-04-15 14:53:38 UTC
I thought nvme-cli got updated late in 8.2 to pick up the autoconnect changes ?

Comment 4 David Milburn 2020-04-15 15:53:49 UTC
Hi Steve,

(In reply to Steve Schremmer from comment #2)
> Did the nvme-cli package get updated after Beta?

Yes, we updated to nvme-cli-1.9-5.el8.x86_64.rpm to pickup the autoconnect
change, the below patches went into v1.10 upstream so they are not in the
RHEL8.2 build. Nothing should have changed generating unique hostnqn, not 
sure at the moment what would have broken. Clayton, are you testing with 
nvme-cli-1.9-5.el8.x86_64.rpm?

Also, do remember testing any of the other nvme-cli-1.9-x versions?

I will take a look at the recent changes. Thanks.

> 
> I'm wondering if it could be related to one of these upstream changes to
> nvme-cli:
> 
> commit 48c10dbfaf00777170e209db20f7d07e47f7a983
> Author: Andy Lutomirski <luto>
> Date:   Thu Oct 3 11:47:02 2019 -0700
> 
>     Use a systemd app-specific machine ID for hostnqn
> 
>     If /etc/nvme/hostnqn is not present, the fabric commands will ask
>     systemd for an app-specific machine ID as a fallback.  This should
>     improve functionality if /etc/nvme/hostnqn is not present and should
>     allow packagers to avoid creating /etc/nvme/hostnqn.
> 
> commit 6180aa0e32ba7d0e8dfa8435d212208569168773
> Author: Simon Schricker <sschricker>
> Date:   Fri May 17 15:36:37 2019 +0200
> 
>     nvme-cli: Add script to determine host NQN
> 
>     * Based on the system-UUID, via dmidecode
>     * verifies UUID format
>     * tries to catch fake/lazy UUIDs

Comment 5 David Milburn 2020-04-15 16:22:44 UTC
Hi Clayton,

Here is 1.9-2 and 1.9-3 in case you want to test an earlier version.

http://people.redhat.com/dmilburn/.bz1822697.98030607080910702011/

> I will take a look at the recent changes. Thanks.
> 
> > 
> > I'm wondering if it could be related to one of these upstream changes to
> > nvme-cli:
> > 
> > commit 48c10dbfaf00777170e209db20f7d07e47f7a983
> > Author: Andy Lutomirski <luto>
> > Date:   Thu Oct 3 11:47:02 2019 -0700
> > 
> >     Use a systemd app-specific machine ID for hostnqn
> > 
> >     If /etc/nvme/hostnqn is not present, the fabric commands will ask
> >     systemd for an app-specific machine ID as a fallback.  This should
> >     improve functionality if /etc/nvme/hostnqn is not present and should
> >     allow packagers to avoid creating /etc/nvme/hostnqn.
> > 
> > commit 6180aa0e32ba7d0e8dfa8435d212208569168773
> > Author: Simon Schricker <sschricker>
> > Date:   Fri May 17 15:36:37 2019 +0200
> > 
> >     nvme-cli: Add script to determine host NQN
> > 
> >     * Based on the system-UUID, via dmidecode
> >     * verifies UUID format
> >     * tries to catch fake/lazy UUIDs

Comment 6 Clayton Skaggs 2020-04-15 16:29:01 UTC
Hi David, To answer comment 4, I can guarantee it was working in the RHEL 8.2 Beta (nvme-cli-1.8.1-3.el8.x86_64.rpm)

I'm uncertain if the issue was in SS1 or SS2, but I can say I definately saw this issue in SS3 (nvme-cli-1.9-2.el8.x86_64.rpm) and RC1 (nvme-cli-1.9-5.el8.x86_64.rpm)

To Comment 5, that actually means I've already tested 1.9-2 and can confirm it exists there too.

Regards,
-Clayton

Comment 7 David Milburn 2020-04-15 19:23:05 UTC
(In reply to Clayton Skaggs from comment #6)
> Hi David, To answer comment 4, I can guarantee it was working in the RHEL
> 8.2 Beta (nvme-cli-1.8.1-3.el8.x86_64.rpm)
> 
> I'm uncertain if the issue was in SS1 or SS2, but I can say I definately saw
> this issue in SS3 (nvme-cli-1.9-2.el8.x86_64.rpm) and RC1
> (nvme-cli-1.9-5.el8.x86_64.rpm)
> 
> To Comment 5, that actually means I've already tested 1.9-2 and can confirm
> it exists there too.
> 

Thanks Clayton, would you please test nvme-cli-1.9-6? It looks part of post
section in spec file didn't execute.


http://people.redhat.com/dmilburn/.bz1822697.98030607080910702011/

Comment 8 Clayton Skaggs 2020-04-16 17:47:56 UTC
Hi David,

I've tested nvme-cli-1.9-6. That looks to of done the trick. After installing this version my hosts generated unique identifiers. If you can get this into a build of RHEL 8.2 we can get this closed.

Regards,
-Clayton

Comment 9 David Milburn 2020-04-16 18:33:03 UTC
Hi Clayton,

(In reply to Clayton Skaggs from comment #8)
> Hi David,
> 
> I've tested nvme-cli-1.9-6. That looks to of done the trick. After
> installing this version my hosts generated unique identifiers. If you can
> get this into a build of RHEL 8.2 we can get this closed.
> 

Thanks for retesting, I will have to push it to RHEL8.2.z, at this time
I won't be able to update the package for RHEL8.2.

Comment 13 David Milburn 2020-04-22 20:20:49 UTC
Hi Clayton,

I was able to put the fix in nvme-cli-1.10.1-1.el8 which
will be our RHEL8.3 package. I can ask for management to
approve nvme-cli-1.9-6.el8 for RHEL8.2.z (RHEL8.2 update
package), but they will need a few words from NetApp
(on this BZ) describing how NetApp is impacted by this 
bug on RHEL8.2. Thanks.

Comment 14 Clayton Skaggs 2020-04-29 15:40:02 UTC
Hi David,

The impact to us or any customers in the field would be that every time they install a new host each host will have identical nqns. These nqns are how we map volumes to hosts in a fabric, so if they are identical across several hosts this can cause a lot of trouble with discovery of luns from these hosts on our array. These nqns would then need to be manually edited into unique values to allow lun discovery to function properly which could prove to be an exhaustive process in a more sizable environment.

Regards,
-Clayton

Comment 28 errata-xmlrpc 2020-11-04 01:43:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (nvme-cli bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4476