Bug 1693793

Summary: race condition when importing manifest with registered hypervisors
Product: Red Hat Satellite Reporter: Justin Sherrill <jsherril>
Component: Subscription ManagementAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Cole Higgins <chiggins>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: david.zhao, ktordeur, mlele, rplevka, wclark
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-18 19:44:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Justin Sherrill 2019-03-28 16:04:23 UTC
Reproduction steps:

1.  register a bunch of hypervisors
2.  import a manifest with virt supported subs
3.  delete the manifest and repeat 2 a few times until you hit an warning

<pre>

ActiveRecord::InvalidForeignKey

PG::ForeignKeyViolation: ERROR: update or delete on table "katello_pools" violates foreign key constraint "katello_pool_products_pool_id_fk" on table "katello_pool_products" DETAIL: Key (id)=(247) is still referenced from table "katello_pool_products". : DELETE FROM "katello_pools" WHERE "katello_pools"."id" = $1



- "/home/vagrant/.rvm/gems/ruby-2.5.1/gems/activerecord-5.2.1/lib/active_record/transactions.rb:305:in
  `destroy'"
- "/home/vagrant/git/katello/app/models/katello/glue/candlepin/candlepin_object.rb:49:in
  `block (2 levels) in import_all'"
- "/home/vagrant/.rvm/gems/ruby-2.5.1/gems/activerecord-5.2.1/lib/active_record/relation/delegation.rb:41:in
  `each'"
- "/home/vagrant/.rvm/gems/ruby-2.5.1/gems/activerecord-5.2.1/lib/active_record/relation/delegation.rb:41:in
  `each'"
- "/home/vagrant/git/katello/app/models/katello/glue/candlepin/candlepin_object.rb:44:in
  `block in import_all'"
</pre>

Comment 1 Justin Sherrill 2019-03-28 16:04:25 UTC
Created from redmine issue https://projects.theforeman.org/issues/26472

Comment 2 Justin Sherrill 2019-03-28 16:04:27 UTC
Upstream bug assigned to None

Comment 4 Brad Buckingham 2019-04-02 10:20:16 UTC
If this error is encountered, attempt a manifest refresh as a workaround.

Comment 10 Mike McCune 2022-01-28 22:33:49 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team. Thank you.

Comment 11 Mike McCune 2022-03-18 19:44:22 UTC
Thank you for your interest in Red Hat Satellite. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this feel free to contact your Red Hat Account Team. Thank you.