RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1889525 - [RFE] microdnf should support minrate and timeout options
Summary: [RFE] microdnf should support minrate and timeout options
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: microdnf
Version: 8.0
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: rc
: 8.0
Assignee: Jaroslav Rohel
QA Contact: Tomáš Bajer
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-19 20:51 UTC by Papa-K
Modified: 2021-08-24 08:58 UTC (History)
7 users (show)

Fixed In Version: libdnf-0.63.0-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-08-24 08:58:17 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Papa-K 2020-10-19 20:51:33 UTC
Description of problem:  microdnf is giving me trouble with the following error:

error: Cannot download Packages/j/java-1.8.0-openjdk-headless-1.8.0.265.b01-0.el8_2.x86_64.rpm: All mirrors were tried; Last error: Curl error (28): Timeout was reached for https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/x86_64/appstream/os/Packages/j/java-1.8.0-openjdk-headless-1.8.0.265.b01-0.el8_2.x86_64.rpm [Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds]

It seems that the transfer for certain packages is either slow or stalling when using cdn-ubi.redhat.com. I can manually curl the URL and download the rpm. it can take up to 7 minutes to complete the transfer into our environment. So I am trying to get microdnf not to timeout so quickly using e.g.:
echo '[main]' >> /etc/dnf/dnf.conf && \
echo 'minrate=1' >> /etc/dnf/dnf.conf && \
echo 'timeout=600' >> /etc/dnf/dnf.conf && \
microdnf update && microdnf clean all

However, microdnf doesn't seem to honor these timeout settings


Version-Release number of selected component (if applicable):
OPC 4.5

How reproducible:
Start with red hat’s ubi8-minimal image or derivative that has only microdnf and attempt to add openjdk8, e.g.:

Steps to Reproduce:
1.Start with red hat’s ubi8-minimal image or derivative that has only microdnf and attempt to add openjdk8, e.g.:

echo '[main]' >> /etc/dnf/dnf.conf && \
echo 'minrate=1' >> /etc/dnf/dnf.conf && \
echo 'timeout=600' >> /etc/dnf/dnf.conf && \
microdnf install java-1.8.0-openjdk --nodocs && microdnf clean all
2.Expecting microdnf honor 600 sec timeout with slow transfers.

However, it doesn’t seem to consider timeout setting at all:

 

[root@my-shell anchors]#  microdnf install java-1.8.0-openjdk --nodocs && microdnf clean all

 

(microdnf:163): librhsm-WARNING **: 20:42:46.452: Found 0 entitlement certificates

 

(microdnf:163): librhsm-WARNING **: 20:42:46.454: Found 0 entitlement certificates

Downloading metadata...

Downloading metadata...

Downloading metadata...

Package                                                                                                                                                                                                                        Repository                                                                                 Size

Installing:                                                                                                                                                                                                                                                                                                                   

 alsa-lib-1.2.1.2-3.el8.x86_64

…

…

xorg-x11-fonts-Type1-7.5-19.el8.noarch                                                                                                                                                                                        ubi-8-appstream                                                                        534.4 kB

Transaction Summary:

Installing:       60 packages

Reinstalling:      0 packages

Upgrading:         0 packages

Removing:          0 packages

Downgrading:       0 packages

Downloading packages...

error: Cannot download Packages/j/java-1.8.0-openjdk-headless-1.8.0.265.b01-0.el8_2.x86_64.rpm: All mirrors were tried; Last error: Curl error (28): Timeout was reached for https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/x86_64/appstream/os/Packages/j/java-1.8.0-openjdk-headless-1.8.0.265.b01-0.el8_2.x86_64.rpm [Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds]

[root@my-shell anchors]#


Actual results:
Expecting microdnf honor 600 sec timeout with slow transfers. [root@my-shell anchors]#  microdnf install java-1.8.0-openjdk --nodocs && microdnf clean all

 

(microdnf:163): librhsm-WARNING **: 20:42:46.452: Found 0 entitlement certificates

 

(microdnf:163): librhsm-WARNING **: 20:42:46.454: Found 0 entitlement certificates

Downloading metadata...

Downloading metadata...

Downloading metadata...

Package                                                                                                                                                                                                                        Repository                                                                                 Size

Installing:                                                                                                                                                                                                                                                                                                                   

 alsa-lib-1.2.1.2-3.el8.x86_64

…

…

xorg-x11-fonts-Type1-7.5-19.el8.noarch                                                                                                                                                                                        ubi-8-appstream                                                                        534.4 kB

Transaction Summary:

Installing:       60 packages

Reinstalling:      0 packages

Upgrading:         0 packages

Removing:          0 packages

Downgrading:       0 packages

Downloading packages...

error: Cannot download Packages/j/java-1.8.0-openjdk-headless-1.8.0.265.b01-0.el8_2.x86_64.rpm: All mirrors were tried; Last error: Curl error (28): Timeout was reached for https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/x86_64/appstream/os/Packages/j/java-1.8.0-openjdk-headless-1.8.0.265.b01-0.el8_2.x86_64.rpm [Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds]

Expected results:


Additional info:

Comment 1 Oleg Bulatov 2020-10-20 07:09:29 UTC
It doesn't seem to be related to OpenShift.

Comment 3 Jaroslav Rohel 2020-12-08 10:32:16 UTC
Microdnf uses the "context" part of libdnf.
I extended the "context" part of libdnf to support additional options in configuration files. These options will also work in other libdnf clients, e.g. PackageKit.

PR: https://github.com/rpm-software-management/libdnf/pull/1103

Added support for options (same meaning as in DNF):
minrate
timeout
throttle
bandwidth


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