Skip to content

Commit

Permalink
fix multipath.conf inconsistencies (#167)
Browse files Browse the repository at this point in the history
* fix multipath.conf inconsistencies:
 - make sure we acknowledge find_multipaths no for all our supported OS
 - fix multipath template to include 3par device section

Signed-off-by: Raunak <[email protected]>
  • Loading branch information
raunakkumar authored Dec 8, 2021
1 parent cbcb199 commit 29ccbba
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 6 deletions.
17 changes: 17 additions & 0 deletions tunelinux/config/multipath.conf.generic
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,23 @@ devices {
prio alua
failback immediate
}
device {
vendor "3PARdata"
product "VV"
path_grouping_policy "group_by_prio"
path_selector "round-robin 0"
path_checker tur
features "0"
hardware_handler "1 alua"
prio "alua"
failback immediate
rr_weight "uniform"
no_path_retry 18
rr_min_io_rq 1
detect_prio yes
fast_io_fail_tmo 10
dev_loss_tmo "infinity"
}
device {
rr_weight priorities
uid_attribute ID_SERIAL
Expand Down
17 changes: 17 additions & 0 deletions tunelinux/config/multipath.conf.upstream
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,23 @@ devices {
prio alua
failback immediate
}
device {
vendor "3PARdata"
product "VV"
path_grouping_policy "group_by_prio"
path_selector "round-robin 0"
path_checker tur
features "0"
hardware_handler "1 alua"
prio "alua"
failback immediate
rr_weight "uniform"
no_path_retry 18
rr_min_io_rq 1
detect_prio yes
fast_io_fail_tmo 10
dev_loss_tmo "infinity"
}
device {
rr_weight priorities
uid_attribute ID_SERIAL
Expand Down
15 changes: 9 additions & 6 deletions tunelinux/multipath.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ package tunelinux
// Copyright 2019 Hewlett Packard Enterprise Development LP.
import (
"errors"
"github.com/hpe-storage/common-host-libs/linux"
log "github.com/hpe-storage/common-host-libs/logger"
"github.com/hpe-storage/common-host-libs/mpathconfig"
"github.com/hpe-storage/common-host-libs/util"
"io/ioutil"
"os"
"regexp"
"strconv"
"strings"

"github.com/hpe-storage/common-host-libs/linux"
log "github.com/hpe-storage/common-host-libs/logger"
"github.com/hpe-storage/common-host-libs/mpathconfig"
"github.com/hpe-storage/common-host-libs/util"
)

const (
Expand Down Expand Up @@ -276,7 +277,10 @@ func setMultipathRecommendations(recommendations []*Recommendation) (err error)
}
}
if err == nil {
if value := (defaultsSection.GetProperties())["find_multipaths"]; value == "yes" {
// if we find_multipaths key with yes value or if the key is absent (in case of Ubuntu)
// set it to no
value := (defaultsSection.GetProperties())["find_multipaths"]
if value == "yes" || value == "" {
(defaultsSection.GetProperties())["find_multipaths"] = "no"
}
}
Expand Down Expand Up @@ -353,4 +357,3 @@ func ConfigureMultipath() (err error) {
}
return nil
}

0 comments on commit 29ccbba

Please sign in to comment.