Bug 708369 - After deleting all repos, rpm's under the "packages" directory should also be removed
Summary: After deleting all repos, rpm's under the "packages" directory should also be...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: Upstream
Version: 2.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: ---
Assignee: Jay Dobies
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks: rhui-20
TreeView+ depends on / blocked
 
Reported: 2011-05-27 13:22 UTC by Sachin Ghai
Modified: 2011-07-27 11:37 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-27 11:37:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sachin Ghai 2011-05-27 13:22:12 UTC
Description of problem:

After deletion of all repos using rhui-manager, I can still see a bunch of packages under "/var/lib/pulp/packages" folder

I *think* this directry should be empty after deleting the repos.
 
Version-Release number of selected component (if applicable):
rhui-tools 2.0.35
pulp 0.179
How reproducible:
I tested it on two setups one having pulp 0.179 and other having pulp 0.181

Steps to Reproduce:
1. Delete all repos using rhui-manager
2. check the /var/lib/pulp/packages directry on rhua server

  
Actual results:
[root@dhcp193-157 packages]# ll | wc -l
681
[root@dhcp193-157 packages]# 

repos directry is empty. but packages dir contains 681 directories.

[root@dhcp193-157 repos]# pwd
/var/lib/pulp/repos
[root@dhcp193-157 repos]# ls




Expected results:

there should not be any file/directry under /var/lib/pulp/packages after deleting the repos


Additional info:

--------------------------------------
Proceed? (y/n) y


Deleting Red Hat Enterprise Linux Server 6 Releases (RPMs) (6Server-x86_64)...

Deleting Red Hat Enterprise Linux Server 6 Updates (RPMs) (6Server-x86_64)...
Deleting Red Hat Update Infrastructure 1.1 (RPMs) (5Server-i386)...
Deleting Red Hat Update Infrastructure 1.1 (RPMs) (5Server-x86_64)...
Deleting Red Hat Update Infrastructure 1.2 (RPMs) (5Server-i386)...
Deleting Red Hat Update Infrastructure 1.2 (RPMs) (5Server-x86_64)...

------------------------------------------------------------------------------
rhui (repo) => rhui (repo) => l

No repositories are currently managed by the RHUI

------------------------------------------------------------------------------


[root@dhcp193-157 ~]# cd /var/lib/pulp/packages/
[root@dhcp193-157 packages]# ls
abrt-desktop                     libXcursor-devel
alacarte                         libXdamage
alsa-plugins-pulseaudio          libXdmcp
antlr                            libXi
apr-devel                        libXi-devel
apr-util-devel                   libXinerama
apr-util-ldap                    libXinerama-devel
atk                              libxkbfile-devel
atlas                            libXrandr
at-spi-python                    libXrender-devel
audiofile                        libXres
authconfig-gtk                   libXScrnSaver-devel
authd                            libxslt-devel
autoconf                         libXtst-devel
avahi-autoipd                    libXv
avahi-glib                       libXv-devel
avalon-framework                 libXxf86misc
b43-openfwwf                     libXxf86vm-devel
bash                             libyaml
bc                               lksctp-tools
bfa-firmware                     lldpad
bind-chroot                      lockdev
 <output truncated>

Comment 1 wes hayutin 2011-06-06 21:15:16 UTC
added to rhui-20 tracker

Comment 2 Sachin Ghai 2011-06-16 09:42:11 UTC
rhui (repo) => d

Select one or more repositories:

  Custom Repositories

  Red Hat Repositories
    -  1 : Red Hat Enterprise Linux Server 6 Optional Updates (RPMs) (6Server-x86_64)

Enter value (1-1) to toggle selection, 'c' to confirm selections, or '?' for more commands: 1

Select one or more repositories:

  Custom Repositories

  Red Hat Repositories
    x  1 : Red Hat Enterprise Linux Server 6 Optional Updates (RPMs) (6Server-x86_64)

Enter value (1-1) to toggle selection, 'c' to confirm selections, or '?' for more commands: c


The following repositories will be deleted:
  Red Hat Repositories
    Red Hat Enterprise Linux Server 6 Optional Updates (RPMs) (6Server-x86_64)

Proceed? (y/n) y


Deleting Red Hat Enterprise Linux Server 6 Optional Updates (RPMs) (6Server-x86_64)...

------------------------------------------------------------------------------
rhui (repo) => 


[root@dhcp193-163 packages]# cd ..
[root@dhcp193-163 pulp]# du -h --max-depth=1
3.5G	./packages
180K	./published
4.0K	./repos
3.5G	.
[root@dhcp193-163 pulp]# cd p
packages/  published/ 
[root@dhcp193-163 pulp]# cd packages/
Display all 2085 possibilities? (y or n)
[root@dhcp193-163 pulp]# cd packages/libwvstreams
libwvstreams/       libwvstreams-devel/ 
[root@dhcp193-163 pulp]# cd packages/libwvstreams/4.6/6.el6/i686/5e0/
[root@dhcp193-163 5e0]# ls
libwvstreams-4.6-6.el6.i686.rpm
[root@dhcp193-163 5e0]# 


In new build ( pulp 0.190 and rhui-tools 2.0.30 ), I found the same behaviour.

I created one repo of rhel6 optional RPMs and removed it. However I can still see the packages under /var/lib/pulp/packages directry.

Is it intentional ? Im pointing this because a single repo occupies around 3.5G of space even after deletion.

Comment 3 Jay Dobies 2011-06-16 18:40:22 UTC
Request to change the repo API to automatically handle this made in bugzilla 713912.

Comment 4 Jay Dobies 2011-07-26 16:02:56 UTC
Moving to ON_QA, this is the behavior of the Pulp server.

Comment 5 Sachin Ghai 2011-07-27 11:37:31 UTC
I tested this again with pulp 0.211. I added following repos:

 Red Hat Enterprise Linux Server (RPMs) (5Server-x86_64)
    Red Hat Enterprise Linux Server 6 Optional Updates (RPMs) (6Server-x86_64)
    Red Hat Enterprise Linux Server 6 Releases (RPMs) (6Server-x86_64)
    Red Hat Enterprise Linux Server 6 Updates (RPMs) (6Server-x86_64)
    Red Hat Update Infrastructure 1.2 (RPMs) (5Server-i386)
    Red Hat Update Infrastructure 1.2 (RPMs) (5Server-x86_64)


And size was as below. 

[root@dhcp201-127 pulp]# du -h --max-depth=1
33G	./packages
152K	./published
489M	./repos
34G	.


I removed all rhui-managed repos. And checked the size of "packages" folder.
Its about 3.1G.

[root@dhcp201-127 pulp]# du -h --max-depth=1
3.1G	./packages
204K	./published
435M	./repos
3.5G	.

Since this is the behaviour of pulp-server, closing this defect.


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