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

pkg/cmd/render: use machineNetwork CIDR to validate bootstrap IP #191

Closed
wants to merge 4 commits into from

Conversation

hexfusion
Copy link
Contributor

@hexfusion hexfusion commented Feb 21, 2020

This PR adds validation for the IPs we collect from local interfaces of bootstrap node. Instead of taking the first IPv4 address or IPv6 (single stack). We attempt to parse the MachineCIDR from installer assets. We then validate if the IP address is part of this network.

To do this we are adding a new flag --cluster-network-file currently we pass the network-config
to the --cluster-config [1] This change will require installer update.

enhancements openshift/enhancements#228

[1] https://github.com/openshift/installer/blob/98773b31eca6002e6f44375118d9eae8467cd016/data/data/bootstrap/files/usr/local/bin/bootkube.sh.template#L135

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 21, 2020
@hexfusion hexfusion changed the title [wip] pkg/cmd/render: ipv6 improvements #190 [wip] pkg/cmd/render: ipv6 improvements Feb 21, 2020
@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 21, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hexfusion

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 Feb 21, 2020
@hexfusion hexfusion changed the title [wip] pkg/cmd/render: ipv6 improvements pkg/cmd/render: ipv6 improvements Feb 21, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 21, 2020
@hexfusion hexfusion mentioned this pull request Feb 21, 2020
37 tasks
@hexfusion
Copy link
Contributor Author

/skip

@hexfusion hexfusion changed the title pkg/cmd/render: ipv6 improvements [wip] pkg/cmd/render: ipv6 improvements Feb 22, 2020
@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Feb 22, 2020
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 23, 2020
@hexfusion hexfusion force-pushed the fix-ipv6-3 branch 2 times, most recently from db60c05 to b09208d Compare February 23, 2020 22:01
@openshift-ci-robot openshift-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 23, 2020
@hexfusion hexfusion force-pushed the fix-ipv6-3 branch 2 times, most recently from 957e956 to 697044f Compare February 23, 2020 22:06
@hexfusion hexfusion changed the title [wip] pkg/cmd/render: ipv6 improvements pkg/cmd/render: use machineNetwork CIDR to validate bootstrap IP Feb 23, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 23, 2020
@hexfusion
Copy link
Contributor Author

/hold

needs enhancement and a few tweaks I am trying to piviot this etcd spec to something more inline with what a revision from installer would lay down

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 24, 2020
@hexfusion
Copy link
Contributor Author

hexfusion commented Feb 24, 2020

I think the static pod might have to wait depending on if this is blocking for metal.

@openshift-ci-robot
Copy link

@hexfusion: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-azure 1fb6173 link /test e2e-azure

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

}
}

// depricated
Copy link
Contributor Author

Choose a reason for hiding this comment

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

deprecated ..

@@ -81,7 +85,8 @@ func (r *renderOpts) AddFlags(fs *pflag.FlagSet) {
fs.StringVar(&r.kubeClientAgentImage, "manifest-kube-client-agent-image", r.kubeClientAgentImage, "kube-client-agent manifest image")
fs.StringVar(&r.setupEtcdEnvImage, "manifest-setup-etcd-env-image", r.setupEtcdEnvImage, "setup-etcd-env manifest image")
fs.StringVar(&r.etcdDiscoveryDomain, "etcd-discovery-domain", r.etcdDiscoveryDomain, "etcd discovery domain")
fs.StringVar(&r.clusterConfigFile, "cluster-config-file", r.clusterConfigFile, "Openshift Cluster API Config file.")
fs.StringVar(&r.clusterNetworkFile, "cluster-config-file", r.clusterNetworkFile, "Openshift Cluster API Config file.") //TODO move back to normal values after installer change.
fs.StringVar(&r.clusterNetworkFile, "cluster-network-file", r.clusterNetworkFile, "Openshift Cluster Network API Config file.")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is intended so we can update the installer and still pass CI.

@hexfusion
Copy link
Contributor Author

/skip

@hexfusion
Copy link
Contributor Author

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 25, 2020
@hexfusion
Copy link
Contributor Author

/hold

I am afraid to merge with without IPv6 test

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 5, 2020
@openshift-ci-robot
Copy link

@hexfusion: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 9, 2020
@hexfusion
Copy link
Contributor Author

/close

@openshift-ci-robot
Copy link

@hexfusion: Closed this PR.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@hexfusion
Copy link
Contributor Author

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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants