-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
SDN cleanup; kill "Registry" type #10924
Conversation
18adec7
to
dcc80f8
Compare
node.networkInfo, err = parseNetworkInfo(cn.Network, cn.ServiceNetwork) | ||
if err != nil { | ||
return err | ||
} |
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.
This all could be a helper function that returns cn, netinfo, and err. It's also used in proxy.go.
Generally LGTM |
@@ -124,7 +133,24 @@ func (node *OsdnNode) Start() error { | |||
} | |||
|
|||
func (node *OsdnNode) GetLocalPods(namespace string) ([]kapi.Pod, error) { | |||
return node.registry.GetRunningPods(node.hostName, namespace) | |||
fieldSelector := fields.Set{"spec.host": node.hostName}.AsSelector() |
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.
"spec.nodeName"
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.
hm... actually, it's referring to a deprecated v1.PodSpec field which was replaced with "nodeName", not "hostname", which is apparently something slightly different.
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.
that's the same field (deprecated version and current version), though the assumption that it is a hostname has always been tenuous and caused problems in some cloud providers. there is work in progress upstream to record the actual node hostname in the node status, and make the master honor that when connecting to the node
@@ -153,13 +155,32 @@ func getScriptError(output []byte) string { | |||
return string(output) | |||
} | |||
|
|||
func (plugin *OsdnNode) getPod(nodeName, namespace, podName string) (*kapi.Pod, error) { | |||
fieldSelector := fields.Set{"spec.host": nodeName}.AsSelector() |
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.
"spec.nodeName"
proxy.networkInfo, err = parseNetworkInfo(cn.Network, cn.ServiceNetwork) | ||
if err != nil { | ||
return err | ||
} |
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.
As @dcbw suggested, we could add a helper method to fetch and parse networkInfo.
Overall LGTM |
dcc80f8
to
86905ea
Compare
added back the removed getNetworkInfo() function and added a new commit fixing the deprecated field name. |
86905ea
to
a6df5b6
Compare
With the networking tests disabled, do you have a clean local run of the extended suite? |
a6df5b6
to
18a4d0b
Compare
18a4d0b
to
7d12cde
Compare
test/extended/conformance.sh doesn't pass locally even in master |
[test][extended:all] |
https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/8995/ flakes #9490 and #10951 |
It should be possible to get a clean local run with #10972. A clean ci run won't be possible until I figure out the cert issue. |
after (locally) rebasing on top of #11039, extended networking tests pass |
Changes for my comments LGTM and this is tested. [merge] |
[merge] |
flake city [merge] |
7d12cde
to
0b722ca
Compare
Deploymentconfig flake #11016 again |
you have to say [merge] again when you identify the flake #11016 or openshift-bot won't realize you're talking to it |
@danwinship yeah I know, but I was going to hold off until something is done about #11016 since it's killing a lot of our PRs right now. Until that gets fixed I don't think another merge will be useful. |
some merges have made it through... but anyway, it looks like we didn't need a re-tag anyway because it's still in the merge queue |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/9363/) (Image: devenv-rhel7_5085) |
Rather than implicitly caching NetworkInfo in the Registry, explicitly cache it in the node/master/proxy objects.
Nothing needs to have the other info cached
This used to be an abstraction between kclient-based access and direct etcd access, back when openshift-sdn could be compiled standalone, but now it's just cruft.
0b722ca
to
eca63da
Compare
Evaluated for origin test up to eca63da |
Evaluated for origin merge up to eca63da |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/9363/) |
As discussed elsewhere recently, pkg/sdn/plugin/registry.go is a relic of the old standalone openshift-sdn (and not even in a way that would be useful for a future standalone openshift-sdn), so this gets rid of it (and manages to have less total code in the end).
@openshift/networking PTAL