Improper relationships between parent and child shares using LVM driver

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

Bug Description

LVM driver has improper relationships between parent and child shares:

Steps to reproduce:

1) Create "parent" share.
2) Provide access to "parent" share (1) for some client machine and mount it there.
3) Create "file1" on "parent" share (1).
4) Create snapshot from "parent" share (1).
5) Create "file2" on "parent" share (1).
6) Create "child" share from "parent" share (1).
7) Provide access to "child" share (6) for some client machine and mount it there.
8) Create "file3" on "child" share (6).

9) List files of parent share.

Expected result: parent share has "file1" and "file2" files and child share has "file1" and "file3" files only.

Actual result: we see "file3" in "parent" share that has just been created on "child" share and do not see "file2" created on parent share after creation of the snapshot.

Bug has been reproduced [1] in CI using [2], [3] and [4] changes that add/enable scenario tests for LVM driver.

Generic driver has the same problem using Cinder as backend with LVM driver enabled for it.

[1] http://logs.openstack.org/04/402604/3/check/gate-manila-tempest-minimal-dsvm-lvm-ubuntu-xenial/92568c9/logs/testr_results.html.gz
[2] https://review.openstack.org/#/c/400758
[3] https://review.openstack.org/#/c/402404
[4] https://review.openstack.org/#/c/402604

Changed in manila:
importance: Undecided → Medium
milestone: none → ocata-2
description: updated
tags: added: driver lvm
description: updated
description: updated
Revision history for this message
Valeriy Ponomaryov (vponomaryov) wrote :

Looks like it is caused by following bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1071733

Local testing shows that local filesystems work ok, they do not overlap anyhow. But mounting them as NFS shares makes them refer to one single volume.

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

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

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

commit c93e812a5889cf812d8b339ae4e588a6596e6d95
Author: Valeriy Ponomaryov <email address hidden>
Date: Tue Dec 6 14:32:26 2016 +0300

    [LVM,Generic drivers] Fix relationships between parent and child shares

    Reportedly [1], the kernel-nfs-server has a bug where we have overlap of
    filesystem identifiers using LVM volumes and their snapshots.

    We face this bug in manila LVM driver and Generic driver when we use
    cinder LVM driver. So, fix it generating unique UUID for all
    snapshots (only for LVM, because we cannot do it in Generic driver
    while we do not have "mount-snapshot" feature support there) and
    child volumes that will be exported as child shares.

    [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1071733

    Change-Id: Ib93bfb0d4184da1e70ecece6fde6931e44d05a30
    Closes-Bug: #1645751

Changed in manila:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/manila 4.0.0.0b2

This issue was fixed in the openstack/manila 4.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to manila (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/611199

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to manila (master)

Reviewed: https://review.openstack.org/611199
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=817cce347a567863173e3065084bfabc35845907
Submitter: Zuul
Branch: master

commit 817cce347a567863173e3065084bfabc35845907
Author: Goutham Pacha Ravi <email address hidden>
Date: Tue Oct 16 16:48:58 2018 -0700

    [LVM] Run filesystem check before assigning UUID

    We assign a random UUID with tune2fs to snapshots
    and shares created from snapshots so that they
    don't conflict with the parent shares/snapshots
    when both of them are being mounted.

    tune2fs requires that a filesystem check be
    performed "recently" before UUID assignments.
    So, perform a filesystem check right away to
    allow tune2fs to assign a random UUID.

    Change-Id: I858a318f7a83e033cc3f2699859e38b6b74c8d24
    Related-Bug: #1645751
    Closes-Bug: #1798219

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to manila (stable/rocky)

Related fix proposed to branch: stable/rocky
Review: https://review.openstack.org/637378

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to manila (stable/rocky)

Reviewed: https://review.openstack.org/637378
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=55507cc603f8ab00b2b6dbeb2d4a2fa4e862f317
Submitter: Zuul
Branch: stable/rocky

commit 55507cc603f8ab00b2b6dbeb2d4a2fa4e862f317
Author: Goutham Pacha Ravi <email address hidden>
Date: Tue Oct 16 16:48:58 2018 -0700

    [LVM] Run filesystem check before assigning UUID

    We assign a random UUID with tune2fs to snapshots
    and shares created from snapshots so that they
    don't conflict with the parent shares/snapshots
    when both of them are being mounted.

    tune2fs requires that a filesystem check be
    performed "recently" before UUID assignments.
    So, perform a filesystem check right away to
    allow tune2fs to assign a random UUID.

    Depends-on: https://review.openstack.org/#/c/637287/
    Change-Id: I858a318f7a83e033cc3f2699859e38b6b74c8d24
    Related-Bug: #1645751
    Closes-Bug: #1798219
    (cherry picked from commit 817cce347a567863173e3065084bfabc35845907)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to manila (stable/queens)

Related fix proposed to branch: stable/queens
Review: https://review.openstack.org/637566

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to manila (stable/queens)

Reviewed: https://review.openstack.org/637566
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=e9e4a3a6e3917216c284018b4f7db854a309fe4b
Submitter: Zuul
Branch: stable/queens

commit e9e4a3a6e3917216c284018b4f7db854a309fe4b
Author: Goutham Pacha Ravi <email address hidden>
Date: Tue Oct 16 16:48:58 2018 -0700

    [LVM] Run filesystem check before assigning UUID

    We assign a random UUID with tune2fs to snapshots
    and shares created from snapshots so that they
    don't conflict with the parent shares/snapshots
    when both of them are being mounted.

    tune2fs requires that a filesystem check be
    performed "recently" before UUID assignments.
    So, perform a filesystem check right away to
    allow tune2fs to assign a random UUID.

    Depends-on: https://review.openstack.org/#/c/637565
    Change-Id: I858a318f7a83e033cc3f2699859e38b6b74c8d24
    Related-Bug: #1645751
    Closes-Bug: #1798219
    (cherry picked from commit 817cce347a567863173e3065084bfabc35845907)
    (cherry picked from commit 55507cc603f8ab00b2b6dbeb2d4a2fa4e862f317)

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