Bug 1908602 - dnf packager is broken on CentOS Stream
Summary: dnf packager is broken on CentOS Stream
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: otopi
Classification: oVirt
Component: Plugins.packagers
Version: master
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ovirt-4.4.5
: 1.9.3
Assignee: Yedidyah Bar David
QA Contact: Guilherme Santos
URL:
Whiteboard:
: 1909965 (view as bug list)
Depends On:
Blocks: 1915806
TreeView+ depends on / blocked
 
Reported: 2020-12-17 06:54 UTC by Yedidyah Bar David
Modified: 2021-03-22 12:57 UTC (History)
3 users (show)

Fixed In Version: otopi-1.9.3
Clone Of:
Environment:
Last Closed: 2021-03-22 10:22:30 UTC
oVirt Team: Integration
Embargoed:
pm-rhel: ovirt-4.4+
sbonazzo: devel_ack+
gdeolive: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 112682 0 master MERGED core: Support dnf packager in CentOS Stream 2021-02-11 15:53:25 UTC

Description Yedidyah Bar David 2020-12-17 06:54:02 UTC
Description of problem:

It fails with (e.g. from [1][2]):

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/otopi/context.py", line 132, in _executeMethod
    method['method']()
  File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine-common/distro-rpm/packages.py", line 322, in _setup
    osetuputil.getPackageManager(self.logger)
  File "/usr/share/ovirt-engine/setup/ovirt_engine_setup/util.py", line 265, in getPackageManager
    'No supported package manager found in your system'
RuntimeError: No supported package manager found in your system

This is due to code in otopi that disables dnf if the OS verion is not at least >= '8.0'. CentOS Stream reports '8'. With a patch it to require >= '8' [3], it fails with [4][5]:

2020-12-16 21:48:33,353+0000 ERROR otopi.plugins.otopi.packagers.dnfpackager dnfpackager.error:84 DNF Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
2020-12-16 21:48:33,355+0000 DEBUG otopi.context context._executeMethod:145 method exception
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/dnf/repo.py", line 574, in load
    ret = self._repo.load()
  File "/usr/lib64/python3.6/site-packages/libdnf/repo.py", line 397, in load
    return _repo.Repo_load(self)
libdnf._error.Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/otopi/context.py", line 132, in _executeMethod
    method['method']()
  File "/usr/share/otopi/plugins/otopi/packagers/dnfpackager.py", line 205, in _setup
    with self._minidnf.transaction():
  File "/usr/lib/python3.6/site-packages/otopi/minidnf.py", line 291, in __enter__
    self._managed.beginTransaction()
  File "/usr/lib/python3.6/site-packages/otopi/minidnf.py", line 562, in beginTransaction
    self._base = self._createBase()
  File "/usr/lib/python3.6/site-packages/otopi/minidnf.py", line 351, in _createBase
    base.fill_sack()
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 392, in fill_sack
    self._add_repo_to_sack(r)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 137, in _add_repo_to_sack
    repo.load()
  File "/usr/lib/python3.6/site-packages/dnf/repo.py", line 581, in load
    raise dnf.exceptions.RepoError(str(e))
dnf.exceptions.RepoError: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist

[1] https://jenkins.ovirt.org/job/ovirt-system-tests_he-basic-suite-master/1853/

[2] https://jenkins.ovirt.org/job/ovirt-system-tests_he-basic-suite-master/1853/artifact/exported-artifacts/test_logs/he-basic-suite-master/post-he_deploy/lago-he-basic-suite-master-host-0/_var_log/ovirt-hosted-engine-setup/engine-logs-2020-12-17T02%3A18%3A09Z/ovirt-engine/setup/ovirt-engine-setup-20201217031711-6m07d0.log

[3] https://gerrit.ovirt.org/c/otopi/+/112682

[4] https://jenkins.ovirt.org/job/otopi_standard-check-patch/340/

[5] https://jenkins.ovirt.org/job/otopi_standard-check-patch/340/artifact/check-patch.el8.x86_64/logs/otopi-packager-stream-20201216214830-kay532.log

Comment 1 Sandro Bonazzola 2020-12-22 09:34:03 UTC
*** Bug 1909965 has been marked as a duplicate of this bug. ***

Comment 3 Sandro Bonazzola 2021-03-22 12:57:23 UTC
This bugzilla is included in oVirt 4.4.5 release, published on March 18th 2021.

Since the problem described in this bug report should be resolved in oVirt 4.4.5 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.