kubernetes-retired / poseidon

[EOL] A Firmament-based Kubernetes scheduler
http://www.firmament.io
Apache License 2.0
410 stars 78 forks source link

Adding Max-pods Feature in Poseidon/Firmament. #166

Closed shivramsrivastava closed 5 years ago

shivramsrivastava commented 5 years ago

Adding the max-pods feature in Poseidon/Firmament. This feature also adds a new informer which monitors the pods scheduled by other scheduler, since those counts are also required to calculate the max-pods limit on a certain node.

k8s-ci-robot commented 5 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: shivramsrivastava

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: - ~~[OWNERS](https://github.com/kubernetes-sigs/poseidon/blob/master/OWNERS)~~ [shivramsrivastava] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
k8s-ci-robot commented 5 years ago

Hi @shivramsrivastava. Thanks for your PR.

I'm waiting for a kubernetes-sigs or kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
m1093782566 commented 5 years ago

/ok-to-test

shivramsrivastava commented 5 years ago

We can run the default scheduler test-case for Poseidon, that has the max-pods test case too.

Follow the below steps 1) Create a k8s cluster. 2) Remove the default scheduler from the cluster. 3) Run 'Poseidon' with the flag --defaultBehaviour=true 4) Run the sig-scheduling test case.

All those test cases will be run against 'Poseidon/Firmament' scheduler.

We didn't add those test case since the time taken for max-pods is huge, and it increases our PR test and merge time a lot. The test creates 110 pods per node and by default if we have three node setup then it will create 330 pods and then create an additional pod which should be scheduled by the scheduler since the max-pods limit on all the nodes have exceeded.

shivramsrivastava commented 5 years ago

Locally verify passes.

$ make verify
Skipping verify-all.sh
Verifying verify-bazel.sh

+++ Running case: verify.bazel 
+++ working dir: /home/ubuntu/e2etest/src/github.com/kubernetes-sigs/poseidon
+++ command: bash "hack/make-rules/../../hack/verify-bazel.sh"
Loading: 
Loading: 0 packages loaded
INFO: Analysed target //:gazelle (0 packages loaded).
INFO: Found 1 target...
[0 / 1] [-----] BazelWorkspaceStatusAction stable-status.txt
Target //:gazelle up-to-date:
  bazel-bin/linux_amd64_stripped/gazelle_script.bash
  bazel-bin/gazelle
INFO: Elapsed time: 0.331s, Critical Path: 0.00s
INFO: Build completed successfully, 1 total action

INFO: Running command line: bazel-bin/gazelle -mode diff
+++ exit code: 0
SUCCESS  verify-bazel.sh    1s
Verifying verify-boilerplate.sh

+++ Running case: verify.boilerplate 
+++ working dir: /home/ubuntu/e2etest/src/github.com/kubernetes-sigs/poseidon
+++ command: bash "hack/make-rules/../../hack/verify-boilerplate.sh"
+++ exit code: 0
SUCCESS  verify-boilerplate.sh  0s
Verifying verify-gofmt.sh

+++ Running case: verify.gofmt 
+++ working dir: /home/ubuntu/e2etest/src/github.com/kubernetes-sigs/poseidon
+++ command: bash "hack/make-rules/../../hack/verify-gofmt.sh"
+++ exit code: 0
SUCCESS  verify-gofmt.sh    1s
Verifying verify-govet.sh

+++ Running case: verify.govet 
+++ working dir: /home/ubuntu/e2etest/src/github.com/kubernetes-sigs/poseidon
+++ command: bash "hack/make-rules/../../hack/verify-govet.sh"
Skipping generated files....
+++ exit code: 0
SUCCESS  verify-govet.sh    2s
Skipping verify-linkcheck.sh
Verifying verify-spelling.sh

+++ Running case: verify.spelling 
+++ working dir: /home/ubuntu/e2etest/src/github.com/kubernetes-sigs/poseidon
+++ command: bash "hack/make-rules/../../hack/verify-spelling.sh"
+++ exit code: 0
SUCCESS  verify-spelling.sh 1s
deepak-vij commented 5 years ago

/lgtm

m1093782566 commented 5 years ago

@shivramsrivastava

I still think we need automated test cases.

deepak-vij commented 5 years ago

@j

@shivramsrivastava

I still think we need automated test cases.

It is done now. Thanks.

m1093782566 commented 5 years ago

Thanks @deepak-vij