Skip to content

Allow expanding ClusterNetwork - #6349

Merged
openshift-bot merged 1 commit into
openshift:masterfrom
danwinship:clusternetwork-validation
Dec 18, 2015
Merged

openshift-bot merged 1 commit into
openshift:masterfrom
danwinship:clusternetwork-validation

Conversation

@danwinship

Copy link
Copy Markdown
Contributor

We were disallowing all changes to ClusterNetwork, but in fact, everything should work just fine if you change it to a new value that fully contains the old network. Eg, given the 10.1.0.0/16 default, switching to 10.0.0.0/15 (ie, 10.0.0.0/16 + 10.1.0.0.0/16) is not a problem. You need to keep the same HostSubnetLength though (which we weren't checking before).

(Given this possibility, maybe we should change the default network to something like 10.128.0.0/16, so users can grow it later without overlapping 10.0.0.0/16 (since that's probably the /16 that's most likely to already be in use for something non-OpenShift-related.))

(Note that currently openshift-sdn has code that redundantly validates ClusterNetwork changes, so this patch alone isn't enough to expose the new functionality.)

@openshift/networking PTAL

Comment thread pkg/sdn/api/validation/validation.go Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dislike 'size' since this was making me think "Why would we only allow it if the size of the network was smaller?"

Of course this is actually the number of leading 1s. Can we call it oldOnes and newOnes? So some future idiot me doesn't get confused? but LGTM even the way it is if you don't want to change it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

size reads better to me. Maybe just a comment.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repushed with

// oldSize/newSize is, eg the "16" in "10.1.0.0/16", so "newSize < oldSize" means
// the new network is larger

Add missing check that HostSubnetLength doesn't change.

Allow ClusterNetwork to change as long as the new value is a strict
superset of the old one.
@danwinship
danwinship force-pushed the clusternetwork-validation branch from 7d91d51 to c638c87 Compare December 17, 2015 14:05
@eparis

eparis commented Dec 17, 2015

Copy link
Copy Markdown
Member

[merge]

@openshift-bot

Copy link
Copy Markdown
Contributor

[Test]ing while waiting on the merge queue

@danwinship

Copy link
Copy Markdown
Contributor Author

[test]

1 similar comment
@danwinship

Copy link
Copy Markdown
Contributor Author

[test]

@pravisankar

Copy link
Copy Markdown

LGTM, similarly we can also allow expanding service/portal network

@danwinship

Copy link
Copy Markdown
Contributor Author

[test]

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin test up to c638c87

@openshift-bot

Copy link
Copy Markdown
Contributor

@eparis

eparis commented Dec 17, 2015

Copy link
Copy Markdown
Member

[merge]

@openshift-bot

Copy link
Copy Markdown
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/4404/) (Image: devenv-rhel7_2987)

@eparis

eparis commented Dec 18, 2015

Copy link
Copy Markdown
Member

I believe that #6149 is this flake. So
[merge]

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin merge up to c638c87

openshift-bot pushed a commit that referenced this pull request Dec 18, 2015
@openshift-bot
openshift-bot merged commit 65fb281 into openshift:master Dec 18, 2015
@danwinship
danwinship deleted the clusternetwork-validation branch February 17, 2016 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants