Bug 836640

Summary: The CDS deletes all repositories during its sync
Product: [Retired] Pulp Reporter: Jay Dobies <jason.dobies>
Component: nodesAssignee: Jeff Ortel <jortel>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 1.1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 916308 (view as bug list) Environment:
Last Closed: 2013-01-07 14:09:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 916308    

Description Jay Dobies 2012-06-29 17:44:16 UTC
The bug was introduced in the fix for 800525.

Because of that change, the local file store for what repos exist on the CDS contains:

$ cat .cds_repo_list 
repos/repos/pulp/pulp/v1/stable/fedora-16/x86_64

The relative URL coming back from the server:

repos/pulp/pulp/v1/stable/fedora-16/x86_64

Since those are not the same, the CDS logic thinks the existing repo on disk was removed and deletes it.

You can see that it's happening in the log on the CDS:

2012-06-29 13:30:28,503 [INFO][worker-0] _delete_removed_repos() @ cdslib.py:400 - Removing old repo [/var/lib/pulp-cds/repos/repos/pulp/pulp/v1/stable/fedora-16/x86_64]

That was seen by synchronizing the CDS twice with no changes to its repositories in the interim.

Comment 1 Jay Dobies 2012-06-29 17:54:33 UTC
commit 0ad6606b1d61fd41c8186bc4cd263efdeac7d6da
Author: Jay Dobies <jason.dobies>
Date:   Fri Jun 29 13:51:37 2012 -0400

    836640 - The storage of the relative URL changed so we need to update
    the relative URL checking to match that

src/pulp/cds/cdslib.py

Comment 2 Jay Dobies 2012-06-29 18:24:37 UTC
In 1.1.11

Comment 3 Preethi Thomas 2012-07-02 12:50:59 UTC
[root@pulp-f16 ~]# pulp-admin -u admin -p admin cds sync --hostname=f16-cds.usersys.redhat.com 
Sync for CDS [f16-cds.usersys.redhat.com] started
Use "cds status" to check on the progress


2012-07-02 08:46:52,013 [INFO][worker-0] sync() @ cdslib.py:120 - Received sync call
2012-07-02 08:46:52,014 [INFO][worker-0] sync() @ cdslib.py:121 - {'repos': [{'name': 'zoo', 'publish': True, 'relative_path': 'fakerepos/zoo', 'source': {'url': 'http://inecas.fedorapeople.org/fakerepos/zoo/', 'type': 'remote'}, '_id': 'zoo', 'arch': 'noarch', 'id': 'zoo'}, {'name': 'pulp-f17', 'publish': True, 'relative_path': 'repos/pulp/pulp/v1/stable/fedora-17/x86_64', 'source': {'url': 'http://repos.fedorapeople.org/repos/pulp/pulp/v1/stable/fedora-17/x86_64/', 'type': 'remote'}, '_id': 'pulp-f17', 'arch': 'noarch', 'id': 'pulp-f17'}, {'name': 'pulp-f16-32', 'publish': True, 'relative_path': 'repos/pulp/pulp/v1/stable/fedora-16/i386', 'source': {'url': 'http://repos.fedorapeople.org/repos/pulp/pulp/v1/stable/fedora-16/i386/', 'type': 'remote'}, '_id': 'pulp-f16-32', 'arch': 'noarch', 'id': 'pulp-f16-32'}, {'name': 'pulp', 'publish': True, 'relative_path': 'repos/pulp/pulp/v1/stable/fedora-16/x86_64', 'source': {'url': 'http://repos.fedorapeople.org/repos/pulp/pulp/v1/stable/fedora-16/x86_64/', 'type': 'remote'}, '_id': 'pulp', 'arch': 'noarch', 'id': 'pulp'}], 'repo_base_url': 'https://pulp-f16.usersys.redhat.com//pulp/repos', 'repo_cert_bundles': {'pulp-f17': None, 'pulp-f16-32': None, 'pulp': None, 'zoo': None}, 'cluster_id': None, 'cluster_members': None, 'server_ca_cert': None, 'global_cert_bundle': None}
2012-07-02 08:46:52,017 [INFO][worker-0] _sync_repo() @ cdslib.py:318 - Synchronizing repo at [https://pulp-f16.usersys.redhat.com//pulp/repos/fakerepos/zoo]
2012-07-02 08:46:52,018 [INFO][worker-0] _sync_repo() @ cdslib.py:324 - Synchronizing repo [zoo] from [https://pulp-f16.usersys.redhat.com//pulp/repos/fakerepos/zoo] to [/var/lib/pulp-cds/repos/fakerepos/zoo]
2012-07-02 08:46:53,644 [INFO][worker-0] _sync_repo() @ cdslib.py:361 - Successfully finished synccing [https://pulp-f16.usersys.redhat.com//pulp/repos/fakerepos/zoo]
2012-07-02 08:46:53,646 [INFO][worker-0] _sync_repo() @ cdslib.py:318 - Synchronizing repo at [https://pulp-f16.usersys.redhat.com//pulp/repos/repos/pulp/pulp/v1/stable/fedora-17/x86_64]
2012-07-02 08:46:53,646 [INFO][worker-0] _sync_repo() @ cdslib.py:324 - Synchronizing repo [pulp-f17] from [https://pulp-f16.usersys.redhat.com//pulp/repos/repos/pulp/pulp/v1/stable/fedora-17/x86_64] to [/var/lib/pulp-cds/repos/repos/pulp/pulp/v1/stable/fedora-17/x86_64]
2012-07-02 08:46:55,141 [INFO][worker-0] _sync_repo() @ cdslib.py:361 - Successfully finished synccing [https://pulp-f16.usersys.redhat.com//pulp/repos/repos/pulp/pulp/v1/stable/fedora-17/x86_64]
2012-07-02 08:46:55,143 [INFO][worker-0] _sync_repo() @ cdslib.py:318 - Synchronizing repo at [https://pulp-f16.usersys.redhat.com//pulp/repos/repos/pulp/pulp/v1/stable/fedora-16/i386]
2012-07-02 08:46:55,143 [INFO][worker-0] _sync_repo() @ cdslib.py:324 - Synchronizing repo [pulp-f16-32] from [https://pulp-f16.usersys.redhat.com//pulp/repos/repos/pulp/pulp/v1/stable/fedora-16/i386] to [/var/lib/pulp-cds/repos/repos/pulp/pulp/v1/stable/fedora-16/i386]
2012-07-02 08:46:56,619 [INFO][worker-0] _sync_repo() @ cdslib.py:361 - Successfully finished synccing [https://pulp-f16.usersys.redhat.com//pulp/repos/repos/pulp/pulp/v1/stable/fedora-16/i386]
2012-07-02 08:46:56,620 [INFO][worker-0] _sync_repo() @ cdslib.py:318 - Synchronizing repo at [https://pulp-f16.usersys.redhat.com//pulp/repos/repos/pulp/pulp/v1/stable/fedora-16/x86_64]
2012-07-02 08:46:56,620 [INFO][worker-0] _sync_repo() @ cdslib.py:324 - Synchronizing repo [pulp] from [https://pulp-f16.usersys.redhat.com//pulp/repos/repos/pulp/pulp/v1/stable/fedora-16/x86_64] to [/var/lib/pulp-cds/repos/repos/pulp/pulp/v1/stable/fedora-16/x86_64]
2012-07-02 08:46:58,204 [INFO][worker-0] _sync_repo() @ cdslib.py:361 - Successfully finished synccing [https://pulp-f16.usersys.redhat.com//pulp/repos/repos/pulp/pulp/v1/stable/fedora-16/x86_64]
2012-07-02 08:46:58,204 [INFO][worker-0] update_cluster_membership() @ cdslib.py:236 - Received cluster membership update; Cluster [None], Members []
2012-07-02 08:46:58,205 [INFO][worker-0] update_cluster_membership() @ cdslib.py:247 - No changes needed to be made to cluster memberships

Comment 4 Preethi Thomas 2012-07-02 13:35:39 UTC
verified 

[root@pulp-f16 ~]# rpm -q pulp
pulp-1.1.11-1.fc16.noarch

Comment 5 Preethi Thomas 2013-01-07 14:09:38 UTC
Pulp 2.0 released.