Bug 886142 - katello-upgrade fails from 1.0 to 1.1
Summary: katello-upgrade fails from 1.0 to 1.1
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Subscription Asset Manager
Classification: Retired
Component: katello
Version: 1.2
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Lukas Zapletal
QA Contact: SAM QE List
URL:
Whiteboard:
Depends On: 885261
Blocks: sam12-tracker
TreeView+ depends on / blocked
 
Reported: 2012-12-11 15:45 UTC by Jordan OMara
Modified: 2014-11-09 22:56 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 885261
Environment:
Last Closed: 2012-12-18 14:45:48 UTC
Embargoed:


Attachments (Terms of Use)

Comment 1 Tom McKay 2012-12-12 13:42:48 UTC
Very easy to reproduce:
1. create an org
2. delete that org
3. in psql: select * from providers;
   note orphaned "Red Hat" provider

Comment 2 sthirugn@redhat.com 2012-12-12 20:06:18 UTC
As per Tom McKay's request, I tested this bug today.  It worked fine.

Steps:
1. Provision RHEL 6.3 Server 
2. Install SAM 1.1
3. Add an Environment to ACME Organization
4. Subscribe an other machine to this SAM
5. Create an other Organization - Test Organization
5. Delete the ACME Organization
6. Follow the Upgrade process (1.1 to 1.2) in https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Subscription_Asset_Manager/1.2/html/Installation_Guide/sect-Installation_Guide-Administration-Upgrading_Subscription_Asset_Manager.html

Actual Results:
SAM Upgrade from 1.1 to 1.2 was successful.  No errors seen.


Logs:
[root@mgmt13 yum.repos.d]# katello-upgrade
================================================================================
 Katello upgrade
================================================================================

1/2: Update Candlepin (0003_update_candlepin.sh)
 Updates Candlepin database schema to the latest version

Do you want to proceed? (y/n): y

Update Candlepin OK.

================================================================================

2/2: Migrate Katello database (0004_migrate_katello_db.sh)
 Updates Katello database schema to the latest version

Do you want to proceed? (y/n): y

Migrate Katello database OK.

================================================================================
Upgrade successful
Finished 2 of 2 upgrade steps
Now that Katello has been upgraded, please run `katello-service start
to re-enable all of your services
In the future, you can run this script with the -a / --auto-stop option to
automatically stop & start your services

Comment 3 Tom McKay 2012-12-12 20:17:18 UTC
To clarify, my specific test scenario involving an older version of the tool creating an org with content, deleting it, and then upgrading to a newer version worked. There is still a potential for trouble in that the "Red Hat" provider is not deleted when the org is.

Leaving this BZ open to evaluate fix for CFSE BZ 885261

Comment 4 Tom McKay 2012-12-18 14:45:48 UTC
Closed in favor of tracking in the CFSE BZ 885261


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