Commit 55808add authored by Humble Chirammal's avatar Humble Chirammal

Dont exit if 'mount.glusterfs -V' resulted in an error.

parent 6f7eac63
...@@ -379,6 +379,7 @@ func (b *glusterfsMounter) setUpAtInternal(dir string) error { ...@@ -379,6 +379,7 @@ func (b *glusterfsMounter) setUpAtInternal(dir string) error {
} }
options = append(options, "backup-volfile-servers="+dstrings.Join(addrlist[:], ":")) options = append(options, "backup-volfile-servers="+dstrings.Join(addrlist[:], ":"))
mountOptions := volume.JoinMountOptions(b.mountOptions, options)
//fetch client version. //fetch client version.
mountBinaryVerStr := "" mountBinaryVerStr := ""
...@@ -386,8 +387,8 @@ func (b *glusterfsMounter) setUpAtInternal(dir string) error { ...@@ -386,8 +387,8 @@ func (b *glusterfsMounter) setUpAtInternal(dir string) error {
cmdOut, err := b.exe.Command(linuxGlusterMountBinary, "-V").CombinedOutput() cmdOut, err := b.exe.Command(linuxGlusterMountBinary, "-V").CombinedOutput()
if err != nil { if err != nil {
return fmt.Errorf("Failed to get binary %s version", linuxGlusterMountBinary) glog.Warningf("Failed to get binary %q version", linuxGlusterMountBinary)
} } else {
//cmdOut will be filled as shown below. //cmdOut will be filled as shown below.
/* /*
[root@]# mount.glusterfs -V [root@]# mount.glusterfs -V
...@@ -419,13 +420,12 @@ func (b *glusterfsMounter) setUpAtInternal(dir string) error { ...@@ -419,13 +420,12 @@ func (b *glusterfsMounter) setUpAtInternal(dir string) error {
} }
} }
mountOptions := volume.JoinMountOptions(b.mountOptions, options)
for i := len(mountOptions) - 1; i >= 0; i-- { for i := len(mountOptions) - 1; i >= 0; i-- {
if mountOptions[i] == "auto_unmount" && mountBinaryVerStr != "" && mountBinaryVerStr < autoUnmountBinaryVer { if mountOptions[i] == "auto_unmount" && mountBinaryVerStr != "" && mountBinaryVerStr < autoUnmountBinaryVer {
mountOptions = append(mountOptions[:i], mountOptions[i+1:]...) mountOptions = append(mountOptions[:i], mountOptions[i+1:]...)
} }
} }
}
// Avoid mount storm, pick a host randomly. // Avoid mount storm, pick a host randomly.
// Iterate all hosts until mount succeeds. // Iterate all hosts until mount succeeds.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment