[openstack-dev] [Cinder] Raised exception in utils.execute

Yann Fouillat yann.fouillat.ext at makina-corpus.com
Thu Apr 18 09:00:50 UTC 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I had the same problem as
https://lists.launchpad.net/openstack/msg20619.html. For information,
here is the traceback of my error:

=====================================================================
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cinder/service.py", line 224,
in _start_child
    self._child_process(wrap.server)
  File "/usr/lib/python2.7/dist-packages/cinder/service.py", line 201,
in _child_process
    launcher.run_server(server)
  File "/usr/lib/python2.7/dist-packages/cinder/service.py", line 95,
in run_server
    server.start()
  File "/usr/lib/python2.7/dist-packages/cinder/service.py", line 342,
in start
    self.manager.init_host()
  File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py",
line 149, in init_host
    self.driver.ensure_export(ctxt, volume)
  File
"/usr/lib/python2.7/dist-packages/cinder/volume/drivers/lvm.py", line
388, in ensure_export
    old_name=old_name)
  File "/usr/lib/python2.7/dist-packages/cinder/volume/iscsi.py", line
225, in create_iscsi_target
    self._new_target(name, tid, **kwargs)
  File "/usr/lib/python2.7/dist-packages/cinder/volume/iscsi.py", line
284, in _new_target
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/cinder/volume/iscsi.py", line
73, in _run
    self._execute(self._cmd, *args, run_as_root=True, **kwargs)
  File "/usr/lib/python2.7/dist-packages/cinder/utils.py", line 145,
in execute
    'to utils.execute: %r') % kwargs)
Error: Got unknown keyword args to utils.execute: {'old_name': None}
=====================================================================

I am not sure how to reproduce this behaviour. For info, I followed
this guide to install OpenStack:
https://github.com/mseknibilel/OpenStack-Grizzly-Install-Guide/blob/OVS_MultiNode/OpenStack_Grizzly_Install_Guide.rst.
Maybe adding a volume in horizon and then restarting cinder-volume is
enough to reproduce it.

I figured out that the correction of this bug:
https://bugs.launchpad.net/cinder/+bug/1065702 added an entry to
kwargs which will last until utils.execute is called, in which an
exception will be raised because old_name is not an expected parameter:

=====================================================================
if len(kwargs):
        raise exception.Error(_('Got unknown keyword args '

                                'to utils.execute: %r') % kwargs)
=====================================================================

So, my question is the following: is this exception really necessary ?
kwargs is not used afterwards. Isn't logging a warning enough ? It
would prevent this kind of unexpected behaviour withouwor
t having to sanitize kwargs before each call of utils.execute.

However, if there is really a reason to raise this exception, I'll be
curious to know it.

Regards,

Yann
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRb7ZCAAoJEO1YhKM5jgEdOqgIALH3UWKK3oN1Pq9tTqPbNZ17
8F+8xID3DDDetIIIYvwaMuJ6ZMudjQXVXNYSkl9QH4s11qOawl72nxrQEgXdMkVE
1W2a+YttaVVDCwmw8yb4ikvL9tsuXu/P6xMkCASkUJ/f9UfSrxgr+6ElXCBEjIN0
gtxxGTWYKfu94SSUVP8GLoOr4Vz7+DWmVf0qDG2fo8ZEV2Lz9HkWtkeJYQo3vre6
fbJEI9WSiN55ajEB0suzH76yrWNnECNa90Xg5GTZuWOfEReA8D9ZBGfC5pjhvx8z
nUs010B7X+5fKd5GA5VxotS1cg0eyLDdp55ZAE/zZh2eFyZvRKOtTMXV95pFeqU=
=UaX0
-----END PGP SIGNATURE-----



More information about the OpenStack-dev mailing list