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

SDN cleanup; kill "Registry" type #10924

Merged
merged 5 commits into from
Sep 27, 2016

Conversation

danwinship
Copy link
Contributor

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

node.networkInfo, err = parseNetworkInfo(cn.Network, cn.ServiceNetwork)
if err != nil {
return err
}
Copy link
Contributor

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.

@dcbw
Copy link
Contributor

dcbw commented Sep 15, 2016

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()
Copy link

@pravisankar pravisankar Sep 15, 2016

Choose a reason for hiding this comment

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

"spec.nodeName"

Copy link
Contributor Author

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.

Copy link
Contributor

@liggitt liggitt Sep 16, 2016

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()
Copy link

@pravisankar pravisankar Sep 15, 2016

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
}

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.

@pravisankar
Copy link

Overall LGTM

@danwinship
Copy link
Contributor Author

added back the removed getNetworkInfo() function and added a new commit fixing the deprecated field name.
[test]

@smarterclayton
Copy link
Contributor

With the networking tests disabled, do you have a clean local run of the extended suite?

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 19, 2016
@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 19, 2016
@danwinship
Copy link
Contributor Author

With the networking tests disabled, do you have a clean local run of the extended suite?

test/extended/conformance.sh doesn't pass locally even in master

@danwinship
Copy link
Contributor Author

danwinship commented Sep 19, 2016

[test][extended:all]

@danwinship
Copy link
Contributor Author

@marun
Copy link
Contributor

marun commented Sep 20, 2016

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.

@danwinship
Copy link
Contributor Author

after (locally) rebasing on top of #11039, extended networking tests pass

@dcbw
Copy link
Contributor

dcbw commented Sep 22, 2016

Changes for my comments LGTM and this is tested. [merge]

@dcbw
Copy link
Contributor

dcbw commented Sep 22, 2016

flakes all around:
#9548
#9490
#10765
#11008

@dcbw
Copy link
Contributor

dcbw commented Sep 22, 2016

[merge]

@dcbw
Copy link
Contributor

dcbw commented Sep 22, 2016

flake city [merge]

@dcbw
Copy link
Contributor

dcbw commented Sep 23, 2016

Deploymentconfig flake #11016 again

@danwinship
Copy link
Contributor Author

you have to say [merge] again when you identify the flake #11016 or openshift-bot won't realize you're talking to it

@dcbw
Copy link
Contributor

dcbw commented Sep 23, 2016

@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.

@danwinship
Copy link
Contributor Author

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

@openshift-bot
Copy link
Contributor

openshift-bot commented Sep 25, 2016

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.
@openshift-bot
Copy link
Contributor

Evaluated for origin test up to eca63da

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to eca63da

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/9363/)

@openshift-bot openshift-bot merged commit 4750429 into openshift:master Sep 27, 2016
@danwinship danwinship deleted the kill-registry branch September 27, 2016 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants