Bug 1307207 - Pulp repository sync doesn't clean up old <checksum>.updateinfo.gz files
Pulp repository sync doesn't clean up old <checksum>.updateinfo.gz files
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Pulp (Show other bugs)
6.1.6
All Linux
high Severity medium (vote)
: 6.2.9
: --
Assigned To: satellite6-bugs
Bruno Rocha
: Triaged
: 1312054 (view as bug list)
Depends On:
Blocks: 1426379
  Show dependency treegraph
 
Reported: 2016-02-12 22:26 EST by Frank Hirtz
Modified: 2017-07-26 15:39 EDT (History)
18 users (show)

See Also:
Fixed In Version: pulp-2.8.7.7-1,pulp-rpm-2.8.7.9-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1426379 (view as bug list)
Environment:
Last Closed: 2017-05-01 09:52:16 EDT
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)
Pulp Hotfix (revised) (6.14 MB, application/x-tar)
2017-03-23 11:24 EDT, John Mitsch
no flags Details
Pulp Hotfix(EL6 Revised) (1.53 MB, application/x-gzip)
2017-03-30 11:33 EDT, Zach Huntington-Meath
no flags Details
Pulp Hotfix(EL6 Revised) 6.2.8 (1.53 MB, application/x-gzip)
2017-04-10 09:53 EDT, Zach Huntington-Meath
no flags Details
Pulp Hotfix(EL6 Revised) 6.2.8 (1.53 MB, application/x-gzip)
2017-04-10 09:54 EDT, Zach Huntington-Meath
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Pulp Redmine 2096 Normal CLOSED - CURRENTRELEASE Additional updateinfo.xml after second publish 2017-01-16 16:02 EST
Pulp Redmine 2651 Normal CLOSED - COMPLETE Backport #2096, Additional updateinfo.xml after second publish 2017-03-30 19:07 EDT

  None (edit)
Description Frank Hirtz 2016-02-12 22:26:34 EST
Description of problem:

When a repo is synced, the old updateinfo metadata isn't removed so we slowly leak diskspace.
[root@satellite ~]# ls /var/lib/pulp/published/yum/master/yum_distributor/Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_Optional_RPMs_x86_64_7Server/1455093381.96/repodata/ | grep updateinfo | wc -l
41

<sync>

[root@satellite yum]# ls /var/lib/pulp/published/yum/master/yum_distributor/Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_Optional_RPMs_x86_64_7Server/1455248661.16/repodata/ | grep updateinfo | wc -l
42

<sync>

[root@satellite repomd]# ls /var/lib/pulp/published/yum/master/yum_distributor/Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_Optional_RPMs_x86_64_7Server/1455267279.56/repodata/ | grep updateinfo | wc -l
43
[root@satellite repomd]# ls /var/lib/pulp/published/yum/master/yum_distributor/Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_Optional_RPMs_x86_64_7Server/1455267279.56/repodata/ | grep updateinfo | tail -5
ddee37007f5c85d0a35c6843d9c38ebd3438cc34-updateinfo.xml.gz
e174f40e37c46d481bcd6f3341b26ddf159f2765-updateinfo.xml.gz
f75adb016418dc188863d09915973753639c1c0c-updateinfo.xml.gz
f9c477638cccf9d225c151374cad3e975d966afb-updateinfo.xml.gz
fb4be52ad81994c3519fc600e3c320fdf05288dc-updateinfo.xml.gz
</snip>

The other metadata files don't appear to show this issue:

<snip>
[root@satellite repomd]# ls /var/lib/pulp/published/yum/master/yum_distributor/Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_Optional_RPMs_x86_64_7Server/1455267279.56/repodata/ | grep -v updateinfo
2dcf826f8cd19e9774ad70e947bbee80acffd718-other.xml.gz
3e800f8eb4bfc89f8e320cda3dd709a8e0bef5f4884e3b622df63b17249e8242-comps.xml
6c24ec45ae612c2c7cb055be3a248a5aed768507-filelists.xml.gz
9fa6016b60e94fe6857add32e12ca73e836878e0-primary.xml.gz
d139afced76cbdbb17a31e021d0071c5bb73e738-comps.xml
repomd.xml
</snip>

Having a look at the master repos on my server:
<snip>
[root@satellite repomd]# for i in `ls -1 /var/lib/pulp/published/yum/master/yum_distributor/ | grep -v 'ivanova\|Library\|epel\|Development\|Live\|default\|Testing'`; do echo -n "$i: "; ls /var/lib/pulp/published/yum/master/yum_distributor/$i/*/repodata | grep updateinfo | wc -l; done
Default_Organization-Red_Hat_Enterprise_Linux_Atomic_Host-Red_Hat_Enterprise_Linux_Atomic_Host_RPMs_x86_64: 5
Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_5_Server_RPMs_x86_64_5Server: 42
Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_Kickstart_x86_64_6_4: 43
Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_Kickstart_x86_64_6_5: 36
Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_Kickstart_x86_64_6_6: 34
Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_Kickstart_x86_64_6_7: 41
Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_-_Optional_RPMs_x86_64_6Server: 39
Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server: 46
Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_-_Supplementary_RPMs_x86_64_6Server: 37
Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_Kickstart_x86_64_7_1: 34
Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_Kickstart_x86_64_7_2: 33
Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_Optional_RPMs_x86_64_7Server: 43
Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_RPMs_x86_64_7Server: 49
Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_7_Server_-_Supplementary_RPMs_x86_64_7Server: 38
Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Satellite_Tools_6_1_for_RHEL_5_Server_RPMs_x86_64: 35
Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Satellite_Tools_6_1_for_RHEL_6_Server_RPMs_x86_64: 38
Default_Organization-Red_Hat_Enterprise_Linux_Server-Red_Hat_Satellite_Tools_6_1_for_RHEL_7_Server_RPMs_x86_64: 40
Default_Organization-Red_Hat_Enterprise_Virtualization-Red_Hat_Enterprise_Virtualization_Hypervisor_7_Beta_RPMs_x86_64: 43
Default_Organization-Red_Hat_Enterprise_Virtualization-Red_Hat_Enterprise_Virtualization_Manager_3_Beta_RPMs_x86_64_6Server: 53
Default_Organization-Red_Hat_Satellite-Red_Hat_Satellite_6_1_for_RHEL_6_Server_RPMs_x86_64: 52
Default_Organization-Red_Hat_Software_Collections__for_RHEL_Server_-Red_Hat_Software_Collections_RPMs_for_Red_Hat_Enterprise_Linux_6_Server_x86_64_6Server: 42
Default_Organization-Red_Hat_Software_Collections__for_RHEL_Server_-Red_Hat_Software_Collections_RPMs_for_Red_Hat_Enterprise_Linux_7_Server_x86_64_7Server: 37
</snip>

Version-Release number of selected component (if applicable):
pulp-rpm-plugins-2.6.0.19-1.el6.noarch

Steps to Reproduce:
Add Red Hat repository
sync

Additional info:
It looks like there's an upstream report, but it doesn't appear that it went anywhere:

<snip>

https://pulp.plan.io/issues/1045

<snip>
incremental publish does not remove old updateinfo.xml
Added by bcourt 8 months ago. Updated about 1 month ago.

Status:	NEW		
Priority:	Low		
Assignee:	-		
Category:	-		
Severity:	2. Medium	Backwards Incompatible:	No
Version:		Triaged:	Yes
Target Release:		Tags:	
OS:		QA Contact:	
Description

When an incremental publish is performed the old updateinfo.xml is not removed if a checksum is specified. Each publish adds a new updateinfo, which has a different checksum.

After each publish there should be only one updateinfo.xml in the repodata directory.
...
Perhaps other metadata files could leave vestiges also, the fixer should verify that an incremental publishes which must republish all files in repodata properly removes the old ones.
</snip>
Comment 8 pulp-infra@redhat.com 2016-11-21 13:52:34 EST
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.
Comment 9 pulp-infra@redhat.com 2016-11-21 13:52:38 EST
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.
Comment 10 Michael Hrivnak 2016-12-05 14:44:15 EST
*** Bug 1312054 has been marked as a duplicate of this bug. ***
Comment 11 pulp-infra@redhat.com 2016-12-13 06:32:17 EST
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.
Comment 12 pulp-infra@redhat.com 2016-12-15 06:45:46 EST
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.
Comment 13 pulp-infra@redhat.com 2016-12-20 12:01:54 EST
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.
Comment 14 pulp-infra@redhat.com 2016-12-20 12:32:09 EST
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.
Comment 15 pulp-infra@redhat.com 2017-01-09 21:02:34 EST
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.
Comment 16 pulp-infra@redhat.com 2017-01-16 16:02:50 EST
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.
Comment 21 pm-sat@redhat.com 2017-02-23 16:08:14 EST
Please add verifications steps for this bug to help QE verify
Comment 27 Michael Hrivnak 2017-03-22 09:44:38 EDT
The hotfix is broken. Three of the packages are built for el7, and the rest for el6. Anyone running this hotfix likely has the pre-hotfix version of the pulp_rpm plugin, and thus would not see the desired change in behavior.

Zach, would you like to re-build it?

All of that said, unless the existence of these extra updateinfo files is causing problems for a user for some specific reason, my suggestion is to wait for 6.2.9. The old files are safe to ignore.
Comment 28 Zach Huntington-Meath 2017-03-22 15:26:04 EDT
Yes I will rebuild, it. I'll try and have it out as soon as possible.
Comment 29 John Mitsch 2017-03-23 11:24 EDT
Created attachment 1265818 [details]
Pulp Hotfix (revised)

Pulp Hotfix (revised)
Comment 31 pulp-infra@redhat.com 2017-03-29 22:07:08 EDT
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.
Comment 32 pulp-infra@redhat.com 2017-03-29 22:07:15 EDT
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.
Comment 33 Zach Huntington-Meath 2017-03-30 11:33 EDT
Created attachment 1267609 [details]
Pulp Hotfix(EL6 Revised)
Comment 35 pulp-infra@redhat.com 2017-03-30 19:07:02 EDT
The Pulp upstream bug status is at CLOSED - COMPLETE. Updating the external tracker on this bug.
Comment 42 Zach Huntington-Meath 2017-04-10 09:53 EDT
Created attachment 1270493 [details]
Pulp Hotfix(EL6 Revised) 6.2.8
Comment 43 Zach Huntington-Meath 2017-04-10 09:54 EDT
Created attachment 1270494 [details]
Pulp Hotfix(EL6 Revised) 6.2.8
Comment 46 Bruno Rocha 2017-04-13 11:27:34 EDT
Verified in:

    satellite-6.2.9-2.0.el7sat.noarch


Note:
   For old repositories in this same system I noted some directories with more than 1000+ files, so problem was happening in 6.2.8
   The system was updated for 6.2.9 and problem gone as in verification steps bellow.
   

Steps:

1) Added new product + repository 
2) Sync
3) verified number of updateinfo.xml.gz files 
    [root@cloud-qe-09 ~]# ls /var/lib/pulp/published/yum/master/yum_distributor/Default_Organization-Zooo-newzoo/1492096608.62/repodata/ | grep updateinfo | wc -l
    1
4) Sync again
5) verified if data is updated and have only one file
    [root@cloud-qe-09 ~]# ls /var/lib/pulp/published/yum/master/yum_distributor/Default_Organization-Zooo-newzoo/1492096608.62/repodata/ | grep updateinfo | wc -l
    ls: cannot access /var/lib/pulp/published/yum/master/yum_distributor/Default_Organization-Zooo-newzoo/1492096608.62/repodata/: No such file or directory
    0
    [root@cloud-qe-09 ~]# ls /var/lib/pulp/published/yum/master/yum_distributor/Default_Organization-Zooo-newzoo/1492096810.97/repodata/ | grep updateinfo | wc -l
    1
6) Following steps from https://pulp.plan.io/issues/2096 I removed 2 packaged and synck again

    [root@cloud-qe-09 ~]# ls /var/lib/pulp/published/yum/master/yum_distributor/Default_Organization-Zooo-newzoo/1492096810.97/repodata/ | grep updateinfo | wc -l
    ls: cannot access /var/lib/pulp/published/yum/master/yum_distributor/Default_Organization-Zooo-newzoo/1492096810.97/repodata/: No such file or directory
    0
    [root@cloud-qe-09 ~]# ls /var/lib/pulp/published/yum/master/yum_distributor/Default_Organization-Zooo-newzoo/1492096862.19/repodata/ | grep updateinfo | wc -l
    1


Results:
   repodata leak is not happening, directory and repodata/updateinfo.xml.gz is being cleaned between syncs.
Comment 48 errata-xmlrpc 2017-05-01 09:52:16 EDT
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/RHBA-2017:1191

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