Remove requirement of having deprecated clusterNetworkCIDR/hostSubnetLength in master.networkConfig#18669
Conversation
|
@pravisankar PTAL |
pravisankar
left a comment
There was a problem hiding this comment.
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)) |
| } | ||
|
|
||
| } else if len(config.NetworkConfig.ClusterNetworks) == 1 { | ||
| fmt.Printf("KEYWORD: I THINK YOU ARE HERE!\n") |
| } 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) |
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 |
|
/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 DetailsNeeds 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