Project

General

Profile

Actions

Bug #6915

closed

Foreman-rake clean_backend_objects fails due to activation key

Added by Justin Sherrill over 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Hosts
Target version:
Difficulty:
easy
Triaged:
Yes
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:

Actions

Also available in: Atom PDF