iesgn / openstack-debian-ansible

Ansible playbooks for installing OpenStack on Debian
GNU General Public License v3.0
17 stars 16 forks source link

manila-share: ERROR oslo_service.service IndexError: list index out of range #25

Closed albertomolina closed 8 years ago

albertomolina commented 8 years ago

After installing and configuring manila-share following the official doc, this error is shown in /var/log/manila/manila-share.log

2016-06-07 10:48:05.538 31277 INFO manila.share.manager [req-6d73d4b8-ddce-4fd0-b498-1e1749bb0ee9 - - - - -] Updating share status
2016-06-07 10:48:05.539 31277 DEBUG oslo_concurrency.processutils [req-6d73d4b8-ddce-4fd0-b498-1e1749bb0ee9 - - - - -] Running cmd (subprocess): sudo manila-rootwrap /etc/manila/rootwrap.conf vgs lvm-shares --rows --units g execute /usr/lib/python2.7/dist-packages/oslo_concurrency/processutils.py:326
2016-06-07 10:48:05.659 31277 DEBUG oslo_concurrency.processutils [req-6d73d4b8-ddce-4fd0-b498-1e1749bb0ee9 - - - - -] CMD "sudo manila-rootwrap /etc/manila/rootwrap.conf vgs lvm-shares --rows --units g" returned: 0 in 0.120s execute /usr/lib/python2.7/dist-packages/oslo_concurrency/processutils.py:356
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service [req-6d73d4b8-ddce-4fd0-b498-1e1749bb0ee9 - - - - -] Error starting thread.
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service Traceback (most recent call last):
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/oslo_service/service.py", line 680, in run_service
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service     service.start()
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/manila/service.py", line 121, in start
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service     self.manager.init_host()
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/manila/share/manager.py", line 146, in wrapped
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service     return f(self, *args, **kwargs)
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/manila/share/manager.py", line 322, in init_host
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service     self.publish_service_capabilities(ctxt)
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/manila/share/manager.py", line 146, in wrapped
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service     return f(self, *args, **kwargs)
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/manila/utils.py", line 616, in wrapper
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service     return func(self, *args, **kwargs)
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/manila/share/manager.py", line 2267, in publish_service_capabilities
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service     self._report_driver_status(context)
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/manila/utils.py", line 616, in wrapper
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service     return func(self, *args, **kwargs)
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/manila/share/manager.py", line 2231, in _report_driver_status
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service     share_stats = self.driver.get_share_stats(refresh=True)
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/manila/share/driver.py", line 546, in get_share_stats
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service     self._update_share_stats()
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/manila/share/drivers/lvm.py", line 190, in _update_share_stats
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service     'pools': self.get_share_server_pools()
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service   File "/usr/lib/python2.7/dist-packages/manila/share/drivers/lvm.py", line 199, in get_share_server_pools
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service     total_size = re.findall("VSize\s[0-9.]+g", out)[0][6:-1]
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service IndexError: list index out of range
2016-06-07 10:48:05.662 31277 ERROR oslo_service.service

The issue is related to manila-rootwrap because executing the command as root works, but not as manila user:

root@europa:~# sudo manila-rootwrap /etc/manila/rootwrap.conf vgs --noheadings -o name
cinder-volumes
lvm-shares

whereas

root@europa:~# su - manila -c "sudo /usr/bin/manila-rootwrap --debug /etc/manila/rootwrap.conf vgs --noheadings -o name"

returns nothing

albertomolina commented 8 years ago

The issue is solved using standard en_us localization. The bug is related to the output of the command vgs:

vgs --rows --units g

A bug is going to be reported to upstream manila project

albertomolina commented 8 years ago

https://bugs.launchpad.net/manila/+bug/1589928