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

Minor cleanups to sdn-cni-plugin #18418

Merged

Conversation

danwinship
Copy link
Contributor

Based on belated comments on #18355:

So what if we just stuff the PodIP into external-ids? Then we don't need to dump and parse flows all the time.

I had thought about that, but then we'd have to change ovs.Find() to return multiple columns (ofport and external-ids) and we'd have to parse the external-ids to separate out the sandboxID from the podIP. Though, admittedly, there's already code to parse external-ids in fake_ovs now anyway...

Also, we're only parsing a single flow now, because we request "in_port=%d" in the dump-flows.

Any reason to do [hostVeth] in the environment rather than just stuff it into the JSON by extending CNIRequest?

I actually did do it that way first, and then changed it. Something about adding a field to CNIRequest had weird unexpected side effects. IIRC, it would have required a whole bunch of changes to the unit tests or something like that.

But I can change it if you prefer.

@danwinship danwinship requested a review from dcbw February 2, 2018 21:02
@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Feb 2, 2018
@dcbw
Copy link
Contributor

dcbw commented Feb 2, 2018

I actually did do it that way first, and then changed it. Something about adding a field to CNIRequest had weird unexpected side effects. IIRC, it would have required a whole bunch of changes to the unit tests or something like that.

@danwinship hmm, just doing:

	// CNI configuration passed via stdin to the CNI plugin
	Config []byte `json:"config,omitempty"`
+	HostVeth string `json:"config,omitempty"`
}

doesn't seem to kill unit tests in pkg/network for me...

@danwinship danwinship force-pushed the sdn-out-of-process-cleanups branch from 6937f4f to 3fead8c Compare February 5, 2018 14:57
@openshift-ci-robot openshift-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 Feb 5, 2018
@danwinship
Copy link
Contributor Author

@dcbw: Hm... not sure what the problem was before, but yeah, it seems to work fine. Updated

@pravisankar
Copy link

/retest

Copy link

@pravisankar pravisankar left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@dcbw dcbw left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 26, 2018
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danwinship, dcbw

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-merge-robot
Copy link
Contributor

Automatic merge from submit-queue (batch tested with PRs 18737, 18418).

@openshift-merge-robot openshift-merge-robot merged commit 6c42efd into openshift:master Feb 26, 2018
@danwinship danwinship deleted the sdn-out-of-process-cleanups branch March 7, 2018 13:58
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. component/networking lgtm Indicates that a PR is ready to be merged. sig/networking 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.

5 participants