Hyper-V: cannot attach volumes from local HA shares

Bug #1580122 reported by Lucian Petrut
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Unassigned
compute-hyperv
Fix Released
Medium
Lucian Petrut
os-win
Fix Released
Medium
Lucian Petrut

Bug Description

At the moment, the Hyper-V driver uses the UNC path of images stored on SMB shares, regardless if the share is remote or not. Citing from the MS documentation, this is not supported:

“Accessing a continuously available file share as a loopback share is not supported. For example, if Microsoft SQL Server or Hyper-V store data files on SMB file shares, they must run on computers that are not a member of the file server cluster for the SMB file shares.”

This is troublesome for the Hyper-C scenario, as Hyper-V will attempt to modify the image ACLs, making them unusable. The easy fix is to simply check if the share is local, and use the local path in that case.

Matt Riedemann (mriedem)
Changed in nova:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Claudiu Belu (cbelu) wrote :

Addressed on master (os-win): https://review.openstack.org/#/c/314490

Changed in os-win:
importance: Undecided → Medium
assignee: nobody → Lucian Petrut (petrutlucian94)
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-win (master)

Reviewed: https://review.openstack.org/314490
Committed: https://git.openstack.org/cgit/openstack/os-win/commit/?id=a0fd9cee3734173a20cc3ef32e741336dff71d9d
Submitter: Jenkins
Branch: master

commit a0fd9cee3734173a20cc3ef32e741336dff71d9d
Author: Lucian Petrut <email address hidden>
Date: Tue May 10 12:53:56 2016 +0300

    Add method for retrieving local share paths

    This will be used by Nova in order to properly handle volumes
    residing on local shares.

    Partial-Bug: 1580122
    Change-Id: I8e4426b3b1044d24563adf7826ab9f141c2495b8

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to compute-hyperv (master)

Reviewed: https://review.openstack.org/314513
Committed: https://git.openstack.org/cgit/openstack/compute-hyperv/commit/?id=b964f2bce3f3eeac3659e5ef50f520ee1da4afb0
Submitter: Jenkins
Branch: master

commit b964f2bce3f3eeac3659e5ef50f520ee1da4afb0
Author: Lucian Petrut <email address hidden>
Date: Tue May 10 13:37:07 2016 +0300

    Hyper-V: properly handle loopback shares

    At the moment, the Hyper-V driver uses the UNC path of images
    stored on SMB shares, regardless if the share is remote or not.
    According to the MS docs, this is not supported for SOFS SMB shares.

    This is troublesome for the Hyper-C scenario, as Hyper-V will attempt
    to modify the image ACLs, making them unusable.

    The fix consists in checking if the share is local, and use the
    local path in that case.

    Depends-On: I8e4426b3b1044d24563adf7826ab9f141c2495b8
    Closes-Bug: #1580122

    Change-Id: Ib736b39f3bfa58b2737647de23f741ffcf85180b

Changed in compute-hyperv:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-win (stable/mitaka)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to compute-hyperv (stable/mitaka)

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

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

Reviewed: https://review.openstack.org/320424
Committed: https://git.openstack.org/cgit/openstack/os-win/commit/?id=542292ee46cc50db2bf58e02d73dfcb9262fc0e0
Submitter: Jenkins
Branch: stable/mitaka

commit 542292ee46cc50db2bf58e02d73dfcb9262fc0e0
Author: Lucian Petrut <email address hidden>
Date: Tue May 10 12:53:56 2016 +0300

    Add method for retrieving local share paths

    This will be used by Nova in order to properly handle volumes
    residing on local shares.

    Partial-Bug: 1580122
    Change-Id: I8e4426b3b1044d24563adf7826ab9f141c2495b8
    (cherry picked from commit a0fd9cee3734173a20cc3ef32e741336dff71d9d)

tags: added: in-stable-mitaka
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to compute-hyperv (stable/mitaka)

Reviewed: https://review.openstack.org/320438
Committed: https://git.openstack.org/cgit/openstack/compute-hyperv/commit/?id=313967e03ab65eb6dc6882daf8703b578a84337e
Submitter: Jenkins
Branch: stable/mitaka

commit 313967e03ab65eb6dc6882daf8703b578a84337e
Author: Lucian Petrut <email address hidden>
Date: Tue May 10 13:37:07 2016 +0300

    Hyper-V: properly handle loopback shares

    At the moment, the Hyper-V driver uses the UNC path of images
    stored on SMB shares, regardless if the share is remote or not.
    According to the MS docs, this is not supported for SOFS SMB shares.

    This is troublesome for the Hyper-C scenario, as Hyper-V will attempt
    to modify the image ACLs, making them unusable.

    The fix consists in checking if the share is local, and use the
    local path in that case.

    Closes-Bug: #1580122

    (cherry-picked from b964f2bce3f3eeac3659e5ef50f520ee1da4afb0)
    Change-Id: Ib736b39f3bfa58b2737647de23f741ffcf85180b

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

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

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

Reviewed: https://review.openstack.org/326635
Committed: https://git.openstack.org/cgit/openstack/os-win/commit/?id=111db692aee566ba63041f993d6e16237ed9abde
Submitter: Jenkins
Branch: master

commit 111db692aee566ba63041f993d6e16237ed9abde
Author: Lucian Petrut <email address hidden>
Date: Tue Jun 7 19:06:11 2016 +0300

    Add method for checking whether a share is local

    Mounting loopback highly available shares is not supported.

    The Hyper-V Nova driver needs a way to check whether a share is
    local and use the local path in that case.

    This change adds a method that attempts to resolve the share server
    address and compare the IPs with the local IPs.

    In case of a share exposed by a Scale-Out server, we'll use the
    Distributed Node Name of the share, which points to all the nodes
    of the cluster.

    ddt is added as a requirement.

    Change-Id: I04ac0b514ccac9c910728da205f0f0f11b43509a
    Partial-Bug: #1580122

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to compute-hyperv (master)

Reviewed: https://review.openstack.org/324641
Committed: https://git.openstack.org/cgit/openstack/compute-hyperv/commit/?id=c0f5126d62857e3d7258b32e90e3aa0fc5302f84
Submitter: Jenkins
Branch: master

commit c0f5126d62857e3d7258b32e90e3aa0fc5302f84
Author: Lucian Petrut <email address hidden>
Date: Thu Jun 2 19:04:16 2016 +0300

    Handle loopback shares without mounting them

    Mounting loopback highly available shares is not supported. For
    this reason, the previous approach checking whether a share is
    local is incorrect.

    This patch changes this, attempting to resolve the share address.

    Closes-Bug: #1580122
    Depends-On: I04ac0b514ccac9c910728da205f0f0f11b43509a
    Change-Id: I557c8882dbe45714011d1155dfd553aefafd13e2

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to compute-hyperv (stable/mitaka)

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

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

Reviewed: https://review.openstack.org/377244
Committed: https://git.openstack.org/cgit/openstack/compute-hyperv/commit/?id=bb7211fd4f1557f95ddba9066080f7e32b8ce952
Submitter: Jenkins
Branch: stable/mitaka

commit bb7211fd4f1557f95ddba9066080f7e32b8ce952
Author: Lucian Petrut <email address hidden>
Date: Thu Jun 2 19:04:16 2016 +0300

    Handle loopback shares without mounting them

    Mounting loopback highly available shares is not supported. For
    this reason, the previous approach checking whether a share is
    local is incorrect.

    This patch changes this, attempting to resolve the share address.

    Closes-Bug: #1580122
    Depends-On: I04ac0b514ccac9c910728da205f0f0f11b43509a
    Change-Id: I557c8882dbe45714011d1155dfd553aefafd13e2
    (cherry picked from commit c0f5126d62857e3d7258b32e90e3aa0fc5302f84)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to compute-hyperv (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/378618

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-win (stable/mitaka)

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

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

Reviewed: https://review.openstack.org/378753
Committed: https://git.openstack.org/cgit/openstack/os-win/commit/?id=33e9af9377a06fa35f48bd9012f32faf9b97763d
Submitter: Jenkins
Branch: stable/mitaka

commit 33e9af9377a06fa35f48bd9012f32faf9b97763d
Author: Lucian Petrut <email address hidden>
Date: Tue Jun 7 19:06:11 2016 +0300

    Add method for checking whether a share is local

    Mounting loopback highly available shares is not supported.

    The Hyper-V Nova driver needs a way to check whether a share is
    local and use the local path in that case.

    This change adds a method that attempts to resolve the share server
    address and compare the IPs with the local IPs.

    In case of a share exposed by a Scale-Out server, we'll use the
    Distributed Node Name of the share, which points to all the nodes
    of the cluster.

    ddt is added as a requirement.

    Change-Id: I04ac0b514ccac9c910728da205f0f0f11b43509a
    Partial-Bug: #1580122
    (cherry picked from commit 111db692aee566ba63041f993d6e16237ed9abde)

Claudiu Belu (cbelu)
Changed in os-win:
status: In Progress → Fix Released
Changed in compute-hyperv:
importance: Undecided → Medium
assignee: nobody → Lucian Petrut (petrutlucian94)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on compute-hyperv (stable/liberty)

Change abandoned by Joshua Hesketh (<email address hidden>) on branch: stable/liberty
Review: https://review.openstack.org/378618
Reason: This branch (stable/liberty) is at End Of Life

Revision history for this message
Lucian Petrut (petrutlucian94) wrote :

Fixed in os-brick, no longer affects Nova.

Changed in nova:
status: Triaged → Fix Released
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.