Fix for default-addr-pool-mask-length param max value check
We check for max value for -default-addr-pool-mask-length param as 32. But There won't be enough addresses on the overlay network. Hence we are keeping it 29 so that we would be having atleast 8 addresses in /29 network. Signed-off-by: selansen <elango.siva@docker.com> (cherry picked from commit d25c5df80e60cdbdc23fe3d0e2a6808123643dc7) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 9406f3622d18a0d9b6c438190e8fdd8be53d3b22 Component: engine
This commit is contained in:
committed by
Sebastiaan van Stijn
parent
b4ba6169d9
commit
c642332896
@@ -99,7 +99,12 @@ func validateDefaultAddrPool(defaultAddrPool []string, size uint32) error {
|
||||
if size == 0 {
|
||||
size = 24
|
||||
}
|
||||
if size > 32 {
|
||||
// We allow max value as 29. We can have 8 IP addresses for max value 29
|
||||
// If we allow 30, then we will get only 4 IP addresses. But with latest
|
||||
// libnetwork LB scale implementation, we use total of 4 IP addresses for internal use.
|
||||
// Hence keeping 29 as max value, we will have 8 IP addresses. This will be
|
||||
// smallest subnet that can be used in overlay network.
|
||||
if size > 29 {
|
||||
return fmt.Errorf("subnet size is out of range: %d", size)
|
||||
}
|
||||
for i := range defaultAddrPool {
|
||||
|
||||
Reference in New Issue
Block a user