Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 909366

Summary: Users who upgrade from 2.0.7 or 2.0.8 to future versions will skip all migrations
Product: [Retired] Pulp Reporter: Randy Barlow <rbarlow>
Component: rpm-supportAssignee: Randy Barlow <rbarlow>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: high Docs Contact:
Priority: unspecified    
Version: MasterCC: skarmark
Target Milestone: ---Keywords: Triaged
Target Release: 2.1.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-08 16:02:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Randy Barlow 2013-02-08 16:00:53 UTC
We discovered recently that our RPM .spec file for the RPM plugins did not include the egg-info. This prevents the entry point system from functioning, which prevents the migration system from finding the RPM migrations.

We've discussed some possible solutions to the problem:

1) Find a way to inject version 0 into installs that already existed. This might be pretty tricky.
2) Evaluate whether we really need the rule about skipping migrations on new installs. This one should be thought about carefully while thinking very hard, but it is possible that we don't need to skip ahead like we do currently. If we can remove that rule, the problem is easily solvable.

Comment 1 Randy Barlow 2013-02-22 20:28:37 UTC
It seems to be agreed upon by the (mostly silent) team that we should go with option 2 above. I will alter the migration system so that it does not skip migrations on new installs. I will also alter the developer documentation to describe this behaviour, and to mention that migration writers should write their migrations so that they are safe to run on new installations.

Comment 2 Randy Barlow 2013-02-25 19:41:41 UTC
https://github.com/pulp/pulp/pull/336

Comment 3 Jeff Ortel 2013-02-26 17:34:05 UTC
build: 2.1.0-0.17.alpha

Comment 4 Preethi Thomas 2013-03-18 18:02:38 UTC
verified
[root@cloud-qe-8 ~]# rpm -q pulp-server
pulp-server-2.1.0-0.23.beta.noarch
[root@cloud-qe-8 ~]# 


<rbarlow> the change i made was to make it so that new installs still run each migration, even when there is no data in the database
<rbarlow> so one way to verify is to just do that
<rbarlow> make a brand new pulp with no db
<rbarlow> and run pulp-manage-db
<rbarlow> you should see it say that it's running all the migration versions one by one, instead of just saying that it's at the latest migration

[root@cloud-qe-8 ~]# vi /etc/pulp/admin/admin.conf 
[root@cloud-qe-8 ~]# service mongod start
Starting mongod: [  OK  ]
[root@cloud-qe-8 ~]# pulp-manage-db 
Beginning database migrations.
Applying pulp.server.db.migrations version 1
Migration to pulp.server.db.migrations version 1 complete.
Applying pulp.server.db.migrations version 2
Migration to pulp.server.db.migrations version 2 complete.
Applying pulp.server.db.migrations version 3
Migration to pulp.server.db.migrations version 3 complete.
Applying pulp.server.db.migrations version 4
Migration to pulp.server.db.migrations version 4 complete.
Migration package pulp_puppet.plugins.migrations is up to date at version 0
Applying pulp_rpm.migrations version 1
Migration to pulp_rpm.migrations version 1 complete.
Applying pulp_rpm.migrations version 2
Migration to pulp_rpm.migrations version 2 complete.
Applying pulp_rpm.migrations version 3
Migration to pulp_rpm.migrations version 3 complete.
Applying pulp_rpm.migrations version 4
Migration to pulp_rpm.migrations version 4 complete.
Applying pulp_rpm.migrations version 5
Migration to pulp_rpm.migrations version 5 complete.
Database migrations complete.
Loading content types.
Content types loaded.

Comment 5 Preethi Thomas 2013-04-08 16:02:11 UTC
Pulp 2.1 released 


http://www.pulpproject.org/2013/04/05/pulp-2-1-0-released/