Vzstorage driver doesn't lock when connecting volume

Bug #1718474 reported by Evgeny Antyshev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Evgeny Antyshev
Pike
Fix Committed
Undecided
Matt Riedemann

Bug Description

Occasionally, Virtuozzo Storage CI fails 1 testcase, with following error in nova-compute:
Sep 20 09:40:55 localhost.localdomain nova-compute[67785]: Command: pstorage-mount -c testcluster_uypcf0k16f -u stack -g root -m 0770 -l /var/log/vstorage/testcluster_uypcf0k16f/nova.log.gz /opt/stack/data/nova/mnt/0d5556ed3994ee64ccc877564e48b2a4
Sep 20 09:40:55 localhost.localdomain nova-compute[67785]: Exit code: 255
Sep 20 09:40:55 localhost.localdomain nova-compute[67785]: Stdout: u''
Sep 20 09:40:55 localhost.localdomain nova-compute[67785]: Stderr: u'20-09-17 09:40:55.782 vstorage-mount: mounting vstorage://testcluster_uypcf0k16f at /opt/stack/data/nova/mnt/0d5556ed3994ee64ccc877564e48b2a4 with flags: 0xc06, params: fd=3,rootmode=40000,user_id=0,group_id=0,allow_other,default_permissions,writeback_enable,direct_enable,umount_wait,\nvstorage-mount: failed to initialize log file\n20-09-17 09:40:55.832 fuse_umount: /opt/stack/data/nova/mnt/0d5556ed3994ee64ccc877564e48b2a4\n' {{(pid=75667) loop /usr/lib/python2.7/site-packages/oslo_privsep/daemon.py:449}}

full log:
http://paste.openstack.org/show/621549/
http://openstack-3rd-party-storage-ci-logs.virtuozzo.com/44/504944/3/check/dsvm-tempest-kvm/eed2bd5/console.html

This is a consequence of simultaneously connecting 2 volumes, since connect_volume() is not synchronized, like f.e. in Quobyte driver. BTW, many other drivers should suffer from this mistake.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: nobody → Evgeny Antyshev (eantyshev)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/505708
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=ea20e87ad1fd5dc6df41d0d03506c851485cf2e1
Submitter: Zuul
Branch: master

commit ea20e87ad1fd5dc6df41d0d03506c851485cf2e1
Author: Evgeny Antyshev <email address hidden>
Date: Wed Sep 20 15:44:00 2017 +0000

    Vzstorage: synchronize volume connect

    We need to protect the mount procedure
    against possible races between requests
    for volumes located on single Vzstorage share.
    Disconnect is a no-op in os-brick's remotefs connector,
    hence doesn't need this.

    Change-Id: I26c61a85b5daa264cbb04b4497d9b6ac16e3f3a1
    Closes-Bug: #1718474

Changed in nova:
status: In Progress → Fix Released
Matt Riedemann (mriedem)
Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/524688

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 17.0.0.0b2

This issue was fixed in the openstack/nova 17.0.0.0b2 development milestone.

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

Reviewed: https://review.openstack.org/524688
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=950239707dbd0e4f49e5191d0f944eb92b703bb5
Submitter: Zuul
Branch: stable/pike

commit 950239707dbd0e4f49e5191d0f944eb92b703bb5
Author: Evgeny Antyshev <email address hidden>
Date: Wed Sep 20 15:44:00 2017 +0000

    Vzstorage: synchronize volume connect

    We need to protect the mount procedure
    against possible races between requests
    for volumes located on single Vzstorage share.
    Disconnect is a no-op in os-brick's remotefs connector,
    hence doesn't need this.

    Change-Id: I26c61a85b5daa264cbb04b4497d9b6ac16e3f3a1
    Closes-Bug: #1718474
    (cherry picked from commit ea20e87ad1fd5dc6df41d0d03506c851485cf2e1)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 16.0.4

This issue was fixed in the openstack/nova 16.0.4 release.

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.