-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove requirement of having deprecated clusterNetworkCIDR/hostSubnetLength in master.networkConfig #18669
Remove requirement of having deprecated clusterNetworkCIDR/hostSubnetLength in master.networkConfig #18669
Conversation
@pravisankar PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you test if this works with 'oc cluster up'? (#16627)
} | ||
if len(config.NetworkConfig.ClusterNetworks) > 0 && config.NetworkConfig.DeprecatedClusterNetworkCIDR != config.NetworkConfig.ClusterNetworks[0].CIDR { | ||
validationResults.AddErrors(field.Invalid(fldPath.Child("clusterNetworkCIDR"), config.NetworkConfig.DeprecatedClusterNetworkCIDR, "cannot set clusterNetworkCIDR and clusterNetworks, please use clusterNetworks")) | ||
fmt.Printf("KEYWORD: len(config.NetworkConfig.ClusterNetworks)=%d\n", len(config.NetworkConfig.ClusterNetworks)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete this debug printf
} | ||
|
||
} else if len(config.NetworkConfig.ClusterNetworks) == 1 { | ||
fmt.Printf("KEYWORD: I THINK YOU ARE HERE!\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this line
} else if len(config.NetworkConfig.ClusterNetworks) == 1 { | ||
fmt.Printf("KEYWORD: I THINK YOU ARE HERE!\n") | ||
if config.NetworkConfig.DeprecatedHostSubnetLength != config.NetworkConfig.ClusterNetworks[0].HostSubnetLength && config.NetworkConfig.DeprecatedHostSubnetLength != 0 { | ||
fmt.Printf("\tKEYWORD: condif.NetworkConfig.DeprecatedHostsubnetLength: %d\n\tKEYWORD:config.NetworkConfig.ClusterNEtworks[0].HostSubnetLength:%d\n", config.NetworkConfig.DeprecatedHostSubnetLength, config.NetworkConfig.ClusterNetworks[0].HostSubnetLength) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
8b286d4
to
603136a
Compare
This is not backwards compatible - old config would be broken if you merged this. We don't drop support for old config without a new major api version. |
@pravisankar Yes this works with 'oc cluster up' |
/lgtm |
looks good |
@JacobTanenbaum what happens when there's old-style config? |
On Wed, Feb 21, 2018 at 11:11 AM, Dan Williams ***@***.***> wrote:
@JacobTanenbaum <https://github.com/jacobtanenbaum> what happens when
there's old-style config?
As part of conversions, it will be converted to new-style/internal config
… —
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#18669 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABM0hr27B8uTxJJjHEViopEy4-boVwHBks5tXGp1gaJpZM4SLKYa>
.
|
Copying for posterity: Jacob: I tested an old config file that just had the deprecated fields and it worked with this PR. I thought my changes to the conversion function changed the deprecated fields into the new struct internally. Unless my understanding is wrong old configs would only be wrong if a user tried to add the new clusterNetworks config struct while using the deprecated fields Clayton: Ok, I misread the PR then. If an old config file with only the old fields specified still works, then you can relax the requirement that the old field be specified. |
@knobunc @smarterclayton is there something I need to do to push this forward? |
…Length in master.networkConfig Currently in order for openshift to start the first entry in clusterNetworks and the old clusterNetworkCIDR/hostSubnetLength have to match. Change it so the older clusterNetworkCIDR/hostSubnetLength fields are no longer required. Bug 1534779
603136a
to
e5b0d93
Compare
/test extended_networking_minimal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve |
1 similar comment
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dcbw, JacobTanenbaum, knobunc, pravisankar The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
/retest Please review the full test history for this PR and help us cut down flakes. |
Automatic merge from submit-queue. |
Currently in order for openshift to start the first entry in clusterNetworks and the old clusterNetworkCIDR/hostSubnetLength have to match. Change it
so the older clusterNetworkCIDR/hostSubnetLength fields are no longer required.
Bug 1534779