Error message in update_migrated_volume was incorrect

Bug #1492462 reported by Jacob Gregor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Jacob Gregor

Bug Description

If an error was encountered in self.vg.rename_volume the error message tried to use volume['name'], which is an invalid key. The invalid key error would then cause the retype/migration to abort in the middle of the process and leave original and temporary volume in place.

2015-09-04 15:11:23.252 ^[[01;31mERROR oslo_messaging.rpc.dispatcher [^[[01;36mreq-76981362-36c5-41d6-91f6-33fd9a1a60c3 ^[[00;36ma11c9f9e797b46068c33d5f904925aa0 79dc6c3464764d55acc7373cbc8c9879^[[01;31m] ^[[01;35m^[[01;31mException during message handling: 'name'^[[00m^M
^[[01;31m2015-09-04 15:11:23.252 TRACE oslo_messaging.rpc.dispatcher ^[[01;35m^[[00mTraceback (most recent call last):^M
^[[01;31m2015-09-04 15:11:23.252 TRACE oslo_messaging.rpc.dispatcher ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply^M
^[[01;31m2015-09-04 15:11:23.252 TRACE oslo_messaging.rpc.dispatcher ^[[01;35m^[[00m executor_callback))^M
^[[01;31m2015-09-04 15:11:23.252 TRACE oslo_messaging.rpc.dispatcher ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch^M
^[[01;31m2015-09-04 15:11:23.252 TRACE oslo_messaging.rpc.dispatcher ^[[01;35m^[[00m executor_callback)^M
^[[01;31m2015-09-04 15:11:23.252 TRACE oslo_messaging.rpc.dispatcher ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py", line 129, in _do_dispatch^M
^[[01;31m2015-09-04 15:11:23.252 TRACE oslo_messaging.rpc.dispatcher ^[[01;35m^[[00m result = func(ctxt, **new_args)^M
^[[01;31m2015-09-04 15:11:23.252 TRACE oslo_messaging.rpc.dispatcher ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper^M
^[[01;31m2015-09-04 15:11:23.252 TRACE oslo_messaging.rpc.dispatcher ^[[01;35m^[[00m return f(*args, **kwargs)^M
^[[01;31m2015-09-04 15:11:23.252 TRACE oslo_messaging.rpc.dispatcher ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper^M
^[[01;31m2015-09-04 15:11:23.252 TRACE oslo_messaging.rpc.dispatcher ^[[01;35m^[[00m return f(*args, **kwargs)^M
^[[01;31m2015-09-04 15:11:23.252 TRACE oslo_messaging.rpc.dispatcher ^[[01;35m^[[00m File "/opt/stack/cinder/cinder/volume/manager.py", line 2946, in update_migrated_volume^M
^[[01;31m2015-09-04 15:11:23.252 TRACE oslo_messaging.rpc.dispatcher ^[[01;35m^[[00m volume_status)^M
^[[01;31m2015-09-04 15:11:23.252 TRACE oslo_messaging.rpc.dispatcher ^[[01;35m^[[00m File "/usr/local/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper^M
^[[01;31m2015-09-04 15:11:23.252 TRACE oslo_messaging.rpc.dispatcher ^[[01;35m^[[00m return f(*args, **kwargs)^M
^[[01;31m2015-09-04 15:11:23.252 TRACE oslo_messaging.rpc.dispatcher ^[[01;35m^[[00m File "/opt/stack/cinder/cinder/volume/drivers/lvm.py", line 358, in update_migrated_volume^M
^[[01;31m2015-09-04 15:11:23.252 TRACE oslo_messaging.rpc.dispatcher ^[[01;35m^[[00m 'for volume: %s'), volume['name'])^M
^[[01;31m2015-09-04 15:11:23.252 TRACE oslo_messaging.rpc.dispatcher ^[[01;35m^[[00mKeyError: 'name'^M
^[[01;31m2015-09-04 15:11:23.252 TRACE oslo_messaging.rpc.dispatcher ^[[01;35m^[[00m^M

The solution is to use volume['id'] instead.

Tags: retype
Jacob Gregor (jgregor)
Changed in cinder:
assignee: nobody → Jacob Gregor (jgregor)
description: updated
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/220683

Changed in cinder:
status: New → In Progress
Jay Bryant (jsbryant)
Changed in cinder:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

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

commit c09a92f6aae7c9c57d555e517f131608b7ec4c5e
Author: Jacob Gregor <email address hidden>
Date: Fri Sep 4 16:30:12 2015 -0500

    Error message in update_migrated_volume was incorrect

    If an error was encountered in self.vg.rename_volume the error
    message tried to use volume['name'], which is an invalid key.
    The invalid key error would then cause the retype/migration to
    abort in the middle of the process and leave original and temporary
    volume in place. This patch fixes this bug by providing a valid key.

    Change-Id: I73e1335c649df41d5167efc3cb4b9af48a5d537d
    Closes-bug: #1492462

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → liberty-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: liberty-rc1 → 7.0.0
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.