Skip to content

unify all DNF calls from python code

Filip Pokryvka requested to merge fp/nmci_process_dnf into main

Unify timeout (120s), ignore_stderr (True), ignore_returncode (False, but will do 3 attempts if non-zero returncode), attempts (3). Sometimes dnf install timeouts, sometimes there is problem with mirror, 3 attempts should make the code more stable.

This is in reaction to: https://jenkins-networkmanager.apps.ocp.cloud.ci.centos.org/job/NetworkManager-code-mr/5608/artifact/FAIL-report_NetworkManager-ci-M1_Test0662_simwifi_p2p_connect.html#toggle=cd94,445c

Traceback (most recent call last):
  File "features/environment.py", line 201, in _before_scenario
    tag.before_scenario(context, scenario)
  File "/root/NetworkManager-ci/nmci/tags.py", line 48, in before_scenario
    self._before_scenario(context, scenario, **self.args)
  File "/root/NetworkManager-ci/nmci/tags.py", line 1173, in simwifi_p2p_bs
    nmci.process.run(
  File "/root/NetworkManager-ci/nmci/process.py", line 527, in run
    return self._run(
  File "/root/NetworkManager-ci/nmci/process.py", line 419, in _run
    self.raise_results(
  File "/root/NetworkManager-ci/nmci/process.py", line 341, in raise_results
    raise exc_type(msg)
TimeoutError: `dnf -y downgrade https://kojihub.stream.centos.org/kojifiles/packages/wireless-regdb/2020.11.20/6.el9/noarch/wireless-regdb-2020.11.20-6.el9.noarch.rpm` timed out in 5.000 seconds
STDOUT:
Last metadata expiration check: 2:54:19 ago on Mon 12 Aug 2024 11:07:27 AM UTC.
wireless-regdb-2020.11.20-6.el9.noarch.rpm      276 kB/s |  16 kB     00:00    
Dependencies resolved.
================================================================================
 Package             Arch        Version                Repository         Size
================================================================================
Downgrading:
 wireless-regdb      noarch      2020.11.20-6.el9       @commandline       16 k

Transaction Summary
================================================================================
Downgrade  1 Package

Total size: 16 k
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Downgrading      : wireless-regdb-2020.11.20-6.el9.noarch                 1/2 
  Cleanup          : wireless-regdb-2023.09.01-1.el9.noarch                 2/2 
  Running scriptlet: wireless-regdb-2023.09.01-1.el9.noarch                 2/2 
  Verifying        : wireless-regdb-2020.11.20-6.el9.noarch                 1/2 
  Verifying        : wireless-regdb-2023.09.01-1.el9.noarch                 2/2 
Edited by Filip Pokryvka

Merge request reports

Loading