Merge pull request #5143 from shellwedance/ceph_add_size_in_pool_create
Ceph: Add replica_size flag in replicated pool creation time
This commit is contained in:
2 files changed
+3
-1
No files matched your search
@@ -282,7 +282,7 @@ func CreateReplicatedPoolForApp(context *clusterd.Context, namespace, poolName s
|
||||
return err
|
||||
}
|
||||
|
||||
args := []string{"osd", "pool", "create", poolName, pgCount, "replicated", poolName}
|
||||
args := []string{"osd", "pool", "create", poolName, pgCount, "replicated", poolName, "--size", strconv.FormatUint(uint64(pool.Replicated.Size), 10)}
|
||||
output, err := NewCephCommand(context, namespace, args).Run()
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "failed to create replicated pool %s. %s", poolName, string(output))
|
||||
|
||||
@@ -120,6 +120,8 @@ func testCreateReplicaPool(t *testing.T, failureDomain, crushRoot, deviceClass,
|
||||
if args[2] == "create" {
|
||||
assert.Equal(t, "mypool", args[3])
|
||||
assert.Equal(t, "replicated", args[5])
|
||||
assert.Equal(t, "--size", args[7])
|
||||
assert.Equal(t, "12345", args[8])
|
||||
return "", nil
|
||||
}
|
||||
if args[2] == "set" {
|
||||
|
||||
Reference in new issue
Block a user