Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1113398 - Missing organization_id foreign key on a number of tables
Summary: Missing organization_id foreign key on a number of tables
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Partha Aji
QA Contact: Katello QA List
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-26 06:12 UTC by Partha Aji
Modified: 2019-09-26 13:47 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-11 12:20:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 4870 0 None None None 2016-04-22 15:49:34 UTC

Description Partha Aji 2014-06-26 06:12:21 UTC
There are no foreign keys for any organization_id columns in our database. This includes activation keys, environments, etc.

Comment 1 Partha Aji 2014-06-26 06:12:23 UTC
Created from redmine issue http://projects.theforeman.org/issues/4870

Comment 2 Partha Aji 2014-06-26 06:12:33 UTC
Upstream bug assigned to paji

Comment 4 sthirugn@redhat.com 2014-06-27 18:46:39 UTC
Last year we had a very hard time with foreign key changes in sam.  Is this really slotted for GA? or for future?

Comment 5 Partha Aji 2014-06-27 19:43:07 UTC
Suresh,
I did think about the pain we had last year having written a few of those nightmarish upgrade migration scripts and many of foreign key complaints were on upgrades. And most of those FK issues were because the code would remove one association and forget to remove the child associations. For example if I removed an environment and forgot to remove every place environments were FK'ed we would get a breakage. It was probably harder and more annoying for SAM because many of those tables in the DB were Katello specific and never used by SAM. But atleast we know that there was no dirty data in the DB related to this.

Now for the other side of this issue, if this bug had been merged earlier we would have not enncountered https://bugzilla.redhat.com/show_bug.cgi?id=1113684 where the satellite had repositories that basically pointed to non existent products (due to botched bulk product delete code). The FK'ed code would ve failed earlier and said "bulk delete of product failed"  and left data at a consistent state and not affected a totally different page.

Also we need to consider that this update adds only like 15 foreign keys. There are already like over 100 foreign keys being used in the present product. 

My vote is in favour of including it in the GA,

Comment 6 sthirugn@redhat.com 2014-06-27 19:52:04 UTC
(In reply to Partha Aji from comment #5)
> Suresh,
> I did think about the pain we had last year having written a few of those
> nightmarish upgrade migration scripts and many of foreign key complaints
> were on upgrades. And most of those FK issues were because the code would
> remove one association and forget to remove the child associations. For
> example if I removed an environment and forgot to remove every place
> environments were FK'ed we would get a breakage. It was probably harder and
> more annoying for SAM because many of those tables in the DB were Katello
> specific and never used by SAM. But atleast we know that there was no dirty
> data in the DB related to this.
> 
> Now for the other side of this issue, if this bug had been merged earlier we
> would have not enncountered
> https://bugzilla.redhat.com/show_bug.cgi?id=1113684 where the satellite had
> repositories that basically pointed to non existent products (due to botched
> bulk product delete code). The FK'ed code would ve failed earlier and said
> "bulk delete of product failed"  and left data at a consistent state and not
> affected a totally different page.
> 
> Also we need to consider that this update adds only like 15 foreign keys.
> There are already like over 100 foreign keys being used in the present
> product. 
> 
> My vote is in favour of including it in the GA,

@Partha: Ok, it makes sense to include this in GA.  Thank you for the explanation.

Comment 7 Bryan Kearney 2014-06-27 20:05:23 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/4870 has been closed

Comment 9 Bryan Kearney 2014-09-11 12:20:54 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.


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