Skip to content
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

Merged
merged 3 commits into from
Mar 26, 2018

Conversation

JacobTanenbaum
Copy link
Contributor

@JacobTanenbaum JacobTanenbaum commented Feb 19, 2018

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

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 19, 2018
@JacobTanenbaum JacobTanenbaum changed the title Remove requirement of having deprecated clusterNetworkCIDR/hostSubnet… Remove requirement of having deprecated clusterNetworkCIDR/hostSubnetLength in master.networkConfig Feb 19, 2018
@JacobTanenbaum
Copy link
Contributor Author

@pravisankar PTAL

@pravisankar pravisankar added component/networking kind/bug Categorizes issue or PR as related to a bug. labels Feb 20, 2018
Copy link

@pravisankar pravisankar left a 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))

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")

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)

Choose a reason for hiding this comment

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

same here

@smarterclayton
Copy link
Contributor

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.

@JacobTanenbaum
Copy link
Contributor Author

@pravisankar Yes this works with 'oc cluster up'

@pravisankar
Copy link

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 21, 2018
@imcsk8
Copy link
Contributor

imcsk8 commented Feb 21, 2018

looks good

@dcbw
Copy link
Contributor

dcbw commented Feb 21, 2018

@JacobTanenbaum what happens when there's old-style config?

@pravisankar
Copy link

pravisankar commented Feb 21, 2018 via email

@pravisankar
Copy link

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.

@JacobTanenbaum
Copy link
Contributor Author

@knobunc @smarterclayton is there something I need to do to push this forward?

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 8, 2018
…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
@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 8, 2018
@openshift-merge-robot openshift-merge-robot removed the lgtm Indicates that a PR is ready to be merged. label Mar 8, 2018
@JacobTanenbaum
Copy link
Contributor Author

/test extended_networking_minimal

Copy link

@pravisankar pravisankar left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 8, 2018
@dcbw
Copy link
Contributor

dcbw commented Mar 20, 2018

/approve

1 similar comment
@knobunc
Copy link
Contributor

knobunc commented Mar 26, 2018

/approve

@openshift-ci-robot
Copy link

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 26, 2018
@openshift-merge-robot
Copy link
Contributor

/test all [submit-queue is verifying that this PR is safe to merge]

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue.

@openshift-merge-robot openshift-merge-robot merged commit 5fbfe32 into openshift:master Mar 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. component/networking kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants