Bug 747045

Summary: katello-reset-dbs chokes on pending migrations, cannot clear db.
Product: [Retired] Katello Reporter: Corey Welton <cwelton>
Component: PackagingAssignee: Lukas Zapletal <lzap>
Status: CLOSED NOTABUG QA Contact: Katello QA List <katello-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-21 03:55:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Corey Welton 2011-10-18 16:28:05 UTC
Description of problem:
Trying to clear/reset the db (even on an apparently dropped/recreated postgres db) deceptively appears to work -- all OK messages, and no readily discernible errors. However, upon closer examination, a message about db:migrate appears.  Attempting to do this any number of times does not seem to fix the katello-reset-dbs issue. 

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


How reproducible:


Steps to Reproduce:
1.  run katello-reset-dbs. if necessary/desired, drop and recreate the postgresql db first.
2.  Note results tucked away into the output:

 You have 1 pending migrations:
  20111006103843 CreateFilters
Run "rake db:migrate" to update your database then try again.

3. go to $katello_home and run the command above.
4. try to run katello-reset-dbs again
  
Actual results:
Same message again and again. the dbs never really get re-initialized.

Expected results:
A proper reset db script.

Additional info:

Possibly related to fix for https://bugzilla.redhat.com/show_bug.cgi?id=745542

Comment 1 Corey Welton 2011-10-21 03:55:40 UTC
Closing.