Bug 2169322 - Reclaim space for repository fails with Cannot delete some instances of model 'Artifact' because they are referenced through protected foreign keys: 'ContentArtifact.artifact'."
Summary: Reclaim space for repository fails with Cannot delete some instances of model...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.11.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: 6.14.0
Assignee: satellite6-bugs
QA Contact: addubey
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-13 10:11 UTC by Manu Sunil
Modified: 2023-11-08 14:18 UTC (History)
14 users (show)

Fixed In Version: pulpcore-3.28.6, pulpcore-3.23.11, pulpcore-3.22.10, pulpcore-3.21.13, pulpcore-3.18.23
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2239041 (view as bug list)
Environment:
Last Closed: 2023-11-08 14:18:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Hotfix RPM for Satellite/Capsule 6.11.5 on EL8 (662.90 KB, application/x-rpm)
2023-09-07 20:53 UTC, wclark
no flags Details
Hotfix RPM for Satellite/Capsule 6.11.5 on EL7 (692.16 KB, application/x-rpm)
2023-09-07 20:55 UTC, wclark
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Document Foundation 7009670 0 None None None 2023-05-01 00:53:25 UTC
Github pulp pulpcore issues 3610 0 None closed Reclaim space for repository fails with Cannot delete some instances of model 'Artifact' because they are referenced thr... 2023-07-28 18:05:25 UTC
Red Hat Issue Tracker SAT-15842 0 None None None 2023-02-13 14:12:50 UTC
Red Hat Issue Tracker SAT-19942 0 None None None 2023-09-08 17:25:25 UTC
Red Hat Knowledge Base (Solution) 7009670 0 None None None 2023-05-22 10:34:05 UTC
Red Hat Product Errata RHSA-2023:6818 0 None None None 2023-11-08 14:18:54 UTC

Description Manu Sunil 2023-02-13 10:11:14 UTC
Description of problem:

- Reclaim space for repository fails with the following error.

  ~~~
  Task paused with error: "("Cannot delete some instances of model 'Artifact' because they are referenced through protected foreign keys: 'ContentArtifact.artifact'.", {<ContentArtifact: pk=452959ad-c045-4e85-bf9f-6651ba37f57d>})"
  ~~~

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

  tfm-pulpcore-python3-pulpcore-3.16.14-1.el7pc.noarch
  tfm-pulpcore-python3-pulp-rpm-3.17.10-2.el7pc.noarch    
  satellite-6.11.4.1-1.el7sat.noarch

Actual results:


- The reclaim space task on Satellite for a repository fails with the following message

  ~~~
  023-02-10T10:36:24 [E|bac|69a59329] ("Cannot delete some instances of model 'Artifact' because they are referenced through protected foreign keys: 'ContentArtifact.artifact'.",
 {<ContentArtifact: pk=452959ad-c045-4e85-bf9f-6651ba37f57d>}) (Katello::Errors::Pulp3Error)  
  ~~~

Expected results:

- Reclaim space should complete without any errors.

Comment 7 Robin Chan 2023-07-28 18:05:26 UTC
The Pulp upstream bug status is at closed. Updating the external tracker on this bug.

Comment 8 Robin Chan 2023-07-28 18:05:29 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 15 wclark 2023-09-07 20:53:00 UTC
Created attachment 1987644 [details]
Hotfix RPM for Satellite/Capsule 6.11.5 on EL8

A hotfix RPM is now available for Satellite/Capsule 6.11.5 on RHEL 8.

Installation instructions:

1. Create a backup or snapshot of the Satellite or Capsule server.

2. Download the hotfix RPM python38-pulpcore-3.16.15-2.HOTFIXRHBZ2169322.el8pc.noarch.rpm from the attachment and copy it to Satellite or Capsule server

3. # dnf install ./python38-pulpcore-3.16.15-2.HOTFIXRHBZ2169322.el8pc.noarch.rpm --disableplugin=foreman-protector

4. # satellite-maintain service restart

Comment 16 wclark 2023-09-07 20:55:12 UTC
Created attachment 1987645 [details]
Hotfix RPM for Satellite/Capsule 6.11.5 on EL7

A hotfix RPM is now available for Satellite/Capsule 6.11.5 on RHEL 7.

Installation instructions:

1. Create a backup or snapshot of the Satellite or Capsule server.

2. Download the hotfix RPM tfm-pulpcore-python3-pulpcore-3.16.15-2.HOTFIXRHBZ2169322.el7pc.noarch.rpm from the attachment and copy it to Satellite or Capsule server

3. # yum install ./tfm-pulpcore-python3-pulpcore-3.16.15-2.HOTFIXRHBZ2169322.el7pc.noarch.rpm --disableplugin=foreman-protector

4. # satellite-maintain service restart

Comment 22 errata-xmlrpc 2023-11-08 14:18:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.14 security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:6818


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