cinder db online_db_migration crashes

Bug #1723922 reported by Jean-Philippe Evrard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Jean-Philippe Evrard

Bug Description

When doing cinder db online_db_migration I get the following:

2017-10-16 10:35:01.092 5166 CRITICAL cinder [req-f268ff7f-27d3-40fe-9643-f82a0c9b70d8 - - - - -] Unhandled error: TypeError: Message objects do not support addition.
2017-10-16 10:35:01.092 5166 ERROR cinder Traceback (most recent call last):
2017-10-16 10:35:01.092 5166 ERROR cinder File "/openstack/venvs/cinder-master/bin/cinder-manage", line 11, in <module>
2017-10-16 10:35:01.092 5166 ERROR cinder sys.exit(main())
2017-10-16 10:35:01.092 5166 ERROR cinder File "/openstack/venvs/cinder-master/lib/python2.7/site-packages/cinder/cmd/manage.py", line 816, in main
2017-10-16 10:35:01.092 5166 ERROR cinder fn(**fn_kwargs)
2017-10-16 10:35:01.092 5166 ERROR cinder File "/openstack/venvs/cinder-master/lib/python2.7/site-packages/cinder/cmd/manage.py", line 325, in online_data_migrations
2017-10-16 10:35:01.092 5166 ERROR cinder print(t)
2017-10-16 10:35:01.092 5166 ERROR cinder File "/openstack/venvs/cinder-master/lib/python2.7/site-packages/prettytable.py", line 240, in __str__
2017-10-16 10:35:01.092 5166 ERROR cinder return self.__unicode__().encode(self.encoding)
2017-10-16 10:35:01.092 5166 ERROR cinder File "/openstack/venvs/cinder-master/lib/python2.7/site-packages/prettytable.py", line 243, in __unicode__
2017-10-16 10:35:01.092 5166 ERROR cinder return self.get_string()
2017-10-16 10:35:01.092 5166 ERROR cinder File "/openstack/venvs/cinder-master/lib/python2.7/site-packages/prettytable.py", line 995, in get_string
2017-10-16 10:35:01.092 5166 ERROR cinder lines.append(self._stringify_header(options))
2017-10-16 10:35:01.092 5166 ERROR cinder File "/openstack/venvs/cinder-master/lib/python2.7/site-packages/prettytable.py", line 1066, in _stringify_header
2017-10-16 10:35:01.092 5166 ERROR cinder bits.append(" " * lpad + self._justify(fieldname, width, self._align[field]) + " " * rpad)
2017-10-16 10:35:01.092 5166 ERROR cinder File "/openstack/venvs/cinder-master/lib/python2.7/site-packages/prettytable.py", line 203, in _justify
2017-10-16 10:35:01.092 5166 ERROR cinder return (excess//2)*" " + text + (excess//2)*" "
2017-10-16 10:35:01.092 5166 ERROR cinder File "/openstack/venvs/cinder-master/lib/python2.7/site-packages/oslo_i18n/_message.py", line 233, in __radd__
2017-10-16 10:35:01.092 5166 ERROR cinder return self.__add__(other)
2017-10-16 10:35:01.092 5166 ERROR cinder File "/openstack/venvs/cinder-master/lib/python2.7/site-packages/oslo_i18n/_message.py", line 230, in __add__
2017-10-16 10:35:01.092 5166 ERROR cinder raise TypeError(msg)
2017-10-16 10:35:01.092 5166 ERROR cinder TypeError: Message objects do not support addition.
2017-10-16 10:35:01.092 5166 ERROR cinder

It looks like it's an issue with pretty table and our translated headers under python2.7.
I am running this version of cinder (master):
914f5bde72c82bf1e50a09c8cc776e86903c3e86

The version of prettytable is the following:
prettytable==0.7.2
You can see my full list of requirements in my venv in attachment.

Revision history for this message
Jean-Philippe Evrard (jean-philippe-evrard) wrote :
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/512259

Changed in cinder:
assignee: nobody → Jean-Philippe Evrard (jean-philippe-evrard)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/512259
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=04543abedd429101dc6b410090e463358d22ca48
Submitter: Zuul
Branch: master

commit 04543abedd429101dc6b410090e463358d22ca48
Author: Jean-Philippe Evrard <email address hidden>
Date: Mon Oct 16 10:36:33 2017 +0000

    Make stringify header work under python2.

    This fixes the following issue appearing during
    cinder-manage db online_data_migrations.

    Change-Id: Ic47f04e06b886656c9a0f0f7a0494a10fef93e80
    Closes-Bug: #1723922

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

This issue was fixed in the openstack/cinder 12.0.0.0b1 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.