Navigation Menu

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

Kill plugin script #12145

Merged
merged 2 commits into from Mar 27, 2017
Merged

Conversation

danwinship
Copy link
Contributor

The CNI port already got us most of the way there. This moves the remaining bits of pod setup/teardown into go rather than shell script.

(I started this a long time ago, and finished it now because of #11990.)

@openshift/networking PTAL

return otx.EndTransaction()
}

func (m *podManager) setupPodBandwidth(pod *kapi.Pod, hostVeth string) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these methods actually related? If all you're accessing is m.ovs taking ovs as an argument is just as good. We generally lean from a style perspective on not creating grouping types unless there is an actual "group".

@danwinship
Copy link
Contributor Author

@smarterclayton like that?

return otx.EndTransaction()
}

func setupPodBandwidth(ovsif *ovs.Interface, pod *kapi.Pod, hostVeth string) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, looks good. I find a lot of the time it's easy to "over OO" stuff, and I think for many functions you end up with more testable and less coupled code.

@dcbw
Copy link
Member

dcbw commented Dec 7, 2016

@danwinship So generally LGTM, though we'll have the same upgrade problem when a master+node host is updated, since the RPM changes remove the script. Then pods on that node will fail because the script doesn't exist. Maybe we just keep the script around in the RPM (I'm pretty sure we don't need it in the images, just in the specfile) for one more release?

@danwinship
Copy link
Contributor Author

Maybe we just keep the script around in the RPM (I'm pretty sure we don't need it in the images, just in the specfile) for one more release?

openshift doesn't care where the script is as long as it's in $PATH, so we could have the update process copy it from /usr/bin to /usr/local/bin before upgrading the RPM, and then delete it after restarting the node service

@danwinship
Copy link
Contributor Author

(re-push is just to squash the fixup)

@smarterclayton
Copy link
Contributor

smarterclayton commented Dec 7, 2016 via email

@knobunc
Copy link
Contributor

knobunc commented Dec 7, 2016 via email

@danwinship
Copy link
Contributor Author

(keeps your dirty laundry secret)

It's not clear whose dirty laundry it is; leaving openshift running while changing the rpm out from under it is kind of dirty on their part. But sure, we can leave the script around.

Do we only support single version upgrades?

yes

@smarterclayton
Copy link
Contributor

smarterclayton commented Dec 9, 2016 via email

@danwinship
Copy link
Contributor Author

[test][testextended][extended:networking]

@danwinship danwinship force-pushed the kill-plugin-script branch 2 times, most recently from a566dfa to f1efa1b Compare December 20, 2016 14:38
@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 13, 2017
@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 13, 2017
@danwinship
Copy link
Contributor Author

Are we going to try to get this in for 3.5? (It's not a feature so I guess it's not subject to the "feature freeze" deadline anyway, but...)

@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 30, 2017
@danwinship danwinship force-pushed the kill-plugin-script branch 3 times, most recently from ee7ac04 to dd197f1 Compare February 21, 2017 19:23
@danwinship
Copy link
Contributor Author

Rebased and repushed now that the tree is open for 3.6. Also changed it to make it continue installing the now-unused script, to avoid problems during upgrade. We can remove it completely for 3.7.

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

flake #12855, [testextended]

@danwinship
Copy link
Contributor Author

@openshift/networking the test failures will be fixed by #13061 when it lands. This is ready for review.

}

if ovsEgress > 0 {
qos, err := ovsif.Create("qos", "type=linux-htb", fmt.Sprintf("other-config:max-rate=%d", ovsEgress))

Choose a reason for hiding this comment

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

Where is the code equivalent to "ip link set dev ${veth_host} qlen 1000" in openshift-sdn-ovs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah, i think this branch originally predates that addition and I must have missed it when rebasing

ovsEgress = podIngress.Value()
}
if podEgress != nil {
ovsIngress = podEgress.Value() / 1024

Choose a reason for hiding this comment

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

is it /1024 or /1000? 1024 might be right (we are using 1000 in openshift-sdn-ovs)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, yeah, I saw 1000 in openshift-sdn-ovs but assumed it was probably wrong and should be 1024. @dcbw?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ovs docs say "ingress_policing_rate: ... Maximum rate for data received on this interface, in kbps." so 1024 is correct

@pravisankar
Copy link

Added couple of comments, rest of the code LGTM.
Need to resolve some merge conflicts

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

Rebased and added in the qlen thing (and did another check to see if I'd missed anything when rebasing, and didn't see anything). It seems that the netlink library used for all the other /sbin/ip stuff in pod_linux.go doesn't let you do "set qlen" (even if we updated to the latest git) so I had to use ipcmd instead.

@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 8, 2017
@openshift-bot
Copy link
Contributor

Evaluated for origin testextended up to b4cac9e

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to b4cac9e

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/160/) (Base Commit: 3febe97)

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/testextended SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin_extended/19/) (Base Commit: 3febe97) (Extended Tests: networking)

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

@danwinship
Copy link
Contributor Author

[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to b4cac9e

@openshift-bot
Copy link
Contributor

openshift-bot commented Mar 27, 2017

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/205/) (Base Commit: d260e80) (Image: devenv-rhel7_6104)

@openshift-bot openshift-bot merged commit 8dfe5dd into openshift:master Mar 27, 2017
@danwinship danwinship deleted the kill-plugin-script branch March 27, 2017 18:27
openshift-merge-robot added a commit that referenced this pull request Aug 8, 2017
Automatic merge from submit-queue

Remove no-longer-used openshift-sdn-ovs script

This script was not used in 3.6; it was only present to help 3.5->3.6 upgrades work and can now be removed. (#12145 (comment))
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.

None yet

6 participants