Bug 701829 - Removing all repos from a CDS doesn't properly clean up the CDS
Summary: Removing all repos from a CDS doesn't properly clean up the CDS
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: nodes
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Jay Dobies
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close 688298
TreeView+ depends on / blocked
 
Reported: 2011-05-04 01:32 UTC by Jay Dobies
Modified: 2011-08-16 12:22 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-08-16 12:10:16 UTC
Embargoed:


Attachments (Terms of Use)

Description Jay Dobies 2011-05-04 01:32:38 UTC
I'm pretty sure I already filed a bug to more gracefully handle when a repo delete fails on the CDS.

We keep a list of repos on the CDS so we can cross reference that against repos in a sync request to determine what to delete. We then use that info to delete the repo directory. That part works.

That file with the list of deployed repos is updated when the sync occurs. That part works too.

The caveat is that the file is only updated if there was at least one repo in the sync request (the updating is done inside the loop of repos). In other words, if repos were deployed and then all repos were removed from the CDS, it will delete their contents but not update that file to indicate there are no deployed repos.

That really breaks things on the CDS because of the first line in this description (i.e. if an attempted delete fails, everything tanks).

Comment 1 Jay Dobies 2011-05-09 20:16:17 UTC
commit 9229d8fbcd8aff38e333c27714406d7dc7e0fa77
Author: Jay Dobies <jason.dobies>
Date:   Mon May 9 16:18:18 2011 -0400

    701829 - Clear the repo listing file on empty syncs and delete_all calls

src/pulp/cds/cdslib.py



The big thing to check for in verifying this is that when repos are unassociated from a CDS (and a sync is called on that CDS) the repo path does not appear in the file on the CDS /var/lib/pulp-cds/cds_repo_list. Make sure to check this for CDS unregisters as well.

Comment 2 Jeff Ortel 2011-05-09 22:25:19 UTC
build 0.174

Comment 3 Preethi Thomas 2011-05-12 14:16:11 UTC
[root@preethi ~]# rpm -q pulp
pulp-0.0.174-1.fc14.noarch


[root@preethi ~]# pulp-admin cds unassociate_repo --hostname=pulp-cds.usersys.redhat.com --repoid=repos-pulp-pulp-fedora-14-i386
Successfully unassociated repo [repos-pulp-pulp-fedora-14-i386] from CDS [pulp-cds.usersys.redhat.com]

[root@preethi ~]# pulp-admin cds sync --hostname=pulp-cds.usersys.redhat.com 
Sync for CDS [pulp-cds.usersys.redhat.com] started
Use "cds status" to check on the progress

[root@pulp-cds ~]# cat /var/lib/pulp-cds/cds_repo_list 
repos/pulp/pulp/fedora-14/x86_64
pub/updates
repos/pulp/pulp/fedora-14/i386
[root@pulp-cds ~]# cat /var/lib/pulp-cds/cds_repo_list 
repos/pulp/pulp/fedora-14/x86_64
pub/updates

Comment 4 Preethi Thomas 2011-08-16 12:10:16 UTC
Closing with Community Release 15

pulp-0.0.223-4.

Comment 5 Preethi Thomas 2011-08-16 12:22:20 UTC
Closing with Community Release 15

pulp-0.0.223-4.


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