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 874185 - After 1.0 to 1.1 upgrade, seeing duplicated repositories in UI
Summary: After 1.0 to 1.1 upgrade, seeing duplicated repositories in UI
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: WebUI
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: Hayk Hovsepyan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-07 16:34 UTC by Og Maciel
Modified: 2019-09-25 21:12 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Due to a missing label association after upgrading 1.0 to 1.1, System Engine displays repository entries twice in the Content Search page. This fix simulates labels post-migration.
Clone Of:
Environment:
Last Closed: 2012-12-04 19:57:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screenshot1 (32.97 KB, image/png)
2012-11-07 16:35 UTC, Og Maciel
no flags Details
screenshot2 (34.20 KB, image/png)
2012-11-07 16:35 UTC, Og Maciel
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:1543 0 normal SHIPPED_LIVE Important: CloudForms System Engine 1.1 update 2012-12-05 00:39:57 UTC

Description Og Maciel 2012-11-07 16:34:51 UTC
Description of problem:

After upgrading from 1.0 to 1.1, I noticed that the web ui showed duplicated entries for my repositories in the Content Search page.

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

* candlepin-0.7.8.1-1.el6cf.noarch
* candlepin-selinux-0.7.8.1-1.el6cf.noarch
* candlepin-tomcat6-0.7.8.1-1.el6cf.noarch
* katello-1.1.12-20.el6cf.noarch
* katello-all-1.1.12-20.el6cf.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.1.8-1.el6cf.noarch
* katello-cli-1.1.8-12.el6cf.noarch
* katello-cli-common-1.1.8-12.el6cf.noarch
* katello-common-1.1.12-20.el6cf.noarch
* katello-configure-1.1.9-11.el6cf.noarch
* katello-glue-candlepin-1.1.12-20.el6cf.noarch
* katello-glue-foreman-0.1.318-1.el6cf.noarch
* katello-glue-pulp-1.1.12-20.el6cf.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-qpid-client-key-pair-1.0-1.noarch
* katello-selinux-1.1.1-2.el6cf.noarch
* pulp-1.1.14-1.el6cf.noarch
* pulp-common-1.1.14-1.el6cf.noarch
* pulp-selinux-server-1.1.14-1.el6cf.noarch

How reproducible:


Steps to Reproduce:
1. Get a 1.0 system and create org with 1 custom provider, 1 product, 2 repos
2. Sync and promote product
3. Upgrade to 1.1
4. Visit Content Search and search for all repos or packages
  
Actual results:

Seeing duplicated entries

Expected results:


Additional info:

Comment 1 Og Maciel 2012-11-07 16:35:24 UTC
Created attachment 640178 [details]
screenshot1

Comment 2 Og Maciel 2012-11-07 16:35:53 UTC
Created attachment 640179 [details]
screenshot2

Comment 4 Justin Sherrill 2012-11-08 02:45:58 UTC
The problem seems to be that for some reason  library_instance_id isn't being set properly on non-library Repository objects within katello's db upon upgrade.

IT is supposed to set in 20120702175532_add_repository_library_id.rb but for some reason its not.  When i run the code by hand after upgrading it seems to function properly....

Will dig some more.

Comment 5 Ivan Necas 2012-11-08 09:37:39 UTC
The problem is org.promotion_paths doesn't start with Library when running the migration for some reason. Digging in as well.

Comment 6 Ivan Necas 2012-11-08 09:49:13 UTC
Taking back my last comment: this is the real issue:

  def get_clone env
    Repository.find_by_pulp_id(self.clone_id(env))
  rescue
    nil
  end

clone_id uses label, but this is introduced in the migration after this one. The rescue causes the migration continues without error

Comment 7 Ivan Necas 2012-11-08 10:57:23 UTC
Patch send in https://github.com/Katello/katello/pull/1018

Comment 8 Garik Khachikyan 2012-11-08 12:55:48 UTC
btw: i just reproduced the same with: 1.0.1 -> 1.1

Comment 13 Justin Sherrill 2012-11-09 03:27:04 UTC
Good catch Ivan, thanks for taking this over during my PTO.  Since the labels were added after i added this migration they worked fine at the time obviously and worked after the upgrade was complete ;)

I do wonder if it had been simplier to just move the migration after the label creation one, but that may have caused other complications i guess.  Anyways, good work!

Comment 16 Ivan Necas 2012-11-09 08:57:54 UTC
Moving the migrations is not an option in the upstream, since it would break the installatins that already have this migration applied.

Comment 17 Ivan Necas 2012-11-09 09:26:54 UTC
There was an additional issue found with this fix: https://bugzilla.redhat.com/show_bug.cgi?id=874768

This fix comes in https://github.com/Katello/katello/pull/1027/commits

Comment 18 Hayk Hovsepyan 2012-11-09 13:26:36 UTC
Verified on recent brew revision:

katello-certs-tools-1.1.8-1.el6cf.noarch
katello-configure-1.1.9-12.el6cf.noarch
katello-glue-candlepin-1.1.12-22.el6cf.noarch
katello-common-1.1.12-22.el6cf.noarch
katello-glue-pulp-1.1.12-22.el6cf.noarch
katello-agent-1.1.2-1.el6cf.noarch
katello-glue-foreman-0.1.311-1.el6_2.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-cli-common-1.1.8-12.el6cf.noarch
katello-selinux-1.1.1-2.el6cf.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-cli-1.1.8-12.el6cf.noarch
katello-1.1.12-22.el6cf.noarch

Now it does not show duplicate search results.

Comment 20 errata-xmlrpc 2012-12-04 19:57:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-1543.html

Comment 21 Mike McCune 2013-08-16 17:58:32 UTC
getting rid of 6.0.0 version since that doesn't exist


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