1
0
Fork 0

Adding upstream version 2.3~rc5.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-16 12:55:53 +01:00
parent 8b146d606d
commit 16151f03e6
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
5 changed files with 28 additions and 59 deletions

View file

@ -17,36 +17,20 @@ jobs:
- name: "INSTALL: Overall dependencies" - name: "INSTALL: Overall dependencies"
run: | run: |
sudo apt-mark hold grub-efi-amd64-signed # Workaround for upstream issue
sudo apt-get update --yes --quiet
sudo apt-get upgrade --yes --quiet
sudo apt-get install --yes --quiet python3-pip cmake iproute2 sudo apt-get install --yes --quiet python3-pip cmake iproute2
sudo python3 -m pip install --upgrade pip sudo python3 -m pip install --upgrade pip
sudo python3 -m pip install --upgrade wheel meson ninja sudo python3 -m pip install --upgrade wheel meson ninja
- name: "INSTALL: nvme-stas dependencies" - name: "INSTALL: nvme-stas dependencies"
run: | run: |
sudo apt-get install --yes --quiet docbook-xml sudo apt-get install --yes --quiet docbook-xml docbook-xsl xsltproc libglib2.0-dev libgirepository1.0-dev libsystemd-dev
sudo apt-get install --yes --quiet docbook-xsl sudo apt-get install --yes --quiet python3-systemd python3-pyudev python3-lxml
sudo apt-get install --yes --quiet xsltproc
sudo apt-get install --yes --quiet libglib2.0-dev
sudo apt-get install --yes --quiet libgirepository1.0-dev
sudo apt-get install --yes --quiet libsystemd-dev
sudo apt-get install --yes --quiet python3-systemd
sudo apt-get install --yes --quiet python3-pyudev
sudo apt-get install --yes --quiet python3-lxml
python3 -m pip install --upgrade dasbus pylint pyflakes PyGObject python3 -m pip install --upgrade dasbus pylint pyflakes PyGObject
python3 -m pip install --upgrade vermin pyfakefs importlib-resources python3 -m pip install --upgrade vermin pyfakefs importlib-resources
- name: "INSTALL: libnvme dependencies" - name: "INSTALL: libnvme dependencies"
run: | run: |
sudo apt-get install --yes --quiet swig sudo apt-get install --yes --quiet swig libjson-c-dev
sudo apt-get install --yes --quiet libjson-c-dev
- name: "SETUP: [nvme-stas, libnvme]"
run: |
meson subprojects download
meson setup --buildtype=release --sysconfdir=/etc --prefix=/usr -Dman=true -Dhtml=true -Dlibnvme:python=enabled -Dlibnvme:libdbus=disabled -Dlibnvme:openssl=disabled -Dlibnvme:json-c=disabled -Dlibnvme:keyutils=disabled .build
- name: "CONFIG: PYTHONPATH" - name: "CONFIG: PYTHONPATH"
run: | run: |
@ -57,7 +41,7 @@ jobs:
with: with:
action: test action: test
directory: .build directory: .build
setup-options: --buildtype=release --sysconfdir=/etc --prefix=/usr -Dman=true -Dhtml=true -Dlibnvme:python=enabled -Dlibnvme:libdbus=disabled -Dlibnvme:openssl=disabled -Dlibnvme:json-c=disabled -Dlibnvme:keyutils=disabled setup-options: --buildtype=release --sysconfdir=/etc --prefix=/usr -Dman=true -Dhtml=true -Dlibnvme:buildtype=release -Dlibnvme:sysconfdir=/etc -Dlibnvme:prefix=/usr -Dlibnvme:python=enabled -Dlibnvme:libdbus=disabled -Dlibnvme:openssl=disabled -Dlibnvme:json-c=disabled -Dlibnvme:keyutils=disabled
options: --print-errorlogs --suite nvme-stas options: --print-errorlogs --suite nvme-stas
# Preserve meson's log file on failure # Preserve meson's log file on failure
@ -77,4 +61,4 @@ jobs:
- uses: codecov/codecov-action@v3 - uses: codecov/codecov-action@v3
with: with:
fail_ci_if_error: false fail_ci_if_error: false

View file

@ -37,44 +37,26 @@ jobs:
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
# - name: "UPGRADE: existing packages"
# run: |
# sudo apt-get update --yes --quiet || true
# sudo apt-get upgrade --yes --quiet || true
- name: "INSTALL: additional packages" - name: "INSTALL: additional packages"
run: | run: |
sudo apt-get install --yes --quiet python3-pip || true sudo apt-get install --yes --quiet python3-pip cmake libgirepository1.0-dev libsystemd-dev python3-systemd swig libjson-c-dev || true
sudo apt-get install --yes --quiet cmake || true sudo python3 -m pip install --upgrade pip wheel meson ninja
sudo apt-get install --yes --quiet libgirepository1.0-dev || true python3 -m pip install --upgrade dasbus pylint pyflakes PyGObject lxml pyudev
sudo apt-get install --yes --quiet libsystemd-dev || true
sudo apt-get install --yes --quiet python3-systemd || true
sudo python3 -m pip install --upgrade pip
sudo python3 -m pip install --upgrade wheel
sudo python3 -m pip install --upgrade meson
sudo python3 -m pip install --upgrade ninja
python3 -m pip install --upgrade dasbus
python3 -m pip install --upgrade pylint
python3 -m pip install --upgrade pyflakes
python3 -m pip install --upgrade PyGObject
python3 -m pip install --upgrade lxml
python3 -m pip install --upgrade pyudev
- name: "BUILD: libnvme" - name: "BUILD: [libnvme, nvme-stas]"
run: | uses: BSFishy/meson-build@v1.0.3
sudo apt-get install --yes --quiet swig libjson-c-dev || true with:
meson subprojects download action: build
meson setup builddir subprojects/libnvme -Dlibdbus=disabled -Dopenssl=disabled -Dbuildtype=release -Dprefix=/usr -Dpython=enabled directory: .build
ninja -C builddir setup-options: --buildtype=release --sysconfdir=/etc --prefix=/usr -Dlibnvme:buildtype=release -Dlibnvme:sysconfdir=/etc -Dlibnvme:prefix=/usr -Dlibnvme:python=enabled -Dlibnvme:libdbus=disabled -Dlibnvme:openssl=disabled -Dlibnvme:json-c=disabled -Dlibnvme:keyutils=disabled
sudo meson install -C builddir
- name: Set PYTHONPATH - name: Set PYTHONPATH
run: | run: |
echo "PYTHONPATH=builddir:builddir/subprojects/libnvme:/usr/lib/python3/dist-packages/" >> $GITHUB_ENV echo "PYTHONPATH=.build:.build/subprojects/libnvme:/usr/lib/python3/dist-packages" >> $GITHUB_ENV
- name: Show test environment - name: Show test environment
run: | run: |
echo -e "Build Directory:\n$(ls -laF builddir)" echo -e "Build Directory:\n$(ls -laF .build)"
python3 -VV python3 -VV
python3 -m site python3 -m site
python3 -m pylint --version python3 -m pylint --version
@ -82,12 +64,12 @@ jobs:
- name: Pylint - name: Pylint
run: | run: |
python3 -m pylint --rcfile=test/pylint.rc *.py staslib python3 -m pylint -j 0 --rcfile=test/pylint.rc .build/stacctl .build/stacd .build/stafctl .build/stafd .build/stasadm .build/staslib
- name: Pyflakes - name: Pyflakes
if: always() if: always()
run: | run: |
python3 -m pyflakes *.py staslib python3 -m pyflakes .build/stacctl .build/stacd .build/stafctl .build/stafd .build/stasadm .build/staslib
python-black: python-black:
if: ${{ !github.event.act }} # skip during local actions testing if: ${{ !github.event.act }} # skip during local actions testing

View file

@ -15,6 +15,7 @@ Bug fixes:
* Udev event handling: use `systemctl restart` instead of `systemctl start`. There is a small chance that a `start` operation has not completed when a new `start` is required. Issuing a `start` while a `start` is being performed has no effect. However, a `restart` will be handled properly. * Udev event handling: use `systemctl restart` instead of `systemctl start`. There is a small chance that a `start` operation has not completed when a new `start` is required. Issuing a `start` while a `start` is being performed has no effect. However, a `restart` will be handled properly.
* `stafd`: Do not delete and recreate DC objects on kernel events indicating that an nvme device associated to a discovery controller was removed by the kernel. This was done to kick start the reconnect process, but was also causing the DLPE (Discovery Log Page Entries) cache to be lost. This could potentially result in `stacd` disconnecting from I/O controllers. Instead, keep the existing DC object which contains a valid DLPE cache and simply restart the "retry to connect" timer. This way the DLPE cache is maintained throughout the reconnect to DC process. * `stafd`: Do not delete and recreate DC objects on kernel events indicating that an nvme device associated to a discovery controller was removed by the kernel. This was done to kick start the reconnect process, but was also causing the DLPE (Discovery Log Page Entries) cache to be lost. This could potentially result in `stacd` disconnecting from I/O controllers. Instead, keep the existing DC object which contains a valid DLPE cache and simply restart the "retry to connect" timer. This way the DLPE cache is maintained throughout the reconnect to DC process.
* While testing Boot from SAN (BFS) and using a Host NQN during boot that is different from the Host NQN used after boot (i.e. the Host NQN defined in `/etc/nvme/hostnqn`), we found that nvme-stas and libnvme are reusing existing connections even if the Host NQN doesn't match. nvme-stas will now take a connection's Host NQN into consideration before deciding if a connection can be reused. A similar fix will be provided in libnvme as well. * While testing Boot from SAN (BFS) and using a Host NQN during boot that is different from the Host NQN used after boot (i.e. the Host NQN defined in `/etc/nvme/hostnqn`), we found that nvme-stas and libnvme are reusing existing connections even if the Host NQN doesn't match. nvme-stas will now take a connection's Host NQN into consideration before deciding if a connection can be reused. A similar fix will be provided in libnvme as well.
* `Udev._cid_matches_tid()` - When checking `subsysnqn`, take well-known NQN (`nqn.2014-08.org.nvmexpress.discovery`) into account. Per TP8013, Discovery Controllers may use a unique NQN instead of the well-known NQN. This can cause a discrepancy between the candidate connection DC and existing connections and cause a matching existing connection to fail to match the candidate connection.
## Changes with release 2.2.3 ## Changes with release 2.2.3

View file

@ -9,7 +9,7 @@
project( project(
'nvme-stas', 'nvme-stas',
meson_version: '>= 0.53.0', meson_version: '>= 0.53.0',
version: '2.3-rc4', version: '2.3-rc5',
license: 'Apache-2.0', license: 'Apache-2.0',
default_options: [ default_options: [
'buildtype=release', 'buildtype=release',

View file

@ -251,12 +251,14 @@ class Udev:
6.1. 6.1.
''' '''
# 'transport', 'traddr', 'trsvcid', 'subsysnqn', and 'host-nqn' must exactly match. # 'transport', 'traddr', 'trsvcid', 'subsysnqn', and 'host-nqn' must exactly match.
if ( if tid.transport != cid['transport'] or tid.trsvcid != cid['trsvcid'] or tid.host_nqn != cid['host-nqn']:
cid['transport'] != tid.transport return False
or cid['trsvcid'] != tid.trsvcid
or cid['subsysnqn'] != tid.subsysnqn # With TP8013, Discovery Controllers may respond with a unique NQN even
or cid['host-nqn'] != tid.host_nqn # when a connection request is made with the well-known NQN. Therefore,
): # the subsysnqn is not reliable when the candidate requests the well-
# known NQN.
if tid.subsysnqn not in (defs.WELL_KNOWN_DISC_NQN, cid['subsysnqn']):
return False return False
if tid.transport in ('tcp', 'rdma'): if tid.transport in ('tcp', 'rdma'):