Commit Graph

49 Commits (d5dcec5218da77b59e36a9a6aee05ff510dd6d91)

Author SHA1 Message Date
Kubernetes Submit Queue 178a5ff314 Merge pull request #50665 from xiangpengzhao/hardcode-to-const
Automatic merge from submit-queue (batch tested with PRs 50257, 50247, 50665, 50554, 51077)

Replace hard-code "cpu" and "memory" to consts

**What this PR does / why we need it**:
There are many places using hard coded "cpu" and "memory" as resource name. This PR replace them to consts.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:
/kind cleanup

**Release note**:

```release-note
NONE
```
2017-08-23 02:35:09 -07:00
Kubernetes Submit Queue bf69aafde8 Merge pull request #50376 from guangxuli/add_sig_prefix_to_e2e_test
Automatic merge from submit-queue (batch tested with PRs 50277, 50823, 50376, 50867)

Move e2e taints test file to sig-scheduling

**What this PR does / why we need it**:
Move taint test file to e2e scheduling and add sig-scheduling prefix.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
Ref Umbrella issue #49161

**Special notes for your reviewer**:

**Release note**:

none
2017-08-17 22:24:30 -07:00
Avesh Agarwal 6b5118e2b9 Remove duplicate unused function. 2017-08-16 16:10:58 -04:00
xiangpengzhao 1c4dbcf5ca Replace hard-code "cpu" and "memory" to consts 2017-08-16 16:37:50 +08:00
Gavin 411cbd03e9 Move taints e2e test to sig-scheduling
delete taints_test file

update BUILD

fix confict
2017-08-15 12:30:14 +08:00
Kevin f76ca1fb16 update clientset.Core() to clientset.CoreV1() in test 2017-08-14 16:53:55 +08:00
Jeff Grafton a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton 33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
vikaschoudhary16 189129c71d Add inter-pod-affinity integration tests and remove corresponding e2e tests
Signed-off-by: vikaschoudhary16 <choudharyvikas16@gmail.com>
2017-07-26 23:24:28 -04:00
Kubernetes Submit Queue 3f887171dd Merge pull request #49253 from Quentin-M/no_host_pred_test
Automatic merge from submit-queue (batch tested with PRs 49358, 49253)

Remove hostname label condition in SchedulerPredicates

**What this PR does / why we need it**:

```
validates that NodeSelector is respected if matching [Conformance]
validates that required NodeAffinity setting is respected if matching
```

The two tests above make the assumption that the node names are equal to the `kubernetes.io/hostname` labels. Unfortunately, this is not necessarily true all the time. For instance, when using the AWS Cloud Provider + Container Linux:
- The node name is set using the AWS SDK's `ec2.Instance.PrivateDnsName` and has the form `ip-10-0-35-57.ca-central-1.compute.internal` [[1](https://github.com/kubernetes/kubernetes/blob/v1.7.1/pkg/cloudprovider/providers/aws/aws.go#L3343-L3346)] [[2](https://raw.githubusercontent.com/aws/aws-sdk-go/master/service/ec2/api.go)]
- The node's hostname, however, is a simple call to `os.Hostname()`, itself reading `/proc/sys/kernel/hostname`, which contains what the AWS DHCP assigned to the instance, typically the hostname short-form: `ip-10-0-16-137`.  [[1](https://github.com/kubernetes/kubernetes/blob/v1.7.1/pkg/util/node/node.go#L43-L54)]

Consequently, we are trying to assign a pod to a node having the following label: `kubernetes.io/hostname=ip-10-0-35-57.ca-central-1.compute.internal` (in addition to the randomly generated label), whereas the actual label on the node is `kubernetes.io/hostname=ip-10-0-35-57`.

Furthermore, this inaccurate `kubernetes.io/hostname=<nodename>` condition is actually useless given we already match over a random label, that was assigned to that node. Later, the test ensures that the scheduled pod was scheduled to the right node by comparing the pod's node name and the node name we expected the pod to be on:

```
framework.ExpectNoError(framework.WaitForPodNotPending(cs, ns, labelPodName))
labelPod, err := cs.Core().Pods(ns).Get(labelPodName, metav1.GetOptions{})
framework.ExpectNoError(err)
Expect(labelPod.Spec.NodeName).To(Equal(nodeName))
```

The `k8s.io/apimachinery/pkg/types/nodename` data structure actually [warns](55bee3ad21/staging/src/k8s.io/apimachinery/pkg/types/nodename.go (L40-L43)) about the fact that the node name might be different than the hostname on AWS.

**Release note**:
```release-note
NONE
```
2017-07-24 21:31:08 -07:00
Kubernetes Submit Queue e0c537a453 Merge pull request #48847 from bsalamat/e2e_test_conversion
Automatic merge from submit-queue

Add an integration test library and some integration tests for scheduler

**What this PR does / why we need it**:

1. Add an integration test library (utils.go) for scheduler testing.
2. Cleaned up some of the tests in scheduler_test.go with the new integration test library.
3. Add priority_test.go with a couple of examples on how to test scheduler priority function in integration tests.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```

ref/ #48176

@kubernetes/sig-scheduling-pr-reviews 
@davidopp @k82cn @vikaschoudhary16
2017-07-21 08:44:43 -07:00
Bobby (Babak) Salamat 96010e7e7a Deleted the converted e2e tests 2017-07-20 14:40:32 -07:00
Quentin MACHU d4db482a45 Remove hostname label condition in SchedulerPredicates 2017-07-19 18:01:47 -07:00
Mike Danese 3c39173ee4 fixit: break sig-cluster-lifecycle tests into subpackage 2017-07-19 10:14:51 -07:00
Kubernetes Submit Queue 2faf7ff2bc Merge pull request #36238 from resouer/eclass-2-dev
Automatic merge from submit-queue (batch tested with PRs 48043, 48200, 49139, 36238, 49130)

Implement equivalence cache by caching and re-using predicate result

The last part of #30844, I opened a new PR instead of overwrite the old one because we changed some basic assumption by allowing invalidating equivalence cache item by individual predicate.

The idea of this PR is based on discussion in https://github.com/kubernetes/kubernetes/issues/32024

- [x]  Pods belong to same controllerRef considered to be equivalent
- [x] ` podFitsOnNode` will use cached predicate result if it's available
- [x] Equivalence cache will be updated when if a fresh new predicate is done
- [x] `factory.go` will invalid specific predicate cache(s) based on the object change
- [x] Since `schedule` and `bind` are async, we need to optimistically invalid affected cache(s) before `bind`
- [x] Fully unit test of affected files
- [x] e2e test to verify cache update/invalid workflow
- [x] performance test results

- [x] Some nits fixes related but expected to result in `needs-rebase` so they are split to: #36060 #35968 #37512

cc @wojtek-t @davidopp
2017-07-19 01:57:32 -07:00
Kubernetes Submit Queue 2492477f0d Merge pull request #49110 from xiangpengzhao/remove-annotation-affinity
Automatic merge from submit-queue (batch tested with PRs 49055, 49128, 49132, 49134, 49110)

Remove affinity annotations leftover

**What this PR does / why we need it**:
This is a further cleanup for affinity annotations, following #47869.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
ref: #47869

**Special notes for your reviewer**:
- I remove the commented test cases and just leave TODOs instead. I think converting these untestable test cases for now is not necessary. We can add new test cases in future.
- I remove the e2e test case `validates that embedding the JSON PodAffinity and PodAntiAffinity setting as a string in the annotation value work` because we have a test case `validates that InterPod Affinity and AntiAffinity is respected if matching` to test the same thing.

/cc @aveshagarwal @bsalamat  @gyliu513 @k82cn @timothysc 

**Release note**:

```release-note
NONE
```
2017-07-18 21:54:25 -07:00
Rohit Agarwal cad0fe599c Move GPU e2e tests under owning SIG. 2017-07-18 10:31:48 -07:00
Harry Zhang f817b8a6f6 Update generated bazel 2017-07-18 23:58:32 +08:00
Harry Zhang 0e8517875e Update factory.go informers to update equivalence cache
Fix tombstone

Add e2e to verify equivalence cache

Addressing nits in factory,go and e2e

Update build files
2017-07-18 23:55:01 +08:00
xiangpengzhao d9d3396566 Remove affinity annotations leftover 2017-07-18 19:42:52 +08:00
Jacob Simpson 29c1b81d4c Scripted migration from clientset_generated to client-go. 2017-07-17 15:05:37 -07:00
Kubernetes Submit Queue 0c74c36b70 Merge pull request #46930 from k82cn/sched_integ_test
Automatic merge from submit-queue (batch tested with PRs 47417, 47638, 46930)

Added scheduler integration test owners.

**What this PR does / why we need it**:
Add OWNER file into scheduler integration test.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # N/A

**Release note**:
```release-note-none
```
2017-07-16 16:33:05 -07:00
David Oppenheimer a836d55d0f Mark sig-scheduling tests with [sig-scheduling] so they can be selected
for the testdash dashboard.
2017-07-15 00:07:30 -07:00
Mike Danese dafad706af scheduler e2e: make container name shorter 2017-07-12 11:30:57 -07:00
Kubernetes Submit Queue b4e7628af1 Merge pull request #47329 from zhangxiaoyu-zidif/delete-meaningless-funcion-return
Automatic merge from submit-queue

Delete unused return

**What this PR does / why we need it**:
We do not use the function return, it's better not to write the return.

**Release note**:

```release-note
NONE
```
2017-07-08 02:46:43 -07:00
Klaus Ma 7541496a4f Updated OWNERS_ALIASES for scheduler, and added scheduler integration test owners. 2017-07-01 09:28:52 +08:00
Kubernetes Submit Queue 11b5956f7a Merge pull request #47628 from bizhao/e2e
Automatic merge from submit-queue (batch tested with PRs 45610, 47628)

Replace capacity with allocatable to calculate pod resource

It is not accurate to use capacity to do the calculation.



**What this PR does / why we need it**:
The currently cpu resource calculation for a pod in end2end test is incorrect.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
fixes #47627

**Special notes for your reviewer**:
More details about capacity and allocatable:
https://github.com/kubernetes/community/blob/master/contributors/design-proposals/node-allocatable.md

**Release note**:

NONE
2017-06-27 17:46:11 -07:00
Klaus Ma 0f0e104061 Checked whether balanced Pods were created. 2017-06-26 09:06:28 +08:00
Bobby (Babak) Salamat 6b949a1a6a Remove e2e test that checked scheduler priority function for ReplicationController spreading 2017-06-23 16:44:32 -07:00
Kubernetes Submit Queue 80a5842623 Merge pull request #47883 from bsalamat/e2e_test_cleanup
Automatic merge from submit-queue (batch tested with PRs 47883, 47179, 46966, 47982, 47945)

Remove e2e test for least requested prioirty function

**What this PR does / why we need it**:
Deletes a flaky e2e test for "least requested" priority function of the scheduler. This priority function is tested more extensively in our unit tests.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #47769 

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2017-06-23 15:48:35 -07:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Bobby (Babak) Salamat 1e5afd722c Remove e2e test for least requested prioirty function 2017-06-21 17:14:23 -07:00
Binbin Zhao 82cbbb4845 Fix a typo
Fix a typo
2017-06-21 01:15:55 -07:00
Binbin Zhao 9cbe992fc5 Also rename leftCapacity to leftAllocatable 2017-06-21 00:55:38 -07:00
Binbin Zhao b055246f0a Replace capacity with allocatable to calculate pod resource
It is not accurate to use capacity to do the calculation.
2017-06-15 20:05:15 -07:00
zhangxiaoyu-zidif f244e3cb7c delete unused return 2017-06-13 19:48:42 +08:00
Kris 2ab0320745 Switch all e2es to the ginkgo wrapper 2017-06-12 14:40:11 -07:00
Klaus Ma 68a34c1baf Added k82cn as kube-scheduler approver. 2017-05-26 22:26:20 +08:00
gmarek 99142b8911 Make SchedulerPredicates test more resiliant to recent Node restarts 2017-05-10 17:11:29 +02:00
Haoran Wang 55acc00626 Add debug info for scheduler priority flaky tests 2017-04-26 18:45:35 +08:00
Chao Xu 4f9591b1de move pkg/api/v1/ref.go and pkg/api/v1/resource.go to subpackages. move some functions in resource.go to pkg/api/v1/node and pkg/api/v1/pod 2017-04-17 11:38:11 -07:00
Chao Xu d4850b6c2b move pkg/api/v1/helpers.go to subpackage 2017-04-14 14:25:11 -07:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Haoran Wang 0b3a6c80ca Initial the scheduler priority test 2017-03-30 10:54:27 +08:00
Wojciech Tyczynski 2e3cd93fc8 Fix problems of not-starting image pullers 2017-03-28 11:05:57 +02:00
Bobby Salamat 2775a52e7a Fix waitForScheduler in scheduer predicates e2e tests 2017-03-15 17:21:35 -07:00
Connor Doyle 4f847cb440 Move e2e sched event predicates to new file. 2017-03-14 15:20:27 -07:00
Timothy St. Clair 6cc40678b6 Initial breakout of scheduling e2es to help assist in both assignment
and refactoring.
2017-03-13 22:34:57 -05:00