Bug 1750093 - dnf plugin silently ignores updated packages with broken dependencies
Summary: dnf plugin silently ignores updated packages with broken dependencies
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.0
: 1.9.0
Assignee: Yedidyah Bar David
QA Contact: Guilherme Santos
URL:
Whiteboard:
Depends On:
Blocks: 1700864
TreeView+ depends on / blocked
 
Reported: 2019-09-08 09:14 UTC by Yedidyah Bar David
Modified: 2020-05-20 20:00 UTC (History)
2 users (show)

Fixed In Version: otopi-1.9.0
Clone Of:
Environment:
Last Closed: 2020-05-20 20:00:40 UTC
oVirt Team: Integration
Embargoed:
sbonazzo: ovirt-4.4?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 103180 0 master MERGED minidnf: Use "best" available version, fail otherwise 2020-02-22 16:39:41 UTC

Description Yedidyah Bar David 2019-09-08 09:14:28 UTC
Description of problem:

$Subject.

I tried updating my master snapshot setup on fedora 29, and engine-setup showed quite few packages that need to be updated. I suspected that there should be more, and manually tried with 'dnf', and indeed saw that some packages had broken dependencies (specifically, ovirt-engine-metrics requires now ansible >= 2.8.3, but fedora 29 only has 2.8.2). I couldn't find any clue about this in the setup logs.

With the linked patch, it fails with:

[ ERROR ] Failed to execute stage 'Environment customization':
          Problem 1: package ovirt-engine-4.4.0-0.0.master.20190907174741.gitd1c8e769e12.fc29.noarch requires ovirt-engine-tools = 4.4.0-0.0.master.20190907174741.gitd1c8e769e12.fc29, but none of the providers can be installed
           - package ovirt-engine-tools-4.4.0-0.0.master.20190907174741.gitd1c8e769e12.fc29.noarch requires ovirt-engine-metrics >= 1.3.4.1, but none of the providers can be installed
           - cannot install the best candidate for the job
           - nothing provides ansible >= 2.8.3 needed by ovirt-engine-metrics-1.3.5-0.0.master.20190905084609.git2a2f4b8.fc29.noarch
          Problem 2: problem with installed package ovirt-engine-4.4.0-0.0.master.20190822145705.git73e675af300.fc29.noarch
           - cannot install the best update candidate for package ovirt-engine-4.4.0-0.0.master.20190822145705.git73e675af300.fc29.noarch
           - package ovirt-engine-4.4.0-0.0.master.20190905120342.gitc1dcb20d60e.fc29.noarch requires ovirt-engine-tools = 4.4.0-0.0.master.20190905120342.gitc1dcb20d60e.fc29, but none of the providers can be installed
           - package ovirt-engine-4.4.0-0.0.master.20190906150736.gita42f120b8ba.fc29.noarch requires ovirt-engine-tools = 4.4.0-0.0.master.20190906150736.gita42f120b8ba.fc29, but none of the providers can be installed
           - package ovirt-engine-4.4.0-0.0.master.20190907174741.gitd1c8e769e12.fc29.noarch requires ovirt-engine-tools = 4.4.0-0.0.master.20190907174741.gitd1c8e769e12.fc29, but none of the providers can be installed
           - package ovirt-engine-4.4.0-0.0.master.20190905052444.git44d80d1fe49.fc29.noarch requires ovirt-engine-tools = 4.4.0-0.0.master.20190905052444.git44d80d1fe49.fc29, but none of the providers can be installed
           - package ovirt-engine-tools-4.4.0-0.0.master.20190905120342.gitc1dcb20d60e.fc29.noarch requires ovirt-engine-metrics >= 1.3.4.1, but none of the providers can be installed
           - package ovirt-engine-tools-4.4.0-0.0.master.20190906150736.gita42f120b8ba.fc29.noarch requires ovirt-engine-metrics >= 1.3.4.1, but none of the providers can be installed
           - package ovirt-engine-tools-4.4.0-0.0.master.20190907174741.gitd1c8e769e12.fc29.noarch requires ovirt-engine-metrics >= 1.3.4.1, but none of the providers can be installed
           - package ovirt-engine-tools-4.4.0-0.0.master.20190905052444.git44d80d1fe49.fc29.noarch requires ovirt-engine-metrics >= 1.3.4.1, but none of the providers can be installed
           - nothing provides ansible >= 2.8.3 needed by ovirt-engine-metrics-1.3.5-0.0.master.20190905084609.git2a2f4b8.fc29.noarch

which IMO is the expected result. Perhaps it should be optional, though, not sure.

Version-Release number of selected component (if applicable):
Probably forever (since we started supporting dnf)

How reproducible:
Always

Steps to Reproduce:
1. Run engine-setup when there are broken dependencies for packages it should update
2.
3.

Actual results:
It continues, not mentioning these packages.

Expected results:
IMO it should fail, showing the broken dependencies.

Additional info:

https://dnf.readthedocs.io/en/latest/api_conf.html#dnf.conf.Conf.best

https://unix.stackexchange.com/questions/341333/dnf-how-to-tell-whats-causing-broken-dependencies

The first link above claims that the default is True. Despite that, it didn't work as I expected, and setting it to True then made it behave as I expected.

Comment 1 Guilherme Santos 2020-02-22 16:50:38 UTC
Verified on:
ovirt-engine-4.4.0-0.4.master.el7.noarch
otopi-common-1.9.0-0.0.master.20191006084300.git09ae880.el7ev.noarch
python2-otopi-1.9.0-0.0.master.20191006084300.git09ae880.el7ev.noarch

Steps: 
1. Have a 4.4 old version
2. Install dnf
3. update 4.4 repositories to the newest 4.4 version
4. # dnf update rhvm-setup-plugins ovirt-engine-setup ovirt-engine-setup-plugin-websocket-proxy
5. # vi /etc/yum.repos.d/rhel.repo
6. comment base-internal-compose, base-extras and base-production-mirror repositories to break some dependencies
7. # OTOPI_DNF_ENABLE=1 engine-setup and check Yes option for update

Results:
Get an error on DNF step of "Checking for product updates" because broken dependencies (pretty much as described on Description)

Comment 2 Sandro Bonazzola 2020-05-20 20:00:40 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 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.