Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9faf4bb2fb |
4 changed files with 11 additions and 75 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -32,3 +32,4 @@
|
||||||
/nvme-cli-2.5.tar.gz
|
/nvme-cli-2.5.tar.gz
|
||||||
/nvme-cli-2.6.tar.gz
|
/nvme-cli-2.6.tar.gz
|
||||||
/nvme-cli-2.7.1.tar.gz
|
/nvme-cli-2.7.1.tar.gz
|
||||||
|
/nvme-cli-2.8.tar.gz
|
||||||
|
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
||||||
From 252929069d6c9042e9c95f41788006cb3eb2f452 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Martin George <marting@netapp.com>
|
|
||||||
Date: Tue, 19 Dec 2023 21:59:07 +0530
|
|
||||||
Subject: [PATCH] fabrics: move hostid/hostnqn warnings to verbose level
|
|
||||||
|
|
||||||
Currently nvme connect prints an annoying "use hostid which
|
|
||||||
does not match uuid in hostnqn" warning even for normal
|
|
||||||
scenarios when both the hostid and hostnqn files are present.
|
|
||||||
So move these warnings to verbose level instead.
|
|
||||||
|
|
||||||
Signed-off-by: Martin George <marting@netapp.com>
|
|
||||||
---
|
|
||||||
fabrics.c | 14 +++++++++-----
|
|
||||||
1 file changed, 9 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/fabrics.c b/fabrics.c
|
|
||||||
index 2a0ad7089..dcae9aead 100644
|
|
||||||
--- a/fabrics.c
|
|
||||||
+++ b/fabrics.c
|
|
||||||
@@ -632,7 +632,7 @@ char *nvmf_hostid_from_hostnqn(const char *hostnqn)
|
|
||||||
return strdup(uuid + strlen("uuid:"));
|
|
||||||
}
|
|
||||||
|
|
||||||
-void nvmf_check_hostid_and_hostnqn(const char *hostid, const char *hostnqn)
|
|
||||||
+void nvmf_check_hostid_and_hostnqn(const char *hostid, const char *hostnqn, unsigned int verbose)
|
|
||||||
{
|
|
||||||
char *hostid_from_file, *hostid_from_hostnqn;
|
|
||||||
|
|
||||||
@@ -641,7 +641,9 @@ void nvmf_check_hostid_and_hostnqn(const char *hostid, const char *hostnqn)
|
|
||||||
|
|
||||||
hostid_from_file = nvmf_hostid_from_file();
|
|
||||||
if (hostid_from_file && strcmp(hostid_from_file, hostid)) {
|
|
||||||
- fprintf(stderr, "warning: use generated hostid instead of hostid file\n");
|
|
||||||
+ if (verbose)
|
|
||||||
+ fprintf(stderr,
|
|
||||||
+ "warning: use generated hostid instead of hostid file\n");
|
|
||||||
free(hostid_from_file);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -650,7 +652,9 @@ void nvmf_check_hostid_and_hostnqn(const char *hostid, const char *hostnqn)
|
|
||||||
|
|
||||||
hostid_from_hostnqn = nvmf_hostid_from_hostnqn(hostnqn);
|
|
||||||
if (hostid_from_hostnqn && strcmp(hostid_from_hostnqn, hostid)) {
|
|
||||||
- fprintf(stderr, "warning: use hostid which does not match uuid in hostnqn\n");
|
|
||||||
+ if (verbose)
|
|
||||||
+ fprintf(stderr,
|
|
||||||
+ "warning: use hostid which does not match uuid in hostnqn\n");
|
|
||||||
free(hostid_from_hostnqn);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -741,7 +745,7 @@ int nvmf_discover(const char *desc, int argc, char **argv, bool connect)
|
|
||||||
hostid = hid = nvmf_hostid_from_file();
|
|
||||||
if (!hostid && hostnqn)
|
|
||||||
hostid = hid = nvmf_hostid_from_hostnqn(hostnqn);
|
|
||||||
- nvmf_check_hostid_and_hostnqn(hostid, hostnqn);
|
|
||||||
+ nvmf_check_hostid_and_hostnqn(hostid, hostnqn, verbose);
|
|
||||||
h = nvme_lookup_host(r, hostnqn, hostid);
|
|
||||||
if (!h) {
|
|
||||||
ret = ENOMEM;
|
|
||||||
@@ -964,7 +968,7 @@ int nvmf_connect(const char *desc, int argc, char **argv)
|
|
||||||
hostid = hid = nvmf_hostid_from_file();
|
|
||||||
if (!hostid && hostnqn)
|
|
||||||
hostid = hid = nvmf_hostid_from_hostnqn(hostnqn);
|
|
||||||
- nvmf_check_hostid_and_hostnqn(hostid, hostnqn);
|
|
||||||
+ nvmf_check_hostid_and_hostnqn(hostid, hostnqn, verbose);
|
|
||||||
h = nvme_lookup_host(r, hostnqn, hostid);
|
|
||||||
if (!h) {
|
|
||||||
errno = ENOMEM;
|
|
||||||
|
|
@ -2,25 +2,25 @@
|
||||||
%{!?version_no_tilde: %define version_no_tilde %{shrink:%(echo '%{version}' | tr '~' '-')}}
|
%{!?version_no_tilde: %define version_no_tilde %{shrink:%(echo '%{version}' | tr '~' '-')}}
|
||||||
|
|
||||||
Name: nvme-cli
|
Name: nvme-cli
|
||||||
Version: 2.7.1
|
Version: 2.8
|
||||||
Release: 4%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: NVMe management command line interface
|
Summary: NVMe management command line interface
|
||||||
|
|
||||||
License: GPL-2.0-only
|
License: GPL-2.0-only
|
||||||
URL: https://github.com/linux-nvme/nvme-cli
|
URL: https://github.com/linux-nvme/nvme-cli
|
||||||
Source0: %{url}/archive/v%{version_no_tilde}/%{name}-%{version_no_tilde}.tar.gz
|
Source0: %{url}/archive/v%{version_no_tilde}/%{name}-%{version_no_tilde}.tar.gz
|
||||||
|
|
||||||
# https://github.com/linux-nvme/nvme-cli/pull/2165
|
|
||||||
Patch0: nvme-cli-2.8.0-TP4126-lower_hostnqn_warnings.patch
|
|
||||||
|
|
||||||
BuildRequires: meson >= 0.50.0
|
BuildRequires: meson >= 0.50.0
|
||||||
BuildRequires: gcc gcc-c++
|
BuildRequires: gcc gcc-c++
|
||||||
BuildRequires: systemd-devel
|
BuildRequires: systemd-devel
|
||||||
BuildRequires: systemd-rpm-macros
|
BuildRequires: systemd-rpm-macros
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
BuildRequires: openssl-devel
|
BuildRequires: openssl-devel
|
||||||
|
%if (0%{?rhel} == 0) || (0%{?rhel} > 9)
|
||||||
|
BuildRequires: kernel-headers
|
||||||
|
%endif
|
||||||
|
|
||||||
BuildRequires: libnvme-devel >= 1.7
|
BuildRequires: libnvme-devel >= 1.8
|
||||||
BuildRequires: json-c-devel >= 0.13
|
BuildRequires: json-c-devel >= 0.13
|
||||||
|
|
||||||
BuildRequires: asciidoc
|
BuildRequires: asciidoc
|
||||||
|
|
@ -81,6 +81,9 @@ rm -rf %{buildroot}%{_pkgdocdir}/nvme
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Feb 14 2024 Tomas Bzatek <tbzatek@redhat.com> - 2.8-1
|
||||||
|
- Update to 2.8
|
||||||
|
|
||||||
* Fri Feb 09 2024 Tomas Bzatek <tbzatek@redhat.com> - 2.7.1-4
|
* Fri Feb 09 2024 Tomas Bzatek <tbzatek@redhat.com> - 2.7.1-4
|
||||||
- Lower the verbosity of TP4126 hostnqn-hostid consistency checks
|
- Lower the verbosity of TP4126 hostnqn-hostid consistency checks
|
||||||
|
|
||||||
|
|
|
||||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
||||||
SHA512 (nvme-cli-2.7.1.tar.gz) = 6a9f3574dfd4375e6f7a76ed95f698efb26da5b72a490579caeba9d46c4811ae31650844e0a0e1047dc627158d5ffbdc020112a5059d3195e7eadff902b70b19
|
SHA512 (nvme-cli-2.8.tar.gz) = 1be0bed4e1bf8a25229f301c2b00b78d2de4eaf8ff2b815fa75e44dd35ddd7787604152bdf00696130df3281206a734c5f408c3f2127440e05c2e4b1cdbb79d4
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue