Project

General

Profile

Actions

Bug #11436

closed

Disabling used repository_set removes repo already from candlepin and pulp before chcking it is used

Added by Brad Buckingham over 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Web UI
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1244314
Description of problem:
Disabling a repository set does the check if it is used in the finalize() step. That means even used repository set will be already be removed from candlepin and pulp. Only the removal from Katello in the finalize step will then not be done

Below the successful Run steps:

sequence         concurrence
6: Actions::Pulp::Repository::Destroy (success) [ 68.70s / 5.42s ]
9: Actions::ElasticSearch::Repository::Destroy (success) [ 61.92s / 61.92s ]
12: Actions::Candlepin::Environment::SetContent (success) [ 0.19s / 0.19s

See below the failing Finalize step:

3: Actions::ElasticSearch::Reindex (success) [ 3127.81s / 0.15s ]
14: Actions::Katello::Repository::Destroy (error) [ 3127.93s / 0.24s ] Skip

Started at: 2015-07-17 17:17:28 UTC
Ended at: 2015-07-17 18:09:35 UTC
Real time: 3127.93s
Execution time (excluding suspended state): 0.24s
Input:

---
repository:
id: 21
name: Red Hat Enterprise Linux 6 Server - Extended Update Support RPMs x86_64 6.5
label: Red_Hat_Enterprise_Linux_6_Server_-_Extended_Update_Support_RPMs_x86_64_6_5
product:
id: 19
name: Red Hat Enterprise Linux Server - Extended Update Support
label: Red_Hat_Enterprise_Linux_Server_-_Extended_Update_Support
cp_id: '70'
provider:
id: 4
name: Red Hat
organization:
id: 3
name: Hilti
label: Hilti
user_id: 4
finalize_destroy: true
remote_user: hoici-3a181dcb
locale: en

Output:

--- {}

Error:

RuntimeError

Repository cannot be deleted since it has already been included in a published Content View. Please delete all Content View versions containing this repository before attempting to deleting it.

---
- /opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/models/katello/model.rb:22:in
`destroy!'
- /opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/app/lib/actions/katello/repository/destroy.rb:48:in
`finalize'
- /opt/rh/ruby193/root/usr/share/gems/gems/dynflow-0.7.3/lib/dynflow/action.rb:465:in
`block (2 levels) in execute_finalize'

After this the Sat6 is unstable as it cannot find the Repo anymore, e.g. listing /products does not work, because of candlepin returns 404-NotFound:

Processing by Katello::Api::Rhsm::CandlepinProxiesController#get as JSON
Parameters: {"id"=>"f7be3be2-b8eb-44e8-817c-67c577b0e0d3"}
[ERROR 2015-07-17 18:10:35 pulp_rest #12086] RestClient.get "https://li-lc-1017.hag.hilti.com/pulp/api/v2/repositories/Hilti-Red_Hat_Enterpri
se_Linux_Server_-_Extended_Update_Support-Red_Hat_Enterprise_Linux_6_Server_-_Extended_Update_Support_RPMs_x86_64_6_5//history/sync/", "Accept
"=>"*/*; q=0.5, application/xml", "Accept-Encoding"=>"gzip, deflate", "Authorization"=>"OAuth oauth_consumer_key=\"katello\", oauth_nonce=\"CJ
b8bA2QmBNEQ20uFIID1YLOabMZ0CPTdHVRo\", oauth_signature=\"wIEjIJATYTxk1FYdCkNQdhQ0gUY%3D\", oauth_signature_method=\"HMAC-SHA1\", oauth_timesta
mp=\"1437156635\", oauth_version=\"1.0\"", "accept"=>"application/json", "content_type"=>"application/json", "pulp-user"=>"hoici-3a181dcb" | \n# => 404 NotFound | application/json 1068 bytes

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

How reproducible:

Steps to Reproduce:
1. Enable a RedHat repository
2. Create and Publish Content View using the RedHat repo
3. Disable the RedHat repository
4. List products

Actual results:
Disable task fails in Finalize step
List products does not work

Expected results:
Disable task fails in Plan step
List products works

Additional info:

Actions #1

Updated by Eric Helms over 8 years ago

  • translation missing: en.field_release set to 70
  • Triaged changed from No to Yes
Actions #2

Updated by The Foreman Bot over 8 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/5428 added
  • Pull request deleted ()
Actions #3

Updated by Brad Buckingham over 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF