HDS_HNAS: logging inconsistent IDs for managed shares

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

Bug Description

When performing operations over managed shares, Manila HNAS driver shows inconsistent IDs, sometimes referring to the share_instance_id, sometimes referring to the hnas_id retrieved from private storage.

See below log output displayed when performing a share shrink operation.

2016-05-19 17:22:51.442 DEBUG manila.share.drivers.hitachi.hds_hnas [req-8562ab51-0cc0-44a2-a827-b64d83e2e51c ca71c4cc3fed4a1cbbfd97f968f7d536 234b54ea84124dbb8fb897aa83939aa6] Shrinking share in HNAS: fdb14194-3551-4882-bc39-81cac09a28b7. from (pid=11082) shrink_share /opt/stack/manila/manila/share/drivers/hitachi/hds_hnas.py:434
2016-05-19 17:22:51.950 DEBUG manila.share.drivers.hitachi.hds_hnas [req-8562ab51-0cc0-44a2-a827-b64d83e2e51c ca71c4cc3fed4a1cbbfd97f968f7d536 234b54ea84124dbb8fb897aa83939aa6] Usage space in share fb51f09c-cb98-4889-b2cf-fd027eee31cf: 0.0G from (pid=11082) _shrink_share /opt/stack/manila/manila/share/drivers/hitachi/hds_hnas.py:521
2016-05-19 17:22:52.0 INFO manila.share.drivers.hitachi.hds_hnas [req-8562ab51-0cc0-44a2-a827-b64d83e2e51c ca71c4cc3fed4a1cbbfd97f968f7d536 234b54ea84124dbb8fb897aa83939aa6] Share fdb14194-3551-4882-bc39-81cac09a28b7 successfully shrunk to 1G.

Changed in manila:
importance: Undecided → Low
Changed in manila:
assignee: nobody → Rodrigo Barbieri (rodrigo-barbieri2010)
status: New → In Progress
tags: added: mitaka-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/316113
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=081fc4860b7ba3a87020d2ddae006f667616fed0
Submitter: Jenkins
Branch: master

commit 081fc4860b7ba3a87020d2ddae006f667616fed0
Author: Rodrigo Barbieri <email address hidden>
Date: Fri May 13 10:23:46 2016 -0300

    Fix HDS HNAS errors caused by incorrect IDs

    When attempting to allow_access on a managed share, it fails
    because the proper share ID is not retrieved from private storage
    prior to attempting to validate that the share exists in the
    backend. The same happens when trying to create a share from a
    snapshot created from a managed share, the proper share ID is
    not retrieved from private storage. While we are dealing with
    two possible different IDs it is important to properly display
    the API share ID in log messages so it can be matched to the
    share instances ID, and not all log messages are accurately doing
    so.

    This change addresses this by retrieving the ID from
    private storage first for update_access and
    create_share_from_snapshot operations. The proper unit test changes
    included in this patch required a refactor of several IDs to ensure
    this problem is addressed in unit tests, thus it made sense to
    address several bugs caused by the same problem, having the same fix
    and requiring modifications to the same lines of code.

    Closes-bug: #1581541
    Closes-bug: #1584179
    Closes-bug: #1583785
    Change-Id: I8cdb1a8a72a4ac7e710f57e3c288d48cd2adf0dd

Changed in manila:
status: In Progress → Fix Released
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.

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/325874

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

Reviewed: https://review.openstack.org/325874
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=5884b3ca3f3bc4ace14e6991bca739bec199dd9f
Submitter: Jenkins
Branch: stable/mitaka

commit 5884b3ca3f3bc4ace14e6991bca739bec199dd9f
Author: Rodrigo Barbieri <email address hidden>
Date: Mon Jun 6 09:41:55 2016 -0300

    Fix HDS HNAS errors caused by incorrect IDs

    When attempting to allow_access on a managed share, it fails
    because the proper share ID is not retrieved from private storage
    prior to attempting to validate that the share exists in the
    backend. The same happens when trying to create a share from a
    snapshot created from a managed share, the proper share ID is
    not retrieved from private storage. While we are dealing with
    two possible different IDs it is important to properly display
    the API share ID in log messages so it can be matched to the
    share instances ID, and not all log messages are accurately doing
    so.

    This change addresses this by retrieving the ID from
    private storage first for update_access and
    create_share_from_snapshot operations. The proper unit test changes
    included in this patch required a refactor of several IDs to ensure
    this problem is addressed in unit tests, thus it made sense to
    address several bugs caused by the same problem, having the same fix
    and requiring modifications to the same lines of code.

    (cherry-picked from commit 081fc4860b7ba3a87020d2ddae006f667616fed0)
    Closes-bug: #1581541
    Closes-bug: #1584179
    Closes-bug: #1583785
    Change-Id: I8cdb1a8a72a4ac7e710f57e3c288d48cd2adf0dd

tags: added: in-stable-mitaka
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.