Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package nvme-stas for openSUSE:Factory checked in at 2023-10-13 23:15:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nvme-stas (Old) and /work/SRC/openSUSE:Factory/.nvme-stas.new.20540 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nvme-stas" Fri Oct 13 23:15:32 2023 rev:16 rq:1116491 version:2.3 Changes: -------- --- /work/SRC/openSUSE:Factory/nvme-stas/nvme-stas.changes 2023-09-22 21:49:53.394253043 +0200 +++ /work/SRC/openSUSE:Factory/.nvme-stas.new.20540/nvme-stas.changes 2023-10-13 23:16:29.738986007 +0200 @@ -1,0 +2,5 @@ +Mon Oct 9 14:03:04 UTC 2023 - Martin Wilck <mwi...@suse.com> + +- Actually update the code from 2.3-rc4 to 2.3 + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ _service ++++++ --- /var/tmp/diff_new_pack.ENxhfg/_old 2023-10-13 23:16:30.203002837 +0200 +++ /var/tmp/diff_new_pack.ENxhfg/_new 2023-10-13 23:16:30.207002982 +0200 @@ -4,7 +4,7 @@ <param name="url">https://github.com/linux-nvme/nvme-stas.git</param> <param name="filename">nvme-stas</param> <param name="versionformat">@PARENT_TAG@</param> - <param name="revision">v2.3-rc4</param> + <param name="revision">v2.3</param> <param name="versionrewrite-pattern">v(\d+.\d+(\.d+)?)(-rc(\d+))?</param> <!-- <param name="versionrewrite-replacement">\1\2~\4</param> --> <param name="versionrewrite-replacement">\1\2</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.ENxhfg/_old 2023-10-13 23:16:30.223003562 +0200 +++ /var/tmp/diff_new_pack.ENxhfg/_new 2023-10-13 23:16:30.227003708 +0200 @@ -1,7 +1,7 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/linux-nvme/nvme-stas.git</param> - <param name="changesrevision">6499b02fb24f42317d020e0d76aad4defe38fc7f</param> + <param name="changesrevision">fa23cc7930935876e4fb47f8348c58ba22c4be08</param> </service> </servicedata> (No newline at EOF) ++++++ nvme-stas-2.3.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvme-stas-2.3/.github/workflows/docker-publish.yml new/nvme-stas-2.3/.github/workflows/docker-publish.yml --- old/nvme-stas-2.3/.github/workflows/docker-publish.yml 2023-08-15 19:50:36.000000000 +0200 +++ new/nvme-stas-2.3/.github/workflows/docker-publish.yml 2023-09-21 19:25:53.000000000 +0200 @@ -32,13 +32,13 @@ steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Login against a Docker registry except on PR # https://github.com/docker/login-action - name: Log into registry ${{ env.REGISTRY }} if: github.event_name != 'pull_request' - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -48,14 +48,14 @@ # https://github.com/docker/metadata-action - name: Extract Docker metadata id: meta - uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175 + uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action - name: Build and push Docker image - uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 + uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 with: context: . push: ${{ github.event_name != 'pull_request' }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvme-stas-2.3/.github/workflows/docker-test.yml new/nvme-stas-2.3/.github/workflows/docker-test.yml --- old/nvme-stas-2.3/.github/workflows/docker-test.yml 2023-08-15 19:50:36.000000000 +0200 +++ new/nvme-stas-2.3/.github/workflows/docker-test.yml 2023-09-21 19:25:53.000000000 +0200 @@ -13,11 +13,13 @@ if: ${{ !github.event.act }} # skip during local actions testing runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install requirements # make sure nvme-cli installed (we need it for /etc/nvme/hostnqn and /etc/nvme/hostid) - run: sudo apt-get install --yes --quiet nvme-cli + run: | + sudo apt update + sudo apt-get install --yes --quiet nvme-cli - name: Load Kernel drivers run: sudo modprobe -v nvme-fabrics diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvme-stas-2.3/.github/workflows/meson-test.yml new/nvme-stas-2.3/.github/workflows/meson-test.yml --- old/nvme-stas-2.3/.github/workflows/meson-test.yml 2023-08-15 19:50:36.000000000 +0200 +++ new/nvme-stas-2.3/.github/workflows/meson-test.yml 2023-09-21 19:25:53.000000000 +0200 @@ -13,40 +13,25 @@ runs-on: ubuntu-latest steps: - name: "CHECKOUT: nvme-stas" - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: "INSTALL: Overall dependencies" 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 update sudo apt-get install --yes --quiet python3-pip cmake iproute2 sudo python3 -m pip install --upgrade pip sudo python3 -m pip install --upgrade wheel meson ninja - name: "INSTALL: nvme-stas dependencies" run: | - sudo apt-get install --yes --quiet docbook-xml - sudo apt-get install --yes --quiet docbook-xsl - 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 + 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 python3-systemd python3-pyudev python3-lxml python3 -m pip install --upgrade dasbus pylint pyflakes PyGObject python3 -m pip install --upgrade vermin pyfakefs importlib-resources - name: "INSTALL: libnvme dependencies" run: | - sudo apt-get install --yes --quiet swig - 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 + sudo apt-get install --yes --quiet swig libjson-c-dev - name: "CONFIG: PYTHONPATH" run: | @@ -57,7 +42,7 @@ with: action: test 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 # Preserve meson's log file on failure @@ -77,4 +62,4 @@ - uses: codecov/codecov-action@v3 with: - fail_ci_if_error: false \ No newline at end of file + fail_ci_if_error: false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvme-stas-2.3/.github/workflows/pylint.yml new/nvme-stas-2.3/.github/workflows/pylint.yml --- old/nvme-stas-2.3/.github/workflows/pylint.yml 2023-08-15 19:50:36.000000000 +0200 +++ new/nvme-stas-2.3/.github/workflows/pylint.yml 2023-09-21 19:25:53.000000000 +0200 @@ -14,7 +14,7 @@ if: ${{ !github.event.act }} # skip during local actions testing runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: hadolint/hadolint-action@v3.1.0 with: recursive: true @@ -30,51 +30,34 @@ steps: - name: "CHECKOUT: nvme-stas" - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: 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" run: | - sudo apt-get install --yes --quiet python3-pip || true - sudo apt-get install --yes --quiet cmake || true - sudo apt-get install --yes --quiet libgirepository1.0-dev || true - 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 + sudo apt update + sudo apt-get install --yes --quiet python3-pip cmake libgirepository1.0-dev libsystemd-dev python3-systemd swig libjson-c-dev || true + sudo python3 -m pip install --upgrade pip wheel meson ninja + python3 -m pip install --upgrade dasbus pylint pyflakes PyGObject lxml pyudev - - name: "BUILD: libnvme" - run: | - sudo apt-get install --yes --quiet swig libjson-c-dev || true - meson subprojects download - meson setup builddir subprojects/libnvme -Dlibdbus=disabled -Dopenssl=disabled -Dbuildtype=release -Dprefix=/usr -Dpython=enabled - ninja -C builddir - sudo meson install -C builddir + - name: "BUILD: [libnvme, nvme-stas]" + uses: BSFishy/meson-build@v1.0.3 + with: + action: build + directory: .build + 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 - name: Set PYTHONPATH 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 run: | - echo -e "Build Directory:\n$(ls -laF builddir)" + echo -e "Build Directory:\n$(ls -laF .build)" python3 -VV python3 -m site python3 -m pylint --version @@ -82,12 +65,12 @@ - name: Pylint 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 if: always() run: | - python3 -m pyflakes *.py staslib + python3 -m pyflakes .build/stacctl .build/stacd .build/stafctl .build/stafd .build/stasadm .build/staslib python-black: if: ${{ !github.event.act }} # skip during local actions testing @@ -95,7 +78,7 @@ runs-on: ubuntu-latest steps: - name: "CHECKOUT: nvme-stas" - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: "BLACK" uses: psf/black@stable diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvme-stas-2.3/.readthedocs.yaml new/nvme-stas-2.3/.readthedocs.yaml --- old/nvme-stas-2.3/.readthedocs.yaml 2023-08-15 19:50:36.000000000 +0200 +++ new/nvme-stas-2.3/.readthedocs.yaml 2023-09-21 19:25:53.000000000 +0200 @@ -9,9 +9,6 @@ version: 2 -python: - system_packages: true - build: os: ubuntu-22.04 tools: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvme-stas-2.3/NEWS.md new/nvme-stas-2.3/NEWS.md --- old/nvme-stas-2.3/NEWS.md 2023-08-15 19:50:36.000000000 +0200 +++ new/nvme-stas-2.3/NEWS.md 2023-09-21 19:25:53.000000000 +0200 @@ -5,9 +5,10 @@ New features: - Support for nBFT (NVMe-oF Boot Table). -- The Avahi driver will now verify reachability of services discovered through mDNS to make sure all discovered IP addresses can be connected to. This avoids invoking the NVMe kernel driver with invalid IP addresses and getting error messages in the syslog. +- The Avahi driver will now verify reachability of services discovered through mDNS to make sure all discovered IP addresses can be connected to. This avoids invoking the NVMe kernel driver with invalid IP addresses and getting error messages in the syslog. While testing this feature, we found that the CDC may advertise itself (using mDNS) before it is actually ready to receive connections from the host. If a host reacting to mDNS advertisements tries to connect to the CDC before the CDC is listening for connections, a "Connection refused" will happen and the host may conclude that the CDC is not reachable. For that reason the host will keep trying to connect in the background. Retries will initially happen at a face pace and gradually be done at a slower pace. - The Avahi driver will now print an error message if the same IP address is found on multiple interfaces. This indicates a misconfiguration of the network. - Simplify algorithm that determines if an existing connection (is sysfs) can be reused by stafd/stacd instead of creating a duplicate connection. +- Improve scalability. First, the algorithm that handles kernel events was reworked to handle events faster. Second, limit the amount of times that the netlink kernel interface is invoked. Instead invoke netlink once and cache & reuse the data for the whole duration of the scanning loop. Bug fixes: @@ -15,6 +16,7 @@ * 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. * 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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvme-stas-2.3/meson.build new/nvme-stas-2.3/meson.build --- old/nvme-stas-2.3/meson.build 2023-08-15 19:50:36.000000000 +0200 +++ new/nvme-stas-2.3/meson.build 2023-09-21 19:25:53.000000000 +0200 @@ -9,7 +9,7 @@ project( 'nvme-stas', meson_version: '>= 0.53.0', - version: '2.3-rc4', + version: '2.3', license: 'Apache-2.0', default_options: [ 'buildtype=release', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvme-stas-2.3/staslib/avahi.py new/nvme-stas-2.3/staslib/avahi.py --- old/nvme-stas-2.3/staslib/avahi.py 2023-08-15 19:50:36.000000000 +0200 +++ new/nvme-stas-2.3/staslib/avahi.py 2023-09-21 19:25:53.000000000 +0200 @@ -71,6 +71,29 @@ ) +class ValueRange: + '''Implement a range of values with ceiling. Once the ceiling has been + reached, then any further request for a new value will return the + ceiling (i.e last value).''' + + def __init__(self, values: list): + self._values = values + self._index = 0 + + def get_next(self): + '''Get the next value (or last value if ceiling was reached)''' + value = self._values[self._index] + if self._index >= 0: + self._index += 1 + if self._index >= len(self._values): + self._index = -1 + return value + + def reset(self): + '''Reset the range to start from the beginning''' + self._index = 0 + + # ****************************************************************************** class Service: # pylint: disable=too-many-instance-attributes '''Object used to keep track of the services discovered from the avahi-daemon''' @@ -109,6 +132,11 @@ self._interface_id, self._protocol_id, self._name, self._stype, self._domain, self._flags ) + self._connect_check_retry_tmo = ValueRange([2, 5, 10, 30, 60, 300, 600]) + self._connect_check_retry_tmr = gutil.GTimer( + self._connect_check_retry_tmo.get_next(), self._on_connect_check_retry + ) + self._ip = None self._resolver = None self._data = {} @@ -151,8 +179,17 @@ self._identified_cback() return + self._connect_check(verbose=True) # Enable verbosity on first attempt + + def _connect_check(self, verbose=False): self._reachable = False - connect_checker = gutil.TcpChecker(traddr, trsvcid, host_iface, self._tcp_connect_check_cback) + connect_checker = gutil.TcpChecker( + self._data['traddr'], + self._data['trsvcid'], + self._data['host-iface'], + verbose, + self._tcp_connect_check_cback, + ) try: connect_checker.connect() @@ -168,7 +205,16 @@ self._connect_checker.close() self._connect_checker = None self._reachable = connected - self._identified_cback() + + if self._reachable: + self._identified_cback() + else: + # Restart the timer but with incremented timeout + self._connect_check_retry_tmr.start(self._connect_check_retry_tmo.get_next()) + + def _on_connect_check_retry(self): + self._connect_check() + return GLib.SOURCE_REMOVE def set_resolver(self, resolver): '''Set the resolver object''' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvme-stas-2.3/staslib/gutil.py new/nvme-stas-2.3/staslib/gutil.py --- old/nvme-stas-2.3/staslib/gutil.py 2023-08-15 19:50:36.000000000 +0200 +++ new/nvme-stas-2.3/staslib/gutil.py 2023-09-21 19:25:53.000000000 +0200 @@ -423,7 +423,9 @@ class TcpChecker: # pylint: disable=too-many-instance-attributes '''@brief Verify that a TCP connection can be established with an enpoint''' - def __init__(self, traddr, trsvcid, host_iface, user_cback, *user_data): + def __init__( + self, traddr, trsvcid, host_iface, verbose, user_cback, *user_data + ): # pylint: disable=too-many-arguments self._user_cback = user_cback self._host_iface = host_iface self._user_data = user_data @@ -432,6 +434,7 @@ self._cancellable = None self._gio_sock = None self._native_sock = None + self._verbose = verbose def connect(self): '''Attempt to connect''' @@ -502,13 +505,14 @@ if err.matches(Gio.io_error_quark(), Gio.IOErrorEnum.CANCELLED): logging.debug('TcpChecker._connect_async_cback() - %s', err.message) # pylint: disable=no-member else: - logging.info( - 'Unable to verify TCP connectivity - (%-10s %-14s %s): %s', - self._host_iface + ',', - self._traddr.compressed + ',', - self._trsvcid, - err.message, # pylint: disable=no-member - ) + if self._verbose: + logging.info( + 'Unable to verify TCP connectivity - (%-10s %-14s %s): %s', + self._host_iface + ',', + self._traddr.compressed + ',', + self._trsvcid, + err.message, # pylint: disable=no-member + ) self.close() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nvme-stas-2.3/staslib/udev.py new/nvme-stas-2.3/staslib/udev.py --- old/nvme-stas-2.3/staslib/udev.py 2023-08-15 19:50:36.000000000 +0200 +++ new/nvme-stas-2.3/staslib/udev.py 2023-09-21 19:25:53.000000000 +0200 @@ -251,12 +251,14 @@ 6.1. ''' # 'transport', 'traddr', 'trsvcid', 'subsysnqn', and 'host-nqn' must exactly match. - if ( - cid['transport'] != tid.transport - or cid['trsvcid'] != tid.trsvcid - or cid['subsysnqn'] != tid.subsysnqn - or cid['host-nqn'] != tid.host_nqn - ): + if tid.transport != cid['transport'] or tid.trsvcid != cid['trsvcid'] or tid.host_nqn != cid['host-nqn']: + return False + + # With TP8013, Discovery Controllers may respond with a unique NQN even + # 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 if tid.transport in ('tcp', 'rdma'): ++++++ nvme-stas.obsinfo ++++++ --- /var/tmp/diff_new_pack.ENxhfg/_old 2023-10-13 23:16:30.391009657 +0200 +++ /var/tmp/diff_new_pack.ENxhfg/_new 2023-10-13 23:16:30.395009801 +0200 @@ -1,5 +1,5 @@ name: nvme-stas version: 2.3 -mtime: 1692121836 -commit: 6499b02fb24f42317d020e0d76aad4defe38fc7f +mtime: 1695317153 +commit: fa23cc7930935876e4fb47f8348c58ba22c4be08