-
Notifications
You must be signed in to change notification settings - Fork 610
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
[occm] consider private network names when node contains IPs from other private networks #1041
Conversation
Hi @kayrus. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/assign @lingxiankong |
Build succeeded.
|
Build failed.
|
6fec385
to
7aa1b83
Compare
Build succeeded.
|
Build failed.
|
Build succeeded.
|
Build failed.
|
@kayrus I can confirm that this fixes #1039
Thanks ! |
Build succeeded.
|
Build succeeded.
|
/ok-to-test |
@kayrus: The
Use In response to this:
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. |
@kayrus: The
Use In response to this:
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. |
test cloud-provider-openstack-acceptance-test-csi-cinder |
test cloud-provider-openstack-unittest |
retest cloud-provider-openstack-acceptance-test-csi-cinder |
/retest cloud-provider-openstack-unittest |
@kayrus: The
Use In response to this:
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. |
Build succeeded.
|
Build succeeded.
|
Build succeeded.
|
Build succeeded.
|
Build failed.
|
/test cloud-provider-openstack-acceptance-test-e2e-conformance |
@kayrus: The specified target(s) for
Use In response to this:
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. |
Build succeeded.
|
addressType = v1.NodeExternalIP | ||
} else if util.Contains(networkingOpts.PublicNetworkName, network) { | ||
addressType = v1.NodeExternalIP | ||
RemoveFromNodeAddresses(&addrs, |
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.
Why the address is removed here if the network name is included in PublicNetworkName?
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.
@zuzzas could you please explain your test case?
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.
It may be present in the fixed IPs and erroneously counted as an InternalIP. We remove it and add again as a proper ExternalIP address.
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.
@zuzzas I'm still confused, in which case It may be present in the fixed IPs and erroneously counted as an InternalIP
?
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.
Without the proposed patch, in the following situation, 10.220.213.38
will be counted both as InternalIP
and ExternalIP
. It does not look right, since we've explicitly designated in the CCM's configuration the network BGP-VLAN-3894
with this IP as public
.
$ openstack --debug server show f4a319e6-95fb-445a-ac2d-a6374264d6c1
{
"server": {
"addresses": {
"BGP-VLAN-3894": [
{
"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:42:95:9f",
"version": 4,
"addr": "10.220.213.157",
"OS-EXT-IPS:type": "fixed"
}
],
"e2e": [
{
"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:6c:f6:bb",
"version": 4,
"addr": "192.168.199.52",
"OS-EXT-IPS:type": "fixed"
}
]
}
}
}
$ nova --debug interface-list f4a319e6-95fb-445a-ac2d-a6374264d6c1
{
"interfaceAttachments": [
{
"port_id": "08368bb9-1021-4f08-a318-44bade127942",
"port_state": "ACTIVE",
"tag": null,
"mac_addr": "fa:16:3e:42:95:9f",
"fixed_ips": [
{
"subnet_id": "728ca9da-da11-4076-ac32-c47a18693c5c",
"ip_address": "10.220.213.157"
}
],
"net_id": "a30dbaf7-dd86-4c67-aaa5-42c4fdf33e2a"
},
{
"port_id": "8cc3d233-89ae-4e06-aed8-5b92cea3b5a4",
"port_state": "ACTIVE",
"tag": null,
"mac_addr": "fa:16:3e:6c:f6:bb",
"fixed_ips": [
{
"subnet_id": "b33a5f97-3924-4f8d-ad8c-10d5b08f81aa",
"ip_address": "192.168.199.52"
}
],
"net_id": "847533ef-13bd-4655-a9b3-812b5ba1e3e0"
}
]
}
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.
Does BGP-VLAN-3894
exist in the output of openstack network list --external
command?
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.
aks@aks-ThinkPad-X230:~$ openstack network list --external
+--------------------------------------+---------------+--------------------------------------+
| ID | Name | Subnets |
+--------------------------------------+---------------+--------------------------------------+
| a30dbaf7-dd86-4c67-aaa5-42c4fdf33e2a | BGP-VLAN-3894 | 728ca9da-da11-4076-ac32-c47a18693c5c |
| c153f6b2-c186-4828-b98c-9cbd79f13621 | VLAN-3502 | 6dc455a0-f44c-4d9a-9d10-8557c4d38f53 |
+--------------------------------------+---------------+--------------------------------------+```
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.
@zuzzas that's pretty weird, according to the console output you provided above,
"BGP-VLAN-3894": [
{
"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:42:95:9f",
"version": 4,
"addr": "10.220.213.157",
"OS-EXT-IPS:type": "fixed"
}
],
BGP-VLAN-3894
should be an internal Neutron network.
Nevermind, it's not harmful to add that logic, do you mind adding some comments for Line 751 before we merge this PR?
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.
I'd launch a full-blown investigation into this peculiarity. Alas, it is a public OpenStack from Mail.ru Cloud Solutions.
Sure.
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.
It is done.
Added comment
Build succeeded.
|
Build succeeded.
|
Build succeeded.
|
Build succeeded.
|
Build succeeded.
|
/lgtm Thanks! |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ramineni 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 |
@zuzzas, thanks for this PR |
…er private networks (kubernetes#1041) * OCCM: consider network names, when specified * Move v1 helper functions into openstack_instances.go * [occm] Address detection logic fixes Signed-off-by: Andrey Klimentyev <andrey.klimentyev@flant.com> * Typo fix * Move LB related helpers into occm package * Added comment Co-authored-by: Andrey Klimentyev <andrey.klimentyev@flant.com>
What this PR does / why we need it:
If there is a private network name specified for nodes and the IP list contains IPs from a different private network, they have to be ignored by OCCM.
Which issue this PR fixes(if applicable):
fixes #1039
Special notes for reviewers:
Cherry-pick candidate for branch release-1.18
Release note:
@gdetal try this PR in your environment and let me know if it works fine for your case.