File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 44 "context"
55 "fmt"
66 "math/rand"
7+ "strings"
78
89 "github.com/golang-jwt/jwt/v4"
910 "github.com/google/go-cmp/cmp"
@@ -212,7 +213,13 @@ func (r *Storage) ValidateCreate() error {
212213 ErasureBlock42 : 8 ,
213214 None : 1 ,
214215 }
215- if nodesNumber < minNodesPerErasure [r .Spec .Erasure ] {
216+
217+ forTestingPurposes := false
218+ if r .Spec .Erasure == ErasureMirror3DC && strings .Contains (r .Spec .Configuration , "SectorMap" ) {
219+ forTestingPurposes = true
220+ }
221+
222+ if nodesNumber < minNodesPerErasure [r .Spec .Erasure ] && ! forTestingPurposes {
216223 return fmt .Errorf ("erasure type %v requires at least %v storage nodes" , r .Spec .Erasure , minNodesPerErasure [r .Spec .Erasure ])
217224 }
218225
@@ -305,7 +312,7 @@ func (r *Storage) ValidateUpdate(old runtime.Object) error {
305312 }
306313
307314 minNodesPerErasure := map [ErasureType ]int32 {
308- ErasureMirror3DC : 9 ,
315+ ErasureMirror3DC : 3 ,
309316 ErasureBlock42 : 8 ,
310317 None : 1 ,
311318 }
You can’t perform that action at this time.
0 commit comments