Bug 1132692 - [RFE] Don't re-download rpms if they exist on disk
Summary: [RFE] Don't re-download rpms if they exist on disk
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Repositories
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Radovan Drazny
URL:
Whiteboard:
: 1131658 1386284 (view as bug list)
Depends On: 1110923
Blocks: GSS_Sat6Beta_Tracker, GSS_Sat6_Tracker rhci-common-installer
TreeView+ depends on / blocked
 
Reported: 2014-08-21 19:56 UTC by Mike McCune
Modified: 2021-04-06 18:27 UTC (History)
29 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of: 1110923
Environment:
Last Closed: 2018-02-21 16:54:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 17424 0 Normal New Don't re-download rpms if they exist on disk 2020-06-08 20:57:21 UTC
Pulp Redmine 236 0 High CLOSED - CURRENTRELEASE Don't re-download rpms if they exist on disk 2016-09-19 21:33:40 UTC

Comment 1 Mike McCune 2014-08-21 19:57:37 UTC
*** Bug 1131658 has been marked as a duplicate of this bug. ***

Comment 3 Bryan Kearney 2014-12-17 16:58:18 UTC
This has not started upstream, moving to 6.2.

Comment 4 Michael Hrivnak 2015-10-01 13:52:15 UTC
Jeff, can you add this as a required behavior for the lazy sync workflow? I think we will mostly get this for free; if the file happens to exist in the right place, or someone else puts it there, everything will be fine. We just need to consider this case if we are explicitly tracking which units have been downloaded.

Comment 5 Jeff Ortel 2015-10-01 14:02:52 UTC
This is already supported in the lazy design as part of the celery task that downloads a single unit.  https://pulp.plan.io/issues/1181.

Comment 6 Jeff Ortel 2015-10-01 14:10:33 UTC
I will also make sure it's part of the design for the celery task supporting the lazy_mode='active' in the importers.  https://pulp.plan.io/issues/1200

Comment 8 pulp-infra@redhat.com 2016-01-14 15:47:03 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 9 pulp-infra@redhat.com 2016-01-14 15:47:10 UTC
The Pulp upstream bug priority is at High. Updating the external tracker on this bug.

Comment 10 pulp-infra@redhat.com 2016-01-19 21:01:27 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 11 Justin Sherrill 2016-01-29 16:26:05 UTC
This has been moved off of pulp 2.8 as lazy sync makes this much less of a priority, proposing for 6.3

Comment 12 pulp-infra@redhat.com 2016-01-29 16:31:25 UTC
The Pulp upstream bug priority is at High. Updating the external tracker on this bug.

Comment 13 Bryan Kearney 2016-07-08 20:21:48 UTC
Per 6.3 planning, moving out non acked bugs to the backlog

Comment 15 pulp-infra@redhat.com 2016-07-25 20:01:57 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.

Comment 16 pulp-infra@redhat.com 2016-08-17 18:48:22 UTC
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.

Comment 17 pulp-infra@redhat.com 2016-08-18 19:02:26 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 18 pulp-infra@redhat.com 2016-08-30 19:02:32 UTC
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.

Comment 19 pulp-infra@redhat.com 2016-09-19 21:33:41 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 20 Brian Bouterse 2016-11-21 17:27:11 UTC
*** Bug 1386284 has been marked as a duplicate of this bug. ***

Comment 21 Brad Buckingham 2016-11-21 17:30:09 UTC
Created redmine issue http://projects.theforeman.org/issues/17424 from this bug

Comment 23 Brad Buckingham 2017-05-25 19:41:44 UTC
It looks like we should be able to move this bugzilla on to 6.3 and ON_QA.

Looking over the pulp issue, the proposed solution leverages the lazy sync feature (introduced in 6.2.z) and the Advanced Sync option (being introduced in 6.3) to perform a 'verify contents sync'.

Pulp references:
https://github.com/pulp/pulp/pull/2708 - contains the pulp docs

Comment 25 Radovan Drazny 2017-10-10 12:29:31 UTC
Tested on Sat 6.3 Snap 19, pulp-server-2.13.4-1.el7sat. Reproducer used was basically the one from the initial report, and notes from the doc update (https://github.com/pulp/pulp/pull/2708/files?short_path=02b6a9a#diff-02b6a9ab33100b00c84a132527f245dd)

Steps to check:
- Have a big repo (Centos 7 in my case) created and synced
- Stop the katello-service
- Remove /var/lib/mondgodb/pulp_database.*
- Start the mongodb service
- Run "sudo -u apache pulp-manage-db" to recreate the pulp db
- Create a new yum repo with the same URL in Satellite with "on demand" sync policy
- Run sync for the new repo
- Check the /var/log/messages for pulp messages. Only repodata should be really downloaded. You can check the new repo, packages should be present now. 
- Run "pulp-admin -u admin -p auth_string repo download --repo-id=repo_is_string --verify-all"
- Check the /var/log/messages again. There will be a lot of messages of following type: 

      <...>
      Oct 10 08:05:28 dell-pr5820-01 pulp: nectar.downloaders.threaded:INFO: Download of http://dell-pr5820-01.rhts.eng.bos.redhat.com/streamer/var/lib/pulp/content/units/rpm/f0/8da7a8ce8911f33469561ff9b08a080beabbe94a
      3246ddd869a4bb908b49e9/colord-gtk-devel-0.1.25-4.el7.i686.rpm?policy=eyJleHRlbnNpb25zIjoge30sICJyZXNvdXJjZSI6ICIvc3RyZWFtZXIvdmFyL2xpYi9wdWxwL2NvbnRlbnQvdW5pdHMvcnBtL2YwLzhkYTdhOGNlODkxMWYzMzQ2OTU2MWZmOWIwOGEwODB
      iZWFiYmU5NGEzMjQ2ZGRkODY5YTRiYjkwOGI0OWU5L2NvbG9yZC1ndGstZGV2ZWwtMC4xLjI1LTQuZWw3Lmk2ODYucnBtIiwgImV4cGlyYXRpb24iOiAxNTM5MTczMTI4fQ%3D%3D;signature=cARhRO8QWPI5Xuu0I9QUWbz-pbTdq4HEwXPQAsjy7Mz6hfWycUu_fkoATuuMivnX
      PSw75Mduj8WeMFS9Xiuc9TJi7C6XdFlbZZAVEnI0HRwTEX2PuNPU81DnFJbxfsbsnnrUPT2hs2tjB5NolWXQMe6-Q3VDkVADEWYovEcfRi82lANxUmpyxpONfcVsozV24Fm1WgXNjMxMjK6SdfJVPKHUAdbqeyimrkH22PIPeNNkvqUedOeGerXOI9CUQkAUtnOug1V4Fh1DKFTetlaP
      QtALmJMxMjbumjd3OgOWPYhD6S92PrTe6CNa19_6BkUxqJBqNPWUeW56Tau8AThPAQ%3D%3D was cancelled
      Oct 10 08:05:28 dell-pr5820-01 pulp: nectar.downloaders.threaded:INFO: Download of http://dell-pr5820-01.rhts.eng.bos.redhat.com/streamer/var/lib/pulp/content/units/rpm/fe/0fb319333a7050b5e5306a25440e34c62e6d0913
      5c93fcd20fc8c20b7f1f55/pam_pkcs11-0.6.2-27.el7.x86_64.rpm?policy=eyJleHRlbnNpb25zIjoge30sICJyZXNvdXJjZSI6ICIvc3RyZWFtZXIvdmFyL2xpYi9wdWxwL2NvbnRlbnQvdW5pdHMvcnBtL2ZlLzBmYjMxOTMzM2E3MDUwYjVlNTMwNmEyNTQ0MGUzNGM2MmU
      2ZDA5MTM1YzkzZmNkMjBmYzhjMjBiN2YxZjU1L3BhbV9wa2NzMTEtMC42LjItMjcuZWw3Lng4Nl82NC5ycG0iLCAiZXhwaXJhdGlvbiI6IDE1MzkxNzMxMjh9;signature=s0n5EmF93qUaVRo7cpAf8JPXxrwCQGotz-Ga2mFkik1T6WvdW_C3AxzjInu_500kUSYS87MNeCtpwzM0
      7RJQbRn8upjAoTliCWzaQwNOSTb7YRIV5tqgKKE-fjl3nQhM7egoAoinxtmPwP1xiw2QkAJ6AGuCEGUhb6UluqgELp1LhcF2r47snkk7jTxWoeSUaDz7wIUJ2Efr90QZc2itaeC78GN0HLK_cFDpzjTSkXMJcHrfM9RD6HBPkdpYDW8_qdtxH5jhlFM7GNzXWZQaPBwnavH0ScgobBYz
      paXWMSemABRqgEj_uviSk165H9xRV22rK4MQKOZkdpc7y4tNXA%3D%3D was cancelled
      <...>

No new rpm were dowloaded, rpm files already present in /var/lib/pulp/content have beed used instead. Packages are available under Content->Packages menu.

VERIFIED

Comment 26 Satellite Program 2018-02-21 16:54:17 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
> 
> For information on the advisory, and where to find the updated files, follow the link below.
> 
> If the solution does not work for you, open a new bug report.
> 
> https://access.redhat.com/errata/RHSA-2018:0336


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