39 to 40 upgrade fails when DB is caring about boolean type

Bug #1457033 reported by Romain Chantereau
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Romain Chantereau

Bug Description

When applying the 39 to 40 upgrade, the new volume_attachment table is populated with migrated values.

In this process, the records are tagged as not deleted by default.

As the deleted column type is “boolean”, the upgrade code specifies “0” as value. But 0 is a logically false integer value but not a boolean False value. Then sqlAlchemy just pass the integer value and if the DB cares about boolean type (like Postgresql) the insert fails.

Just by letting sqlalchemy do the conversion to the DB relative type the upgrade works in every case, and if not, it will be a sqlalchemy bug ;-)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/184478

Changed in cinder:
assignee: nobody → Romain Chantereau (romain-m)
status: New → In Progress
Changed in cinder:
status: In Progress → Fix Committed
Revision history for this message
Anton Arefiev (aarefiev) wrote :

Fix Committed means patch with fix merged

Changed in cinder:
status: Fix Committed → In Progress
Revision history for this message
Romain Chantereau (romain-m) wrote :

Thanks Anton, sorry for the bad status.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/184478
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=dc1dcbb9c847b531593d7d6b130ac2b2d04e5302
Submitter: Jenkins
Branch: master

commit dc1dcbb9c847b531593d7d6b130ac2b2d04e5302
Author: Romain Chantereau <email address hidden>
Date: Wed May 20 15:06:36 2015 +0200

    Leave sqlalchemy convert to boolean to the DB SQL type to use.

    Closes-Bug: #1457033

    Change-Id: I969a4d60aa156ccfff09a58c3a448b5a9619e71f

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: liberty-1 → 7.0.0
tags: added: kilo-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/251790

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (stable/kilo)

Change abandoned by Bertrand Lallau (<email address hidden>) on branch: stable/kilo
Review: https://review.openstack.org/251790

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.