Bug 715330 - [RFE] We need some sort of mechanism to clean out /var/lib/upload
Summary: [RFE] We need some sort of mechanism to clean out /var/lib/upload
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: user-experience
Version: unspecified
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
: ---
Assignee: Pradeep Kilambi
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-22 14:39 UTC by Jay Dobies
Modified: 2013-09-09 16:31 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-09 17:08:28 UTC


Attachments (Terms of Use)

Description Jay Dobies 2011-06-22 14:39:46 UTC
It's not a common case, but uploaded content that isn't imported will live forever on the Pulp server. At very least, we need to document this so admins know why their hard disk isn't being fully cleaned up.


<prad> jdob, in import phase, I take the upload_id, lookup the temp path
<prad> and move the bits to final location 
<prad> and then import
<jdob> where's it stored in the interim?
<prad> jdob, the bits are not written to /var/lib/packages at the upload step
<prad> there are written to /var/lib/pulp/upload
* jblazek is now known as jblazek-out
<prad> jdob, thats part of the chunk logic where we maintain a seed and resume the uploads
<jdob> what happens if I never import it, do they just stay in that directory forever?
<prad> jdob, I think so, jortel?

Comment 1 Jay Dobies 2012-07-11 20:25:50 UTC
I added a DELETE URL in v2 for this.

Comment 2 Jay Dobies 2012-07-11 20:26:49 UTC
QA can try this out. Cancel an upload during the uploading bits step. Notice in /var/lib/pulp/uploads there's a directory created for it (it has a UUID). Cancel the upload through the CLI and make sure that dir is deleted on the server.

Comment 3 Preethi Thomas 2012-11-07 15:30:42 UTC
verified
[root@preethi uploads]# pulp-admin -u admin -p admin  rpm repo uploads rpm  --repo-id upload2 --dir /root/uploads/ -v
+----------------------------------------------------------------------+
                          Puppet Module Upload
+----------------------------------------------------------------------+

Files to be uploaded:
  grinder-0.1.5-2.fc17.noarch.rpm
  pulp-large_1mb_test-packageB-0.1.1-1.fc14.noarch.rpm
  gofer-0.71-1.fc17.noarch.rpm
  pulp-large_1mb_test-packageA-0.1.1-1.fc14.noarch.rpm

Extracting necessary metdata for each request...
[==================================================] 100%
Analyzing: pulp-large_1mb_test-packageA-0.1.1-1.fc14.noarch.rpm
... completed

Creating upload requests on the server...
[==================================================] 100%
Initializing: pulp-large_1mb_test-packageA-0.1.1-1.fc14.noarch.rpm
... completed

Starting upload of selected packages. If this process is stopped through ctrl+c,
the uploads will be paused and may be resumed later using the resume command or
cancelled entirely using the cancel command.

Uploading: grinder-0.1.5-2.fc17.noarch.rpm
[==================================================] 100%
148189/148189 bytes
... completed

Importing into the repository...
^CUploading paused
[root@preethi ~]# ll /var/lib/pulp/uploads/
total 148
-rw-r--r--. 1 apache apache      0 Nov  7 10:28 49a60e81-484c-4dda-83d3-7505a6e7be28
-rw-r--r--. 1 apache apache      0 Nov  7 10:28 76c12d4f-5b14-44a8-a3c3-c9a158ea2d07
-rw-r--r--. 1 apache apache 148189 Nov  7 10:28 ae2c4600-65e2-449e-ae87-5af3da3898ba
-rw-r--r--. 1 apache apache      0 Nov  7 10:28 eb040cb9-1072-41e6-aaa6-b210eb490089


[root@preethi uploads]# pulp-admin rpm repo uploads  list
+----------------------------------------------------------------------+
                            Upload Requests
+----------------------------------------------------------------------+

[ Paused  ] pulp-large_1mb_test-packageA-0.1.1-1.fc14.noarch.rpm
[ Paused  ] pulp-large_1mb_test-packageB-0.1.1-1.fc14.noarch.rpm
[ Paused  ] gofer-0.71-1.fc17.noarch.rpm
[ Paused  ] grinder-0.1.5-2.fc17.noarch.rpm

[root@preethi uploads]# pulp-admin login -u admin -p admin
Successfully logged in. Session certificate will expire at Nov 14 15:30:56 2012
GMT.

[root@preethi uploads]# pulp-admin rpm repo uploads  cancel
+----------------------------------------------------------------------+
                            Upload Requests
+----------------------------------------------------------------------+

Select one or more uploads to cancel: 
  -  1 : pulp-large_1mb_test-packageA-0.1.1-1.fc14.noarch.rpm
  -  2 : pulp-large_1mb_test-packageB-0.1.1-1.fc14.noarch.rpm
  -  3 : gofer-0.71-1.fc17.noarch.rpm
  -  4 : grinder-0.1.5-2.fc17.noarch.rpm
Enter value (1-4) to toggle selection, 'c' to confirm selections, or '?' for
more commands: 1-4

Select one or more uploads to cancel: 
  x  1 : pulp-large_1mb_test-packageA-0.1.1-1.fc14.noarch.rpm
  x  2 : pulp-large_1mb_test-packageB-0.1.1-1.fc14.noarch.rpm
  x  3 : gofer-0.71-1.fc17.noarch.rpm
  x  4 : grinder-0.1.5-2.fc17.noarch.rpm
Enter value (1-4) to toggle selection, 'c' to confirm selections, or '?' for
more commands: c

Successfully deleted pulp-large_1mb_test-packageA-0.1.1-1.fc14.noarch.rpm

Successfully deleted pulp-large_1mb_test-packageB-0.1.1-1.fc14.noarch.rpm

Successfully deleted gofer-0.71-1.fc17.noarch.rpm

Successfully deleted grinder-0.1.5-2.fc17.noarch.rpm

[root@preethi uploads]# 

[root@preethi ~]# ll /var/lib/pulp/uploads/
total 0
[root@preethi ~]#

Comment 4 Preethi Thomas 2013-01-09 17:08:28 UTC
Pulp v2.0 released


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