[Pulp-list] Developers: Action Required: The migration that pulp_rpm now has, and what it means for devs

Randy Barlow rbarlow at redhat.com
Thu Nov 8 14:26:28 UTC 2012


Good morning! The pulp_rpm project now has one migration, whereas it had  
no migration module at all before. If you are a developer and you wish to  
apply this migration, you will need to take the following steps:

1) $ pulp-manage-db

2) $ mongo pulp_database

3) > db.migration_trackers.update({'name': 'pulp_rpm.migrations'},  
{'$set': {'version': 0}})

4) $ pulp-manage-db

That should set you straight, and you should never have to do that again  
for the pulp_rpm project.

We need to do this because the DB management script doesn't apply  
migrations to new installs, but instead does a "fast-forward" to the  
latest available version. From that point onward, any new migrations would  
be applied by the script. Because the pulp_rpm project didn't have  
migrations before and now does, it appears to be a "new install" to the  
management script, so it will auto fast-forward your DB.

To mitigate this problem, I suggest we go ahead at set up a migration  
entry point for the pulp_puppet project with no migrations in it. If we do  
this and everyone runs pulp-manage-db while it's in that state, the  
version 0 will be stored in everyone's DB and we won't have to do this  
same process for that project. Sound good?

-- 
Randy Barlow




More information about the Pulp-list mailing list