Compare commits
18 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e6a6d49fc | ||
|
|
3618605a76 | ||
|
|
e01b55c71f | ||
|
|
d8a5bb174c | ||
|
|
e8eb04bafc | ||
|
|
c0028af7fa | ||
|
|
58dfd6f0b1 | ||
|
|
3dfbefd554 | ||
|
|
6e6c26f8a6 | ||
|
|
babcc96ccd | ||
|
|
c6b0b0ba59 | ||
|
|
75fb90a003 | ||
|
|
c636547ae2 | ||
|
|
c8cd07d864 | ||
|
|
acaa02a06f | ||
|
|
d3fe246793 | ||
|
|
ae14179a66 | ||
|
|
8db1f0f09e |
6 changed files with 136 additions and 78 deletions
10
.gitignore
vendored
10
.gitignore
vendored
|
|
@ -32,3 +32,13 @@
|
|||
/nvme-cli-2.5.tar.gz
|
||||
/nvme-cli-2.6.tar.gz
|
||||
/nvme-cli-2.7.1.tar.gz
|
||||
/nvme-cli-2.8.tar.gz
|
||||
/nvme-cli-2.9.1.tar.gz
|
||||
/nvme-cli-2.10.tar.gz
|
||||
/nvme-cli-2.10.2.tar.gz
|
||||
/nvme-cli-2.11.tar.gz
|
||||
/nvme-cli-2.12.tar.gz
|
||||
/nvme-cli-2.13.tar.gz
|
||||
/nvme-cli-2.14.tar.gz
|
||||
/nvme-cli-2.15.tar.gz
|
||||
/nvme-cli-2.16.tar.gz
|
||||
|
|
|
|||
5
99-nvme-nbft-connect.sh
Normal file
5
99-nvme-nbft-connect.sh
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [[ "$1" == nbft* ]] && [[ "$2" == "up" ]]; then
|
||||
systemctl start nvmf-connect-nbft.service
|
||||
fi
|
||||
15
99-nvme-nbft-no-ignore-carrier.conf
Normal file
15
99-nvme-nbft-no-ignore-carrier.conf
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Boot from NVMe over TCP (NBFT)
|
||||
#
|
||||
# For NVMe/TCP connections that provide namespaces containing rootfs
|
||||
# it is crucial to react on carrier events and reconnect any missing
|
||||
# NVMe/TCP connections as defined in the ACPI NBFT table. A custom
|
||||
# /usr/lib/NetworkManager/dispatcher.d/99-nvme-nbft-connect.sh hook
|
||||
# will respawn nvmf-connect-nbft.service on such occasion.
|
||||
|
||||
[device-nbft-no-ignore-carrier]
|
||||
|
||||
# only affects nbft0, nbft1, ... interfaces
|
||||
match-device=interface-name:nbft*
|
||||
|
||||
# react on link up/down events
|
||||
ignore-carrier=no
|
||||
|
|
@ -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;
|
||||
114
nvme-cli.spec
114
nvme-cli.spec
|
|
@ -1,33 +1,38 @@
|
|||
# RHEL 8 compatibility
|
||||
%{!?version_no_tilde: %define version_no_tilde %{shrink:%(echo '%{version}' | tr '~' '-')}}
|
||||
|
||||
%global nmlibdir %{_prefix}/lib/NetworkManager
|
||||
|
||||
Name: nvme-cli
|
||||
Version: 2.7.1
|
||||
Release: 4%{?dist}
|
||||
Version: 2.16
|
||||
Release: 1%{?dist}
|
||||
Summary: NVMe management command line interface
|
||||
|
||||
License: GPL-2.0-only
|
||||
URL: https://github.com/linux-nvme/nvme-cli
|
||||
Source0: %{url}/archive/v%{version_no_tilde}/%{name}-%{version_no_tilde}.tar.gz
|
||||
Source1: 99-nvme-nbft-connect.sh
|
||||
Source2: 99-nvme-nbft-no-ignore-carrier.conf
|
||||
|
||||
# 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.53
|
||||
BuildRequires: gcc gcc-c++
|
||||
BuildRequires: systemd-devel
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: openssl-devel
|
||||
%if (0%{?rhel} == 0) || (0%{?rhel} > 9)
|
||||
BuildRequires: kernel-headers
|
||||
%endif
|
||||
|
||||
BuildRequires: libnvme-devel >= 1.7
|
||||
BuildRequires: json-c-devel >= 0.13
|
||||
BuildRequires: libnvme-devel >= 1.16.1
|
||||
BuildRequires: json-c-devel >= 0.14
|
||||
|
||||
BuildRequires: asciidoc
|
||||
BuildRequires: xmlto
|
||||
|
||||
Requires: util-linux
|
||||
|
||||
|
||||
%description
|
||||
nvme-cli provides NVM-Express user space tooling for Linux.
|
||||
|
||||
|
|
@ -36,13 +41,17 @@ nvme-cli provides NVM-Express user space tooling for Linux.
|
|||
|
||||
|
||||
%build
|
||||
%meson -Dudevrulesdir=%{_udevrulesdir} -Dsystemddir=%{_unitdir} -Dpdc-enabled=true -Ddocs=all -Ddocs-build=true -Dhtmldir=%{_pkgdocdir}
|
||||
%meson -Dudevrulesdir=%{_udevrulesdir} -Dsystemddir=%{_unitdir} -Dpdc-enabled=false -Ddocs=all -Ddocs-build=true -Dhtmldir=%{_pkgdocdir}
|
||||
%meson_build
|
||||
|
||||
|
||||
%install
|
||||
%meson_install
|
||||
%{__install} -pm 644 README.md %{buildroot}%{_pkgdocdir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{nmlibdir}/dispatcher.d
|
||||
mkdir -p $RPM_BUILD_ROOT%{nmlibdir}/conf.d
|
||||
%{__install} -pm 755 %{SOURCE1} $RPM_BUILD_ROOT%{nmlibdir}/dispatcher.d/
|
||||
%{__install} -pm 644 %{SOURCE2} $RPM_BUILD_ROOT%{nmlibdir}/conf.d/
|
||||
|
||||
# hostid and hostnqn are supposed to be unique per machine. We obviously
|
||||
# can't package them.
|
||||
|
|
@ -59,6 +68,30 @@ mv %{buildroot}%{_pkgdocdir}/nvme %{buildroot}%{_pkgdocdir}/html
|
|||
rm -rf %{buildroot}%{_pkgdocdir}/nvme
|
||||
|
||||
|
||||
%post
|
||||
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_systemd
|
||||
%systemd_post nvmefc-boot-connections.service
|
||||
%systemd_post nvmf-autoconnect.service
|
||||
%systemd_post nvmf-connect@.service
|
||||
%systemd_post nvmf-connect-nbft.service
|
||||
if [ -S /run/udev/control ]; then
|
||||
udevadm control --reload
|
||||
udevadm trigger
|
||||
fi
|
||||
|
||||
%preun
|
||||
%systemd_preun nvmefc-boot-connections.service
|
||||
%systemd_preun nvmf-autoconnect.service
|
||||
%systemd_preun nvmf-connect@.service
|
||||
%systemd_preun nvmf-connect-nbft.service
|
||||
|
||||
%postun
|
||||
%systemd_postun nvmefc-boot-connections.service
|
||||
%systemd_postun nvmf-autoconnect.service
|
||||
%systemd_postun nvmf-connect@.service
|
||||
%systemd_postun nvmf-connect-nbft.service
|
||||
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc %{_pkgdocdir}
|
||||
|
|
@ -75,12 +108,75 @@ rm -rf %{buildroot}%{_pkgdocdir}/nvme
|
|||
%{_unitdir}/nvmf-connect-nbft.service
|
||||
%{_udevrulesdir}/65-persistent-net-nbft.rules
|
||||
%{_udevrulesdir}/70-nvmf-autoconnect.rules
|
||||
%{_udevrulesdir}/70-nvmf-keys.rules
|
||||
%{_udevrulesdir}/71-nvmf-netapp.rules
|
||||
%{_udevrulesdir}/71-nvmf-vastdata.rules
|
||||
%{_udevrulesdir}/71-nvmf-hpe.rules
|
||||
# Do not install the dracut rule yet. See rhbz 1742764
|
||||
# /usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf
|
||||
%{nmlibdir}/dispatcher.d/99-nvme-nbft-connect.sh
|
||||
%{nmlibdir}/conf.d/99-nvme-nbft-no-ignore-carrier.conf
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Dec 04 2025 Tomas Bzatek <tbzatek@redhat.com> - 2.16-1
|
||||
- Update to 2.16
|
||||
|
||||
* Fri Aug 15 2025 Tomas Bzatek <tbzatek@redhat.com> - 2.15-2
|
||||
- Fix nvme-list JSON output compatibility
|
||||
- Rename 71-nvme-hpe.rules to 71-nvmf-hpe.rules
|
||||
|
||||
* Fri Jul 25 2025 Tomas Bzatek <tbzatek@redhat.com> - 2.15-1
|
||||
- Update to 2.15
|
||||
|
||||
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.14-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Wed Jul 09 2025 Tomas Bzatek <tbzatek@redhat.com> - 2.14-1
|
||||
- Update to 2.14
|
||||
- Disable Persistent Discovery Controllers by default
|
||||
|
||||
* Fri Apr 11 2025 Tomas Bzatek <tbzatek@redhat.com> - 2.13-1
|
||||
- Update to 2.13
|
||||
|
||||
* Mon Mar 17 2025 Tomas Bzatek <tbzatek@redhat.com> - 2.12-1
|
||||
- Update to 2.12
|
||||
|
||||
* Tue Feb 04 2025 Tomas Bzatek <tbzatek@redhat.com> - 2.11-3
|
||||
- Add systemd units scriptlets
|
||||
- Reload udevd after installing udev rules
|
||||
|
||||
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.11-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Thu Oct 31 2024 Tomas Bzatek <tbzatek@redhat.com> - 2.11-1
|
||||
- Update to 2.11
|
||||
|
||||
* Mon Aug 26 2024 Tomas Bzatek <tbzatek@redhat.com> - 2.10.2-2
|
||||
- Install NetworkManager override for nbft interfaces
|
||||
- Rename reconnect NetworkManager hook to 99-nvme-nbft-connect.sh
|
||||
|
||||
* Mon Aug 05 2024 Tomas Bzatek <tbzatek@redhat.com> - 2.10.2-1
|
||||
- Update to 2.10.2
|
||||
|
||||
* Mon Aug 05 2024 Tomas Bzatek <tbzatek@redhat.com> - 2.10-1
|
||||
- Update to 2.10
|
||||
|
||||
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Mon Jun 03 2024 Tomas Bzatek <tbzatek@redhat.com> - 2.9.1-2
|
||||
- Install custom nvmf-connect-nbft.sh NetworkManager hook
|
||||
|
||||
* Fri May 03 2024 Tomas Bzatek <tbzatek@redhat.com> - 2.9.1-1
|
||||
- Update to 2.9.1
|
||||
|
||||
* Tue Apr 23 2024 Tomas Bzatek <tbzatek@redhat.com> - 2.8-2
|
||||
- Harden the systemd units
|
||||
|
||||
* 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
|
||||
- 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.16.tar.gz) = 507018ff41832574bef5b88ea6a17336b9792c54f8e5c619d041bce23124e1d6d5e5e824407f46d4f1b4d6899125885eb14289f3399e61c7e7a59a603f1635e2
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue