Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 874185 - After 1.0 to 1.1 upgrade, seeing duplicated repositories in UI
After 1.0 to 1.1 upgrade, seeing duplicated repositories in UI
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: WebUI (Show other bugs)
6.0.1
Unspecified Unspecified
unspecified Severity unspecified (vote)
: Unspecified
: Unused
Assigned To: Ivan Necas
Hayk Hovsepyan
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-07 11:34 EST by Og Maciel
Modified: 2014-01-27 08:38 EST (History)
6 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-04 14:57:58 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:1543 normal SHIPPED_LIVE Important: CloudForms System Engine 1.1 update 2012-12-04 19:39:57 EST

  None (edit)
Description Og Maciel 2012-11-07 11:34:51 EST
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 11:35:24 EST
Created attachment 640178 [details]
screenshot1
Comment 2 Og Maciel 2012-11-07 11:35:53 EST
Created attachment 640179 [details]
screenshot2
Comment 4 Justin Sherrill 2012-11-07 21:45:58 EST
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 04:37:39 EST
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 04:49:13 EST
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 05:57:23 EST
Patch send in https://github.com/Katello/katello/pull/1018
Comment 8 Garik Khachikyan 2012-11-08 07:55:48 EST
btw: i just reproduced the same with: 1.0.1 -> 1.1
Comment 13 Justin Sherrill 2012-11-08 22:27:04 EST
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 03:57:54 EST
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 04:26:54 EST
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 08:26:36 EST
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 14:57:58 EST
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 13:58:32 EDT
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.