Bug 1693793 - race condition when importing manifest with registered hypervisors
Summary: race condition when importing manifest with registered hypervisors
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Subscription Management
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Cole Higgins
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-28 16:04 UTC by Justin Sherrill
Modified: 2022-03-18 19:44 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-18 19:44:22 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 26472 0 Normal New race condition when importing manifest with registered hypervisors 2021-02-08 13:43:15 UTC
Red Hat Knowledge Base (Solution) 4175211 0 None None When uploading Manifest on Satellite 6.5, facing issue: PG::ForeignKeyViolation: ERROR: update or delete on table "kate... 2019-05-27 18:58:59 UTC

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.


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