A problem I found when I delete a volume:
2014-09-12 12:39:28.922 25582 ERROR oslo.messaging.rpc.dispatcher [req-df3daaef-5725-48a3-9963-846dbaff1d73 10c46b22ba294231abdfaeb9b1b66791 c8f88a72e4e141f29339a9d30fe93d04 - - -] Exception during message handling: 'ascii' codec can't decode byte 0xe2 in position 19: ordinal not in range(128)
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher incoming.message))
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args)
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher result = getattr(endpoint, method)(ctxt, **new_args)
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher return f(*args, **kwargs)
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/cinder/volume/manager.py", line 127, in lvo_inner1
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher return lvo_inner2(inst, context, volume_id, **kwargs)
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/cinder/openstack/common/lockutils.py", line 233, in inner
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher retval = f(*args, **kwargs)
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/cinder/volume/manager.py", line 126, in lvo_inner2
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher return f(*_args, **_kwargs)
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/cinder/volume/manager.py", line 454, in delete_volume
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher {'status': 'error_deleting'})
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/cinder/openstack/common/excutils.py", line 82, in __exit__
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/cinder/volume/manager.py", line 443, in delete_volume
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher self.driver.delete_volume(volume_ref)
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher return f(*args, **kwargs)
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/cinder/volume/drivers/lvm.py", line 234, in delete_volume
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher self._delete_volume(volume)
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/cinder/volume/drivers/lvm.py", line 129, in _delete_volume
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher self._clear_volume(volume, is_snapshot)
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/cinder/volume/drivers/lvm.py", line 172, in _clear_volume
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher volume_clear_size=self.configuration.volume_clear_size)
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/cinder/volume/utils.py", line 361, in clear_volume
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher ionice=volume_clear_ionice)
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/cinder/volume/utils.py", line 296, in copy_volume
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher flag, run_as_root=True)
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/cinder/utils.py", line 134, in execute
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher return processutils.execute(*cmd, **kwargs)
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/cinder/openstack/common/processutils.py", line 196, in execute
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher sanitized_stderr = strutils.mask_password(stderr)
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher File "/usr/local/lib/python2.7/dist-packages/cinder/openstack/common/strutils.py", line 295, in mask_password
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher message = six.text_type(message)
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 19: ordinal not in range(128)
2014-09-12 12:39:28.922 25582 TRACE oslo.messaging.rpc.dispatcher
2014-09-12 12:39:28.925 25582 ERROR oslo.messaging._drivers.common [req-df3daaef-5725-48a3-9963-846dbaff1d73 10c46b22ba294231abdfaeb9b1b66791 c8f88a72e4e141f29339a9d30fe93d04 - - -] Returning exception 'ascii' codec can't decode byte 0xe2 in position 19: ordinal not in range(128) to caller
2014-09-12 12:39:28.926 25582 ERROR oslo.messaging._drivers.common [req-df3daaef-5725-48a3-9963-846dbaff1d73 10c46b22ba294231abdfaeb9b1b66791 c8f88a72e4e141f29339a9d30fe93d04 - - -] ['Traceback (most recent call last):\n', ' File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply\n incoming.message))\n', ' File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch\n return self._do_dispatch(endpoint, method, ctxt, args)\n', ' File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch\n result = getattr(endpoint, method)(ctxt, **new_args)\n', ' File "/usr/local/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper\n return f(*args, **kwargs)\n', ' File "/usr/local/lib/python2.7/dist-packages/cinder/volume/manager.py", line 127, in lvo_inner1\n return lvo_inner2(inst, context, volume_id, **kwargs)\n', ' File "/usr/local/lib/python2.7/dist-packages/cinder/openstack/common/lockutils.py", line 233, in inner\n retval = f(*args, **kwargs)\n', ' File "/usr/local/lib/python2.7/dist-packages/cinder/volume/manager.py", line 126, in lvo_inner2\n return f(*_args, **_kwargs)\n', ' File "/usr/local/lib/python2.7/dist-packages/cinder/volume/manager.py", line 454, in delete_volume\n {\'status\': \'error_deleting\'})\n', ' File "/usr/local/lib/python2.7/dist-packages/cinder/openstack/common/excutils.py", line 82, in __exit__\n six.reraise(self.type_, self.value, self.tb)\n', ' File "/usr/local/lib/python2.7/dist-packages/cinder/volume/manager.py", line 443, in delete_volume\n self.driver.delete_volume(volume_ref)\n', ' File "/usr/local/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper\n return f(*args, **kwargs)\n', ' File "/usr/local/lib/python2.7/dist-packages/cinder/volume/drivers/lvm.py", line 234, in delete_volume\n self._delete_volume(volume)\n', ' File "/usr/local/lib/python2.7/dist-packages/cinder/volume/drivers/lvm.py", line 129, in _delete_volume\n self._clear_volume(volume, is_snapshot)\n', ' File "/usr/local/lib/python2.7/dist-packages/cinder/volume/drivers/lvm.py", line 172, in _clear_volume\n volume_clear_size=self.configuration.volume_clear_size)\n', ' File "/usr/local/lib/python2.7/dist-packages/cinder/volume/utils.py", line 361, in clear_volume\n ionice=volume_clear_ionice)\n', ' File "/usr/local/lib/python2.7/dist-packages/cinder/volume/utils.py", line 296, in copy_volume\n flag, run_as_root=True)\n', ' File "/usr/local/lib/python2.7/dist-packages/cinder/utils.py", line 134, in execute\n return processutils.execute(*cmd, **kwargs)\n', ' File "/usr/local/lib/python2.7/dist-packages/cinder/openstack/common/processutils.py", line 196, in execute\n sanitized_stderr = strutils.mask_password(stderr)\n', ' File "/usr/local/lib/python2.7/dist-packages/cinder/openstack/common/strutils.py", line 295, in mask_password\n message = six.text_type(message)\n', "UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 19: ordinal not in range(128)\n"]
In order to solve this problem, I simply add the following line in line 295 in mask_password method in cinder/openstack/common/strutils.py:
message = message.decode('utf-8')
This is true, nice catch. Running tests on the patch now, should be posted shortly.