This repository was archived by the owner on Jul 25, 2019. It is now read-only.
Repository navigation
Subnet allocation fixes - #227
Merged
Merged
Conversation
danwinship
force-pushed
the
subnet-allocation
branch
3 times, most recently
from
December 18, 2015 14:27
6e5a274 to
832baf7
Compare
Contributor
Author
split out into its own PR. Now this is just the subnet numbering fix |
Try to allocate networks in an order that keeps the subnet part and the host part in separate octets for as long as possible.
Contributor
Author
fixed
It's not a 32-bit number, it's a number from 1 to 31, so plain Likewise with leftShift/rightShift. |
danwinship
force-pushed
the
subnet-allocation
branch
from
January 4, 2016 15:20
832baf7 to
6dfd5d5
Compare
Contributor
Author
|
@pravisankar can you re-review? |
Member
|
[merge] |
Member
|
wrong tree :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Given ClusterNetworkCIDR "10.1.0.0/16" and HostSubnetLength 7, the current git master algorithm would allocate subnets in the order:
and then when you see a pod IP like "10.1.0.130", you have to stop and think to figure out which node it's on. Lame!
This branch fixes it so that the allocation order becomes:
meaning that if you have fewer than 256 nodes, then every node will have a unique 3rd octet, just like with the HostSubnetLength=8 case.
Oh, and then there's also a mostly-unrelated change to registry.go that removes the redundant validation of ClusterNetwork changes so that openshift/origin#6349 will work.
@openshift/networking