Bug 1415711 - DNF should not automatically download repodata over metered connections
DNF should not automatically download repodata over metered connections
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
rawhide
Unspecified Unspecified
medium Severity unspecified
: ---
: ---
Assigned To: rpm-software-management
Fedora Extras Quality Assurance
: FutureFeature, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-01-23 08:56 EST by Patrick Uiterwijk
Modified: 2017-02-16 06:32 EST (History)
3 users (show)

See Also:
Fixed In Version: dnf-2.1.0-1.fc26
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-02-16 06:32:50 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Patrick Uiterwijk 2017-01-23 08:56:10 EST
I have no way to tell DNF not to download repodata over specific connections, either in NM or anywhere else.
This leads to DNF downloading the repodata up to once per hour, with 50MB.
If I'm on a metered or slow connection I might not want it to do this, as I may need the bandwith and/or data allowance.

It would be great if I could mark a connection as metered or DNF could detect that a connection is slow and then no automatically update the cache.
Comment 1 Honza Silhan 2017-02-01 11:26:20 EST
from some discussion on fedora devel list:

On Tue, Nov 1, 2016 at 9:59 AM, Miroslav Suchý <msuchy@redhat.com> wrote:
> Dne 31.10.2016 v 12:55 Tom Hughes napsal(a):
>> The problem, as I believe has been repeatedly explained, is that you don't really have any idea whether the connection
>> is metered. Yes you may be trying to guess by considering things like 3G connections as metered but that is an extremely
>> poor proxy for whether a connection is metered.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1112230

Then new DNF config option ~sync_metadata_unmetred_conn_only, set to
True by default could be a solution. I am just skeptical about DNF
depending on NetworkManager.

Seems like bug 1112230 is fixed now so it may be possible.
Comment 2 Igor Gnatenko 2017-02-01 11:30:55 EST
(In reply to Honza Silhan from comment #1)
> from some discussion on fedora devel list:
> 
> On Tue, Nov 1, 2016 at 9:59 AM, Miroslav Suchý <msuchy@redhat.com> wrote:
> > Dne 31.10.2016 v 12:55 Tom Hughes napsal(a):
> >> The problem, as I believe has been repeatedly explained, is that you don't really have any idea whether the connection
> >> is metered. Yes you may be trying to guess by considering things like 3G connections as metered but that is an extremely
> >> poor proxy for whether a connection is metered.
> >
> > https://bugzilla.redhat.com/show_bug.cgi?id=1112230
> 
> Then new DNF config option ~sync_metadata_unmetred_conn_only, set to
> True by default could be a solution. I am just skeptical about DNF
> depending on NetworkManager.
Recommends: pythonX-networkmanager ?
Comment 3 Igor Gnatenko 2017-02-01 11:31:25 EST
I was thinking about implementation and only tricky part would be "which connection librepo is going to use?".

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