]> git.proxmox.com Git - pve-storage.git/commitdiff
nfs/glusterfs: is_mounted fixes
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 9 Dec 2015 07:44:50 +0000 (08:44 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 9 Dec 2015 08:22:15 +0000 (09:22 +0100)
The parse_proc_mounts change made the glusterfs is_mounted
check fail (causing it to be shown as inactive on the GUI).
The NFS check was stricter (not allowing a trailing / in the
source anymore).

PVE/Storage/GlusterfsPlugin.pm
PVE/Storage/NFSPlugin.pm

index a6ca950b6d42fdc5cb71c36b378fa48ce9cf5879..315c5a6d3317e7cc4f5efab1d75fc3a549420d71 100644 (file)
@@ -74,7 +74,7 @@ sub glusterfs_is_mounted {
 
     return $mountpoint if grep {
        $_->[2] eq 'fuse.glusterfs' &&
-       $_->[0] eq $volume &&
+       $_->[0] =~ /^\S+:\Q$volume\E$/ &&
        $_->[1] eq $mountpoint
     } @$mountdata;
     return undef;
index 047c3a4a4e1d7d380aa85ae5e033880741812550..e1107fd90342bc421129e34fc8416ddc0a06daf3 100644 (file)
@@ -23,7 +23,7 @@ sub nfs_is_mounted {
     $mountdata = PVE::ProcFSTools::parse_proc_mounts() if !$mountdata;
     return $mountpoint if grep {
        $_->[2] eq 'nfs' &&
-       $_->[0] eq $source &&
+       $_->[0] =~ m|^\Q$source\E/?$| &&
        $_->[1] eq $mountpoint
     } @$mountdata;
     return undef;