Retype with migration always fails

Bug #1647429 reported by Erlon R. Cruz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Erlon R. Cruz

Bug Description

After merging of change I8906e2e7438617fb29c7632d993cede44e952036, retype with migration is failing due a type conversion error[1].

 cinder.volume.manager [req-0f09cc88-0e92-431e-b86c-27e56dd1d520 tempest-VolumeRetypeWithMigrationV2Test-232855751] Failed to copy volume 4efd55ae-6439-4fdd-9496-5acf732f9939 to 8006583d-747d-4260-8772-8a0ce8c99500
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager Traceback (most recent call last):
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/opt/stack/new/cinder/cinder/volume/manager.py", line 1755, in _migrate_volume_generic
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager error=False)
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/opt/stack/new/cinder/cinder/volume/manager.py", line 1871, in migrate_volume_completion
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager updated_new = volume.finish_volume_migration(new_volume)
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/opt/stack/new/cinder/cinder/objects/volume.py", line 503, in finish_volume_migration
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager self.save()
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/opt/stack/new/cinder/cinder/objects/volume.py", line 379, in save
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager db.volume_update(self._context, self.id, updates)
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/opt/stack/new/cinder/cinder/db/api.py", line 305, in volume_update
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager return IMPL.volume_update(context, volume_id, values)
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/opt/stack/new/cinder/cinder/db/sqlalchemy/api.py", line 251, in wrapper
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager return f(*args, **kwargs)
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/opt/stack/new/cinder/cinder/db/sqlalchemy/api.py", line 196, in wrapper
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager return f(*args, **kwargs)
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/opt/stack/new/cinder/cinder/db/sqlalchemy/api.py", line 2188, in volume_update
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager result = query.filter_by(id=volume_id).update(values)
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 3237, in update
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager update_op.exec_()
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1131, in exec_
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager self._do_exec()
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 1286, in _do_exec
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager mapper=self.mapper)
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1097, in execute
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager bind, close_with_result=True).execute(clause, params or {})
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 914, in execute
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager return meth(self, multiparams, params)
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager return connection._execute_clauseelement(self, multiparams, params)
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1010, in _execute_clauseelement
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager compiled_sql, distilled_params
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1078, in _execute_context
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager None, None)
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1337, in _handle_dbapi_exception
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager util.raise_from_cause(newraise, exc_info)
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 202, in raise_from_cause
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager reraise(type(exception), exception, tb=exc_tb, cause=cause)
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1073, in _execute_context
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager context = constructor(dialect, self, conn, *args)
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 610, in _init_compiled
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager for key in compiled_params
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 610, in <genexpr>
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager for key in compiled_params
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/processors.py", line 56, in boolean_to_int
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager return int(value)
2016-12-02 16:20:25.106 1183 ERROR cinder.volume.manager DBError: (exceptions.TypeError) int() argument must be a string or a number, not 'VolumeType' [SQL: u'UPDATE volumes SET volume_type_id = id AND deleted = false=%(param_1)s, created_at=%(created_at)s, updated_at=%(updated_at)s, deleted_at=%(deleted_at)s, deleted=%(deleted)s, ec2_id=%(ec2_id)s, user_id=%(user_id)s, project_id=%(project_id)s, snapshot_id=%(snapshot_id)s, cluster_name=%(cluster_name)s, host=%(host)s, size=%(size)s, availability_zone=%(availability_zone)s, status=%(status)s, attach_status=%(attach_status)s, migration_status=%(migration_status)s, scheduled_at=%(scheduled_at)s, launched_at=%(launched_at)s, terminated_at=%(terminated_at)s, display_name=%(display_name)s, display_description=%(display_description)s, provider_auth=%(provider_auth)s, provider_geometry=%(provider_geometry)s, provider_id=%(provider_id)s, volume_type_id=%(volume_type_id)s, source_volid=%(source_volid)s, encryption_key_id=%(encryption_key_id)s, consistencygroup_id=%(consistencygroup_id)s, group_id=%(group_id)s, bootable=%(bootable)s, multiattach=%(multiattach)s, replication_status=%(replication_status)s, replication_extended_status=%(replication_extended_status)s, replication_driver_data=%(replication_driver_data)s, previous_status=%(previous_status)s WHERE volumes.deleted = false AND volumes.id = %(id_1)s'] [parameters: [{}]]

[1] http://logs.openstack.org/43/195443/76/experimental/gate-tempest-dsvm-lvm-multibackend/f4def62/logs/screen-c-vol.txt.gz?level=ERROR

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/407089

Changed in cinder:
assignee: nobody → Erlon R. Cruz (sombrafam)
status: New → In Progress
Changed in cinder:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

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

commit 7b2563703e3360807a7a22d0d9e14080f409640a
Author: Erlon R. Cruz <email address hidden>
Date: Mon Dec 5 15:05:29 2016 -0200

    Revert "Swap volume type for migration started by retype"

    This reverts commit ef98a0b1bc1ab13656e9dffec33753dfc0838752.

    The refered commit is breaking retype with migration[1]. We need to
    revert this and get migration working again and then rework the bug
    targeted at the refered change in a way that does not add this side
    effect.

    [1] http://bit.ly/2gI5Xlf

    Change-Id: I5fa16ad3786dd488136b821d3c2e95e41cbc4df5
    Closes-bug: #1647429

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 10.0.0.0b3

This issue was fixed in the openstack/cinder 10.0.0.0b3 development milestone.

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

Other bug subscribers

Remote bug watches

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