Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1183784 - clean hosting directories on repo distributor delete #648

Merged
merged 1 commit into from
Feb 20, 2015

Conversation

asmacdo
Copy link
Contributor

@asmacdo asmacdo commented Feb 6, 2015

When repos are deleted, the simple hosting directory structure that matches their relative url is not cleaned up, which leaves the opportunity to conflict with sub-urls of deleted repos.

BZ-1183784

This patch cleans up this directory structure when a repo is deleted. There is also a migration to clean already existing orphaned directories.

@barnabycourt barnabycourt self-assigned this Feb 6, 2015

# remove certificates for certificate based auth
configuration.remove_cert_based_auth(repo, config)

def clean_simple_hosting_directories(self, start_location, containing_dir):

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing doc

@barnabycourt
Copy link
Contributor

This PR is missing the detailed unit tests of the logic for the clean_simple_hosted_directories method. All it is doing is ensuring that the method is called.

@asmacdo
Copy link
Contributor Author

asmacdo commented Feb 9, 2015

@barnabycourt, fixed based on PR comments, read for re-review.

# remove the directory. It is possible that the concurrent operation created the
# listing file before this operation deleted it, so to be safe, we need to
# regenerate the listing file.
util.generate_listing_files(up_dir, up_dir)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not appear that this code path is covered in the unit test

@barnabycourt
Copy link
Contributor

one other code path that should be covered in the unit tests but otherwise LGTM

@mhrivnak mhrivnak assigned asmacdo and unassigned barnabycourt Feb 16, 2015
@asmacdo asmacdo force-pushed the 1183784-dev branch 2 times, most recently from 4b585a4 to f891e20 Compare February 20, 2015 22:14
asmacdo added a commit that referenced this pull request Feb 20, 2015
1183784 - clean hosting directories on repo distributor delete
@asmacdo asmacdo merged commit 97de7ff into pulp:2.6-dev Feb 20, 2015
@asmacdo asmacdo deleted the 1183784-dev branch April 27, 2015 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants