Project

General

Profile

Bug #6915

Foreman-rake clean_backend_objects fails due to activation key

Added by Justin Sherrill over 5 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Category:
Hosts
Target version:
Difficulty:
easy
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1125023
Description of problem:

Running foreman-rake katello:clean_backend_objects --trace

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

How reproducible:

Steps to Reproduce:
1. foreman-rake katello:clean_backend_objects --trace
2. read error
3.

Actual results:

/opt/rh/ruby193/root/usr/bin/rake:32:in `<main>'
caused by: (PGError) ERROR: update or delete on table "katello_systems" violates foreign key constraint "system_activation_keys_system_id_fk" on table "katello_system_activation_keys"
DETAIL: Key (id)=(4) is still referenced from table "katello_system_activation_keys".

[root@satellite ~]# hammer activation-key list --organization ACME_Corporation
---|---------------|----------------|-----------------------|-------------
ID | NAME | CONSUMED | LIFECYCLE ENVIRONMENT | CONTENT VIEW
---|---------------|----------------|-----------------------|-------------
1 | LAMP-Complete | 5 of Unlimited | Development | LAMP-Press
---|---------------|----------------|-----------------------|-------------

Expected results:

Successful run of foreman-rake katello:clean_backend_objects since activation_key id=4 does not exist.

Additional info:

Associated revisions

Revision a91ee656 (diff)
Added by Justin Sherrill over 5 years ago

fixes #6915 - cleanup activation key association on clean_backend_objects

Revision 8f512156
Added by Justin Sherrill over 5 years ago

Merge pull request #4524 from jlsherrill/6915

fixes #6915 - cleanup activation key association on clean_backend_objects

History

#1 Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 54
  • Pull request https://github.com/Katello/katello/pull/4524 added
  • Pull request deleted ()

#2 Updated by Eric Helms over 5 years ago

  • Difficulty set to easy
  • Triaged changed from No to Yes

#3 Updated by Justin Sherrill over 5 years ago

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

#4 Updated by Eric Helms over 5 years ago

  • Legacy Backlogs Release (now unused) set to 13

Also available in: Atom PDF