Bug 709703 - db migration failed
Summary: db migration failed
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: Sprint 24
Assignee: Pradeep Kilambi
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: 563609
TreeView+ depends on / blocked
 
Reported: 2011-06-01 12:42 UTC by Daniel Mach
Modified: 2011-07-18 06:17 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-18 06:17:39 UTC


Attachments (Terms of Use)

Description Daniel Mach 2011-06-01 12:42:18 UTC
This seems to be a quite common problem, I usually remove the db and create a new one on my devel server. But this can cause troubles in production.

Can you make sure that pulp is always able to finish db migration?


pulp 0.0.172 updated to 0.0.182

$ /etc/init.d/pulp-server init 
9 errors on validation, see /var/log/pulp/db.log for details

$ cat /var/log/pulp/db.log
migration to data model version 12 started
migration to data model version 12 complete
migration to data model version 13 started
migration to data model version 13 complete
migration to data model version 14 started
migration to data model version 14 complete
model validation failure in Errata for model RHBA-2011:0454: field pushcount is <type 'int'> not <type 'unicode'>
model validation failure in Package for model 370aeb16-346f-45c6-849b-dbfc0ca248f6: field epoch is <type 'int'> not <type 'unicode'>

Comment 1 Pradeep Kilambi 2011-06-08 20:46:58 UTC
commit a5f374db6dc28ab07edf9574f515fba5629a64b5

Comment 2 Jeff Ortel 2011-06-08 23:58:28 UTC
build: 0.188

Comment 3 Daniel Mach 2011-06-20 08:26:52 UTC
0.182 updated to 0.192

$ /etc/init.d/pulp-server init
5 errors on validation, see /var/log/pulp/db.log for details

migration to data model version 12 started
migration to data model version 12 complete
migration to data model version 13 started
migration to data model version 13 complete
migration to data model version 14 started
migration to data model version 14 complete
model validation failure in Errata for model RHBA-2011:0454: field pushcount is <type 'int'> not <type 'unicode'>
model validation failure in Errata for model RHBA-2011:0287: field pushcount is <type 'int'> not <type 'unicode'>
model validation failure in Errata for model RHBA-2011:0385: field pushcount is <type 'int'> not <type 'unicode'>
model validation failure in Errata for model RHBA-2011:0430: field pushcount is <type 'int'> not <type 'unicode'>
model validation failure in Package for model 370aeb16-346f-45c6-849b-dbfc0ca248f6: field epoch is <type 'int'> not <type 'unicode'>
model validation failure in Package for model 43c805eb-3375-44bc-99ea-11c042de4192: field epoch is <type 'int'> not <type 'unicode'>
model validation failure in Package for model 37ee6dcc-b53c-4cfc-bc1d-56ed39d407b6: field epoch is <type 'int'> not <type 'unicode'>
model validation failure in Package for model fa4e3bfc-ce7c-4644-9b68-35d7b1a7c742: field epoch is <type 'int'> not <type 'unicode'>
model validation failure in Package for model 29cbcd8b-0da5-4296-9a7c-b8e76d3a9a66: field epoch is <type 'int'> not <type 'unicode'>
migration to data model version 15 started
migration to data model version 15 complete
migration to data model version 16 started
migration to data model version 16 complete
migration to data model version 17 started
migration to data model version 17 complete
migration to data model version 18 started
migration to data model version 18 complete
model validation failure in Package for model 370aeb16-346f-45c6-849b-dbfc0ca248f6: field epoch is <type 'int'> not <type 'unicode'>
model validation failure in Package for model 43c805eb-3375-44bc-99ea-11c042de4192: field epoch is <type 'int'> not <type 'unicode'>
model validation failure in Package for model 37ee6dcc-b53c-4cfc-bc1d-56ed39d407b6: field epoch is <type 'int'> not <type 'unicode'>
model validation failure in Package for model fa4e3bfc-ce7c-4644-9b68-35d7b1a7c742: field epoch is <type 'int'> not <type 'unicode'>
model validation failure in Package for model 29cbcd8b-0da5-4296-9a7c-b8e76d3a9a66: field epoch is <type 'int'> not <type 'unicode'>


$ /etc/init.d/pulp-server init
data model in use matches the current version
5 errors on validation, see /var/log/pulp/db.log for details


Can you fix the migration script to actually convert data when a DB field type changes?
(Maybe I'm wrong, but I suppose these errors appeared after changing DB field types).

Comment 4 Pradeep Kilambi 2011-06-20 14:40:01 UTC
Hey Daniel, As per our chat on irc, can send me some sample data you're using to reproduce this issue. Also since you're multiple versions down in migration, I would suggest running pulp-migrate --force and see if it reloads all versions. 

~ Prad


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