Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1059302 - temp_* files are left behind in repodata directory
Summary: temp_* files are left behind in repodata directory
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: rpm-support
Version: 2.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 2.4.0
Assignee: Barnaby Court
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: 1059306
TreeView+ depends on / blocked
 
Reported: 2014-01-29 15:37 UTC by Dennis Gregorovic
Modified: 2014-08-09 06:56 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1059306 (view as bug list)
Environment:
Last Closed: 2014-08-09 06:56:33 UTC


Attachments (Terms of Use)

Description Dennis Gregorovic 2014-01-29 15:37:02 UTC
After a publish of a yum repo:

# ls -l /var/lib/pulp/published/https/repos/my_repo/repodata
total 112
-rw-r--r--. 1 apache apache   379 Jan 28 15:41 1b469e7d9a9832b5832ca4576ed2d3241046006b-filelists.xml.gz
-rw-r--r--. 1 apache apache  2533 Jan 28 15:41 64a5be07e78f5df0520f273d72f51543f112ee44-primary.sqlite.bz2
-rw-r--r--. 1 apache apache 25176 Jan 28 15:41 aaac640bd2ddd8a0768962a61c4e4480f2d320ae-other.xml.gz
-rw-r--r--. 1 apache apache   957 Jan 28 15:41 ad9670431b8b659878af7816dae83984ea597e54-filelists.sqlite.bz2
-rw-r--r--. 1 apache apache 25427 Jan 28 15:41 c56d65ae2e0ce47cbe088b117715e95143168529-other.sqlite.bz2
-rw-r--r--. 1 apache apache   960 Jan 28 15:41 d907311a811d60275b3a08d2e2ae82128727a4ea-primary.xml.gz
-rw-r--r--. 1 apache apache  2502 Jan 28 15:41 repomd.xml
-rw-r--r--. 1 apache apache   310 Jan 28 15:41 temp_filelists.xml.gz
-rw-r--r--. 1 apache apache 25100 Jan 28 15:41 temp_other.xml.gz
-rw-r--r--. 1 apache apache   887 Jan 28 15:41 temp_primary.xml.gz

Those temp_* files should be removed:

$ git diff
diff --git a/pulp_rpm/src/pulp_rpm/yum_plugin/metadata.py b/pulp_rpm/src/pulp_rpm/yum_plugin/metadata.py
index f96f9e9..ec20aea 100644
--- a/pulp_rpm/src/pulp_rpm/yum_plugin/metadata.py
+++ b/pulp_rpm/src/pulp_rpm/yum_plugin/metadata.py
@@ -671,6 +671,7 @@ class YumMetadataGenerator(object):
         blob = """<?xml version="1.0" encoding="UTF-8"?>\n <metadata xmlns="http://linux.duke.edu/metadata/common"
 xmlns:rpm="http://linux.duke.edu/metadata/rpm" packages="%s"> \n""" % self.unit_count
         self.prepend_text(self.temp_primary_xml_path, self.primary_xml_path, blob)
+        os.unlink(self.temp_primary_xml_path)


     def _close_filelists_xml(self):
@@ -684,6 +685,7 @@ xmlns:rpm="http://linux.duke.edu/metadata/rpm" packages="%s"> \n""" % self.unit_
         blob = """<?xml version="1.0" encoding="UTF-8"?>
 <filelists xmlns="http://linux.duke.edu/metadata/filelists" packages="%s"> \n""" % self.unit_count
         self.prepend_text(self.temp_filelists_xml_path, self.filelists_xml_path, blob)
+        os.unlink(self.temp_filelists_xml_path)

     def _close_other_xml(self):
         """
@@ -696,6 +698,7 @@ xmlns:rpm="http://linux.duke.edu/metadata/rpm" packages="%s"> \n""" % self.unit_
         blob = """<?xml version="1.0" encoding="UTF-8"?>
 <otherdata xmlns="http://linux.duke.edu/metadata/other" packages="%s"> \n""" % self.unit_count
         self.prepend_text(self.temp_other_xml_path, self.other_xml_path, blob)
+        os.unlink(self.temp_other_xml_path)

     def close_xml(self):
         """

Comment 1 Jeff Ortel 2014-04-03 13:36:04 UTC
build: 2.4.0-0.7.beta

Comment 2 Preethi Thomas 2014-06-05 15:22:11 UTC
verified

[root@hp-dl380pgen8-01 ~]# rpm -qa pulp-server
pulp-server-2.4.0-0.19.beta.fc20.noarch
[root@hp-dl380pgen8-01 ~]# 

[root@hp-dl380pgen8-01 ~]# ls -l /var/lib/pulp/published/yum/https/repos/repos/pulp/pulp/demo_repos/pulp_unittest/repodata/
total 72
-rw-r--r--. 1 apache apache    98 Jun  5 10:38 084c8543c24af07527684c92d2d8b5f8e47de7ca6d51cafd3bb24e3ee72772d0-prestodelta.xml.gz
-rw-r--r--. 1 apache apache   519 Jun  5 10:38 133c80be2a90ba3a3259a63addf7d10937f5ed0ccf9e68ae61e32a082e307069-other.xml.gz
-rw-r--r--. 1 apache apache  2810 Jun  5 10:38 134246378658927d0bb09b357128afa2e1e26b521898bceed660aaa9a66bd51a-comps.xml
-rw-r--r--. 1 apache apache 47152 Jun  5 10:38 5c48e28a98ed71aab91ea566a04c3c96ea5ca228d06a45e4375287e12f811441-updateinfo.xml.gz
-rw-r--r--. 1 apache apache   993 Jun  5 10:38 6299d20c490d8d87d870420115decafcbbbca81d42d2d59218a58f2dc43abd3d-primary.xml.gz
-rw-r--r--. 1 apache apache   418 Jun  5 10:38 71e4fd1d26c69325cc04e91033316058c5bb7637e1ffec835a8758a3633010a3-filelists.xml.gz
-rw-r--r--. 1 apache apache  2596 Jun  5 10:38 repomd.xml
[root@hp-dl380pgen8-01 ~]#

Comment 3 Randy Barlow 2014-08-09 06:56:33 UTC
This has been fixed in Pulp 2.4.0-1.


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