From 669ed74612577d6a0898672c09b3ff6783939f36 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Thu, 22 Aug 2024 13:19:35 +0200 Subject: [PATCH] * Thu Aug 22 2024 Tomas Bzatek - 2.9.1-4 - Install NetworkManager override for nbft interfaces - Rename reconnect NetworkManager hook to 99-nvme-nbft-connect.sh Resolves: RHEL-55754 --- ...connect-nbft.sh => 99-nvme-nbft-connect.sh | 0 99-nvme-nbft-no-ignore-carrier.conf | 15 ++++++++++++++ nvme-cli.spec | 20 ++++++++++++++----- 3 files changed, 30 insertions(+), 5 deletions(-) rename nvmf-connect-nbft.sh => 99-nvme-nbft-connect.sh (100%) create mode 100644 99-nvme-nbft-no-ignore-carrier.conf diff --git a/nvmf-connect-nbft.sh b/99-nvme-nbft-connect.sh similarity index 100% rename from nvmf-connect-nbft.sh rename to 99-nvme-nbft-connect.sh diff --git a/99-nvme-nbft-no-ignore-carrier.conf b/99-nvme-nbft-no-ignore-carrier.conf new file mode 100644 index 0000000..4f19515 --- /dev/null +++ b/99-nvme-nbft-no-ignore-carrier.conf @@ -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 diff --git a/nvme-cli.spec b/nvme-cli.spec index cb2dcfe..fa1c77d 100644 --- a/nvme-cli.spec +++ b/nvme-cli.spec @@ -1,15 +1,18 @@ # RHEL 8 compatibility %{!?version_no_tilde: %define version_no_tilde %{shrink:%(echo '%{version}' | tr '~' '-')}} +%global nmlibdir %{_prefix}/lib/NetworkManager + Name: nvme-cli Version: 2.9.1 -Release: 3%{?dist} +Release: 4%{?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: nvmf-connect-nbft.sh +Source1: 99-nvme-nbft-connect.sh +Source2: 99-nvme-nbft-no-ignore-carrier.conf Patch0: 0001-Revert-fabrics-Use-corresponding-hostid-when-hostnqn.patch Patch1: nvme-cli-2.10-nbft-discovery.patch @@ -49,8 +52,10 @@ nvme-cli provides NVM-Express user space tooling for Linux. %install %meson_install %{__install} -pm 644 README.md %{buildroot}%{_pkgdocdir} -mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d -%{__install} -pm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d +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/ # Do not install the dracut rule yet. See rhbz 1742764 rm -f %{buildroot}/usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf @@ -79,7 +84,8 @@ rm -rf %{buildroot}%{_pkgdocdir}/nvme %{_udevrulesdir}/71-nvmf-netapp.rules # Do not install the dracut rule yet. See rhbz 1742764 # /usr/lib/dracut/dracut.conf.d/70-nvmf-autoconnect.conf -%{_sysconfdir}/NetworkManager/dispatcher.d/nvmf-connect-nbft.sh +%{nmlibdir}/dispatcher.d/99-nvme-nbft-connect.sh +%{nmlibdir}/conf.d/99-nvme-nbft-no-ignore-carrier.conf %post if [ $1 -eq 1 ] || [ $1 -eq 2 ]; then @@ -100,6 +106,10 @@ if [ $1 -eq 1 ] || [ $1 -eq 2 ]; then fi %changelog +* Thu Aug 22 2024 Tomas Bzatek - 2.9.1-4 +- Install NetworkManager override for nbft interfaces +- Rename reconnect NetworkManager hook to 99-nvme-nbft-connect.sh + * Fri Jul 26 2024 Maurizio Lombardi - 2.9.1-3 - Fix RHEL-37603 (NBFT discovery support)