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

not assign floating ip when there are multiple controller nodes #1276

Merged
merged 1 commit into from
Jul 26, 2022

Conversation

jichenjc
Copy link
Contributor

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1265

Special notes for your reviewer:

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squashed commits
  • if necessary:
    • includes documentation
    • adds unit tests

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 24, 2022
@netlify
Copy link

netlify bot commented Jun 24, 2022

Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!

Name Link
🔨 Latest commit 3c09540
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-openstack/deploys/62de4212248e270009d10850
😎 Deploy Preview https://deploy-preview-1276--kubernetes-sigs-cluster-api-openstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 24, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jichenjc

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 24, 2022
@jichenjc jichenjc force-pushed the bug/1265 branch 2 times, most recently from 16e7586 to 8b5c5d3 Compare June 24, 2022 03:14
@@ -153,6 +153,12 @@ openstack floating ip create <public network>

Note: Only user with admin role can create a floating IP with specific IP.

Note: When associate floating ip to a cluster with more than 1 controller nodes, the floating ip will be
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Note: When associate floating ip to a cluster with more than 1 controller nodes, the floating ip will be
Note: When associating a floating IP to a cluster with more than 1 controller node, the floating IP will be

@@ -153,6 +153,12 @@ openstack floating ip create <public network>

Note: Only user with admin role can create a floating IP with specific IP.

Note: When associate floating ip to a cluster with more than 1 controller nodes, the floating ip will be
associated to the first controller node and the other controller nodes doesn't have floating ip. When
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
associated to the first controller node and the other controller nodes doesn't have floating ip. When
associated to the first controller node and the other controller nodes have no floating IP assigned. When

pkg/cloud/services/networking/floatingip.go Outdated Show resolved Hide resolved
@jichenjc jichenjc force-pushed the bug/1265 branch 2 times, most recently from 00d20f1 to 297620f Compare June 29, 2022 04:29
// assign to portID, so it's already assigned and no need action
// the other is fp.PortID assigned to another fixed ip (the other control plane)
// so no actions for both situations
if len(fp.PortID) != 0 {
Copy link
Member

Choose a reason for hiding this comment

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

What do you think about doing this check in the machine reconciler instead, because networking.Service#AssociateFloatingIP is also called from other locations where we potentially want to reassign the FIP, even if it is already assigned to another port

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, updated ,thanks~

@jichenjc
Copy link
Contributor Author

@apricote please help check whether current way is better.. thanks

@apricote
Copy link
Member

/lgtm

The commit looks like a merge commit, might want to take a look at that.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 14, 2022
@jichenjc
Copy link
Contributor Author

The commit looks like a merge commit, might want to take a look at that.

not sure what's a merge commit??

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 14, 2022
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 24, 2022
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 24, 2022
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 25, 2022
@tobiasgiese
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 25, 2022
@jichenjc
Copy link
Contributor Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 26, 2022
@k8s-ci-robot k8s-ci-robot merged commit 49ffd32 into kubernetes-sigs:main Jul 26, 2022
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", 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.

Machine controller permanently moves Floating IPs over controllers
5 participants