Skip to content

Commit

Permalink
Merge pull request #3962 from mxie91/add-unlock-option-in-case-mount-…
Browse files Browse the repository at this point in the history
…error

Add nolock option in case mount error
  • Loading branch information
dzhengfy authored Aug 5, 2024
2 parents a734c1b + 1832a18 commit 4cfe8c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions virttest/utils_v2v.py
Original file line number Diff line number Diff line change
Expand Up @@ -1641,7 +1641,7 @@ def get_authorized_keys_file(server_type=None):
return authorized_keys


def v2v_mount(src, dst="v2v_mount_point", fstype="nfs"):
def v2v_mount(src, dst="v2v_mount_point", fstype="nfs", options="nolock"):
"""
Mount nfs src to dst
Expand All @@ -1652,7 +1652,7 @@ def v2v_mount(src, dst="v2v_mount_point", fstype="nfs"):
if not os.path.exists(mount_point):
os.makedirs(mount_point)

if not utils_misc.mount(src, mount_point, fstype, verbose=True):
if not utils_misc.mount(src, mount_point, fstype, options, verbose=True):
raise exceptions.TestError("Mount %s for %s failed" % (src, mount_point))

return mount_point
Expand Down

0 comments on commit 4cfe8c9

Please sign in to comment.