pool: skip setting the target size ratio to 0 by default
The target size ratio is currently always being set to 0, when
neither the legacy targetSizeRatio nor the parameter for
target_size_ratio are set. In this case, we should not set it to 0,
but rather should skip the command to set the target size ratio.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 938380734d)
This commit is contained in:
1 parent
dd3d6109c0
commit
aeda710840
2 files changed
+1
-17
No files matched your search
@@ -340,7 +340,7 @@ func setCommonPoolProperties(context *clusterd.Context, clusterInfo *ClusterInfo
|
||||
pool.Parameters = make(map[string]string)
|
||||
}
|
||||
|
||||
if _, ok := pool.Parameters[targetSizeRatioProperty]; !ok {
|
||||
if _, ok := pool.Parameters[targetSizeRatioProperty]; !ok && pool.Replicated.TargetSizeRatio != 0 {
|
||||
pool.Parameters[targetSizeRatioProperty] = strconv.FormatFloat(pool.Replicated.TargetSizeRatio, 'f', -1, 32)
|
||||
}
|
||||
|
||||
|
||||
@@ -310,22 +310,6 @@ func fsExecutor(t *testing.T, fsName, configDir string, multiFS bool, createData
|
||||
return "", nil
|
||||
} else if reflect.DeepEqual(args[0:6], []string{"osd", "pool", "set", fsName + "-data1", "size", "1"}) {
|
||||
return "", nil
|
||||
} else if reflect.DeepEqual(args[0:6], []string{"osd", "pool", "set", fsName + "-metadata", "target_size_ratio", "0"}) {
|
||||
return "", nil
|
||||
} else if reflect.DeepEqual(args[0:6], []string{"osd", "pool", "set", fsName + "-data0", "target_size_ratio", "0"}) {
|
||||
return "", nil
|
||||
} else if reflect.DeepEqual(args[0:6], []string{"osd", "pool", "set", fsName + "-data1", "target_size_ratio", "0"}) {
|
||||
return "", nil
|
||||
} else if reflect.DeepEqual(args[0:6], []string{"osd", "pool", "set", fsName + "-named-pool", "target_size_ratio", "0"}) {
|
||||
return "", nil
|
||||
} else if reflect.DeepEqual(args[0:6], []string{"osd", "pool", "set", fsName + "-metadata", "compression_mode", ""}) {
|
||||
return "", nil
|
||||
} else if reflect.DeepEqual(args[0:6], []string{"osd", "pool", "set", fsName + "-data0", "compression_mode", ""}) {
|
||||
return "", nil
|
||||
} else if reflect.DeepEqual(args[0:6], []string{"osd", "pool", "set", fsName + "-data1", "compression_mode", ""}) {
|
||||
return "", nil
|
||||
} else if reflect.DeepEqual(args[0:6], []string{"osd", "pool", "set", fsName + "-named-pool", "compression_mode", ""}) {
|
||||
return "", nil
|
||||
} else if reflect.DeepEqual(args[0:4], []string{"fs", "add_data_pool", fsName, fsName + "-data1"}) {
|
||||
*addDataPoolCount++
|
||||
return "", nil
|
||||
|
||||
Reference in new issue
Block a user