Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/gluster/glusterd2 into cl…
Browse files Browse the repository at this point in the history
…uster-wide-options
  • Loading branch information
rishubhjain committed Dec 18, 2018
2 parents 95ef5aa + ea22407 commit af6ec95
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 0 additions & 2 deletions glusterd2/options/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ type validateFunc func(string, string) error

// ClusterOptMap contains list of supported cluster-wide options, default values and value types
var ClusterOptMap = map[string]*ClusterOption{
"cluster.shared-storage": {"cluster.shared-storage", "off", OptionTypeBool, nil},
"cluster.op-version": {"cluster.op-version", strconv.Itoa(gdctx.OpVersion), OptionTypeInt, nil},
"cluster.max-op-version": {"cluster.max-op-version", strconv.Itoa(gdctx.OpVersion), OptionTypeInt, nil},
"cluster.brick-multiplex": {"cluster.brick-multiplex", "off", OptionTypeBool, nil},
"cluster.max-bricks-per-process": {"cluster.max-bricks-per-process", "250", OptionTypeInt, nil},
"cluster.localtime-logging": {"cluster.localtime-logging", "off", OptionTypeBool, nil},
}

// RegisterClusterOpValidationFunc registers a validation function for provided
Expand Down
6 changes: 3 additions & 3 deletions pkg/lvmutils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func RemovePV(device string) error {

// GetVgAvailableSize gets available size of given Vg
func GetVgAvailableSize(vgname string) (uint64, uint64, error) {
out, err := exec.Command("vgdisplay", "-c", vgname).Output()
out, err := exec.Command("vgdisplay", "-c", "--readonly", vgname).Output()
if err != nil {
return 0, 0, err
}
Expand Down Expand Up @@ -158,7 +158,7 @@ func RemoveLV(vgName, lvName string) error {
func NumberOfLvs(vgname, tpname string) (int, error) {
nlv := 0
out, err := utils.ExecuteCommandOutput(
"lvs", "--no-headings", "--select",
"lvs", "--no-headings", "--readonly", "--select",
fmt.Sprintf("vg_name=%s&&pool_lv=%s", vgname, tpname),
)

Expand All @@ -176,7 +176,7 @@ func NumberOfLvs(vgname, tpname string) (int, error) {
// GetThinpoolName gets thinpool name for a given LV
func GetThinpoolName(vgname, lvname string) (string, error) {
out, err := utils.ExecuteCommandOutput(
"lvs", "--no-headings", "--select",
"lvs", "--no-headings", "--readonly", "--select",
fmt.Sprintf("vg_name=%s&&lv_name=%s", vgname, lvname),
"-o", "pool_lv",
)
Expand Down
3 changes: 2 additions & 1 deletion pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ const (
)

var (
// ReservedKeywords are Glusterd2 reserved keywords
// ReservedKeywords are Glusterd2 reserved keywords and must not be used as
// resource(volume, peer etc) name to avoid conflict in glustercli.
ReservedKeywords = []string{"all", "volume", "status", "list", "cluster", "gluster", "brick"}
)

Expand Down

0 comments on commit af6ec95

Please sign in to comment.