Bug 867624 - Content Deletion - deleting repos with changeset report success before completion
Content Deletion - deleting repos with changeset report success before comple...
Product: Red Hat Satellite 6
Classification: Red Hat
Component: API (Show other bugs)
Unspecified Linux
medium Severity medium (vote)
: Unspecified
: --
Assigned To: Katello Bug Bin
Katello QA List
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2012-10-17 17:07 EDT by Brad Buckingham
Modified: 2014-02-18 09:44 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-02-18 09:44:30 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Brad Buckingham 2012-10-17 17:07:19 EDT
Description of problem:

If a user deletes some repositories (using a deletion changeset) and then attempts to re-promote the repo after being notified that the deletion is complete, they may receive an error during the promotion attempt.  

The issue is that the deletion is reported as 'successful'; however, pulp is continuing to delete the repository.  After the repository is fully deleted from pulp (e.g. wait longer), the user can successfully re-promote the repository.

Version-Release number of selected component (if applicable):
github master

How reproducible:
easy, if the repository is large and user re-promotes right after deletion reports success...

Steps to Reproduce:

basic setup:
environment create --org ACME_Corporation --name dev --prior Library
environment create --org ACME_Corporation --name test --prior dev

provider create --org ACME_Corporation --name prov1
product create --org ACME_Corporation --provider prov1 --name prod1
repo create --org ACME_Corporation --product prod1 --name repo1 --url [largerepo]
repo create --org ACME_Corporation --product prod1 --name repo2 --url [largerepo]
repo synchronize --org ACME_Corporation --product prod1 --name repo1
repo synchronize --org ACME_Corporation --product prod1 --name repo2

promote the product (consisting of the 2 large repos - e.g. rhel6):
changeset create --name prod1_to_dev --env dev --org ACME_Corporation
changeset update --add_product prod1 --name prod1_to_dev --org ACME_Corporation --environment dev
changeset apply --env dev --org ACME_Corporation --name prod1_to_dev

delete the 2 repos from dev:
changeset create --name remove_2_repos --env dev --org ACME_Corporation --deletion
changeset update --from_product prod1 --add_repo repo1 --name remove_2_repos --org ACME_Corporation --environment dev
changeset update --from_product prod1 --add_repo repo2 --name remove_2_repos --org ACME_Corporation --environment dev
changeset apply --env dev --org ACME_Corporation --name remove_2_repos

promote the first repo: (promoting same repos as deleted above:)
changeset create --name add_repo1 --env dev --org ACME_Corporation
changeset update --from_product prod1 --add_repo repo1 --name add_repo1 --org ACME_Corporation --environment dev
changeset apply --env dev --org ACME_Corporation --name add_repo1
Actual results:

The following error observed after the last 'changeset apply':

Changeset [ add_repo1 ] promotion failed: Resources::Pulp::Repository: 409 Conflict "A repository with the id, ACME_Corporation-dev-prod1-repo1, already exists" (POST /pulp/api/repositories/ACME_Corporation-prod1-repo1/clone/)

Expected results:

The expectation is that when the apply of 'remove_2_repos' reports successful completion, the user is able to successfully create/update/apply the add_repo1 changeset.

Additional info:
Comment 2 Justin Sherrill 2013-01-22 16:16:32 EST
FYI pulpv2 provides tasks for repo deletion that we can wait on.  Integrating that into orchestration might be tricky, but we can fix it in pulpv2 branch.
Comment 3 Bryan Kearney 2014-02-18 09:44:30 EST
This bug is against katello-cli which we are no longer supporting. Closing.

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