HNAS driver fails when filesystem is unconfined

Bug #1571000 reported by Rodrigo Barbieri
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Rodrigo Barbieri

Bug Description

When creating a filesystem from the CLI, it is possible to create an unconfined filesystem, resulting in a different output that breaks the parser when starting the driver. See exception below.

2016-04-15 11:30:45.985 DEBUG manila.share.drivers.hitachi.ssh [req-b92a2f32-162f-4915-bcc0-9ac8801a70e8 None None] Command ssc 127.0.0.1 console-context --evs 12 files
ystem-list cg-1ace3f4e-1774-4394-a849-f17b12f287be result: out = Instance name Dev On span State EVS Cap/GiB Confined Flag
----------------- ---- ----------------- ----- --- ------- -------- ----
Filesystem cg-1ace3f4e-1774-4394-a849-f17b12f287be:
cg-1ace..12f287be 1070 husvm02 Mount 12 4 -
 - err = . from (pid=5495) _execute /opt/stack/manila/manila/share/drivers/hitachi/ssh.py:387
2016-04-15 11:30:45.986 ERROR oslo_service.service [req-b92a2f32-162f-4915-bcc0-9ac8801a70e8 None None] Error starting thread.
2016-04-15 11:30:45.986 TRACE oslo_service.service Traceback (most recent call last):
2016-04-15 11:30:45.986 TRACE oslo_service.service File "/usr/local/lib/python2.7/dist-packages/oslo_service/service.py", line 680, in run_service
2016-04-15 11:30:45.986 TRACE oslo_service.service service.start()
2016-04-15 11:30:45.986 TRACE oslo_service.service File "/opt/stack/manila/manila/service.py", line 121, in start
2016-04-15 11:30:45.986 TRACE oslo_service.service self.manager.init_host()
2016-04-15 11:30:45.986 TRACE oslo_service.service File "/opt/stack/manila/manila/share/manager.py", line 146, in wrapped
2016-04-15 11:30:45.986 TRACE oslo_service.service return f(self, *args, **kwargs)
2016-04-15 11:30:45.986 TRACE oslo_service.service File "/opt/stack/manila/manila/share/manager.py", line 326, in init_host
2016-04-15 11:30:45.986 TRACE oslo_service.service self.publish_service_capabilities(ctxt)
2016-04-15 11:30:45.986 TRACE oslo_service.service File "/opt/stack/manila/manila/share/manager.py", line 146, in wrapped
2016-04-15 11:30:45.986 TRACE oslo_service.service return f(self, *args, **kwargs)
2016-04-15 11:30:45.986 TRACE oslo_service.service File "/opt/stack/manila/manila/utils.py", line 616, in wrapper
2016-04-15 11:30:45.986 TRACE oslo_service.service return func(self, *args, **kwargs)
2016-04-15 11:30:45.986 TRACE oslo_service.service File "/opt/stack/manila/manila/share/manager.py", line 2298, in publish_service_capabilities
2016-04-15 11:30:45.986 TRACE oslo_service.service self._report_driver_status(context)
2016-04-15 11:30:45.986 TRACE oslo_service.service File "/opt/stack/manila/manila/utils.py", line 616, in wrapper
2016-04-15 11:30:45.986 TRACE oslo_service.service return func(self, *args, **kwargs)
2016-04-15 11:30:45.986 TRACE oslo_service.service File "/opt/stack/manila/manila/share/manager.py", line 2262, in _report_driver_status
2016-04-15 11:30:45.986 TRACE oslo_service.service share_stats = self.driver.get_share_stats(refresh=True)
2016-04-15 11:30:45.986 TRACE oslo_service.service File "/opt/stack/manila/manila/share/driver.py", line 546, in get_share_stats
2016-04-15 11:30:45.986 TRACE oslo_service.service self._update_share_stats()
2016-04-15 11:30:45.986 TRACE oslo_service.service File "/opt/stack/manila/manila/share/drivers/hitachi/hds_hnas.py", line 338, in _update_share_stats
2016-04-15 11:30:45.986 TRACE oslo_service.service self._check_fs_mounted()
2016-04-15 11:30:45.986 TRACE oslo_service.service File "/opt/stack/manila/manila/share/drivers/hitachi/hds_hnas.py", line 482, in _check_fs_mounted
2016-04-15 11:30:45.986 TRACE oslo_service.service if not self.hnas.check_fs_mounted():
2016-04-15 11:30:45.986 TRACE oslo_service.service File "/opt/stack/manila/manila/share/drivers/hitachi/ssh.py", line 198, in check_fs_mounted
2016-04-15 11:30:45.986 TRACE oslo_service.service fs_list = self._get_filesystem_list()
2016-04-15 11:30:45.986 TRACE oslo_service.service File "/opt/stack/manila/manila/share/drivers/hitachi/ssh.py", line 352, in _get_filesystem_list
2016-04-15 11:30:45.986 TRACE oslo_service.service filesystem_list.append(FileSystem(items[i]))
2016-04-15 11:30:45.986 TRACE oslo_service.service File "/opt/stack/manila/manila/share/drivers/hitachi/ssh.py", line 442, in __init__
2016-04-15 11:30:45.986 TRACE oslo_service.service self.confined = int(items[6])
2016-04-15 11:30:45.986 TRACE oslo_service.service ValueError: invalid literal for int() with base 10: '-'

Changed in manila:
importance: Undecided → Medium
assignee: nobody → Rodrigo Barbieri (rodrigo-barbieri2010)
milestone: none → newton-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.openstack.org/307407

Changed in manila:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/307407
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=0d6de5088882331c575f3a6e837dbddc4af4adf5
Submitter: Jenkins
Branch: master

commit 0d6de5088882331c575f3a6e837dbddc4af4adf5
Author: Rodrigo Barbieri <email address hidden>
Date: Fri Apr 15 16:57:51 2016 -0300

    Fix HNAS error with unconfined filesystems

    Unconfined filesystems created through CLI in HNAS caused driver's
    parser to break. It was found that the command breaking could be
    replaced by another, already used command, which also retrieves
    filesystem information, and it is preferred, so previous command
    has been replaced.

    Additionally, administrator may not want to automatically mount
    an unmounted filesystem in DHSS=False mode, which may be unmounted
    for maintenance, so changed behavior to not mount automatically.

    Change-Id: I69e7a51ed4485783868c44e58b93bc69b58c8ac2
    Closes-bug: #1571000

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/315049

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (stable/mitaka)

Reviewed: https://review.openstack.org/315049
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=02ed5e2918fa7c7dee422bfa4a1818c42889fe7b
Submitter: Jenkins
Branch: stable/mitaka

commit 02ed5e2918fa7c7dee422bfa4a1818c42889fe7b
Author: Rodrigo Barbieri <email address hidden>
Date: Fri Apr 15 16:57:51 2016 -0300

    Fix HNAS error with unconfined filesystems

    Unconfined filesystems created through CLI in HNAS caused driver's
    parser to break. It was found that the command breaking could be
    replaced by another, already used command, which also retrieves
    filesystem information, and it is preferred, so previous command
    has been replaced.

    Additionally, administrator may not want to automatically mount
    an unmounted filesystem in DHSS=False mode, which may be unmounted
    for maintenance, so changed behavior to not mount automatically.

    Closes-bug: #1571000
    (cherry picked from commit 0d6de5088882331c575f3a6e837dbddc4af4adf5)

    Change-Id: Id28cc7f929d00ef1e819f2325c7c8519979cfb16

tags: added: in-stable-mitaka
Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/manila 3.0.0.0b1

This issue was fixed in the openstack/manila 3.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.