Print warning when there are not enough zone for EC
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sheepdog |
New
|
Undecided
|
Unassigned |
Bug Description
Hi, this is the warning I get if I try to format the cluster with -c 2:1 and only two nodes.
dog cluster format -c 2:1
Number of copies (3) is larger than number of nodes (2).
Are you sure you want to continue? [yes/no]: ^C
dog node list
Id Host:Port V-Nodes Zone
0 192.168.2.44:7000 3 738371776
1 192.168.2.45:7000 3 755148992
dog cluster format -c 2:1
Number of copies (3) is larger than number of nodes (2).
Are you sure you want to continue? [yes/no]:
I think the same logic shall apply when the zone number is not enough like in this example:
dog node list
Id Host:Port V-Nodes Zone
0 192.168.2.44:7000 3 1
1 192.168.2.45:7000 3 1
2 192.168.2.46:7000 3 2
3 192.168.2.47:7000 3 2
dog cluster format -c 2:1
using backend plain store
It should print the warning.