Commit Graph

38110 Commits (2f4cdd3f7eaafbd94691d36f46cb3051dbaefca4)

Author SHA1 Message Date
Kubernetes Submit Queue 2f4cdd3f7e Merge pull request #35560 from jingxu97/Oct/pd-tests
Automatic merge from submit-queue

Add a retry when reading a file content from a container

To avoid temporal failure in reading the file content, add a retry
process in function verifyPDContentsViaContainer
2016-10-28 23:51:37 -07:00
Kubernetes Submit Queue 5eefdb92c9 Merge pull request #35817 from luxas/fix_crossbuild
Automatic merge from submit-queue

Fix cadvisor_unsupported and the crossbuild

Resolves a bug in the `cadvisor_unsupported.go` code.
Fixes https://github.com/kubernetes/kubernetes/issues/35735

Introduced by: https://github.com/kubernetes/kubernetes/pull/35136
We should consider to cherrypick this as #35136 also was cherrypicked

cc @kubernetes/sig-testing @vishh @dashpole @jessfraz

```release-note
Fix cadvisor_unsupported and the crossbuild
```
2016-10-28 23:06:11 -07:00
Kubernetes Submit Queue 58457daf63 Merge pull request #31652 from intelsdi-x/poc-opaque-int-resources
Automatic merge from submit-queue

[PHASE 1] Opaque integer resource accounting.

## [PHASE 1] Opaque integer resource accounting.

This change provides a simple way to advertise some amount of arbitrary countable resource for a node in a Kubernetes cluster. Users can consume these resources by including them in pod specs, and the scheduler takes them into account when placing pods on nodes. See the example at the bottom of the PR description for more info.

Summary of changes:

- Defines opaque integer resources as any resource with prefix `pod.alpha.kubernetes.io/opaque-int-resource-`.
- Prevent kubelet from overwriting capacity.
- Handle opaque resources in scheduler.
- Validate integer-ness of opaque int quantities in API server.
- Tests for above.

Feature issue: https://github.com/kubernetes/features/issues/76

Design: http://goo.gl/IoKYP1

Issues:

kubernetes/kubernetes#28312
kubernetes/kubernetes#19082

Related:

kubernetes/kubernetes#19080

CC @davidopp @timothysc @balajismaniam 

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
Added support for accounting opaque integer resources.

Allows cluster operators to advertise new node-level resources that would be
otherwise unknown to Kubernetes. Users can consume these resources in pod
specs just like CPU and memory. The scheduler takes care of the resource
accounting so that no more than the available amount is simultaneously
allocated to pods.
```

## Usage example

```sh
$ echo '[{"op": "add", "path": "pod.alpha.kubernetes.io~1opaque-int-resource-bananas", "value": "555"}]' | \
> http PATCH http://localhost:8080/api/v1/nodes/localhost.localdomain/status \
> Content-Type:application/json-patch+json
```

```http
HTTP/1.1 200 OK
Content-Type: application/json
Date: Thu, 11 Aug 2016 16:44:55 GMT
Transfer-Encoding: chunked

{
    "apiVersion": "v1",
    "kind": "Node",
    "metadata": {
        "annotations": {
            "volumes.kubernetes.io/controller-managed-attach-detach": "true"
        },
        "creationTimestamp": "2016-07-12T04:07:43Z",
        "labels": {
            "beta.kubernetes.io/arch": "amd64",
            "beta.kubernetes.io/os": "linux",
            "kubernetes.io/hostname": "localhost.localdomain"
        },
        "name": "localhost.localdomain",
        "resourceVersion": "12837",
        "selfLink": "/api/v1/nodes/localhost.localdomain/status",
        "uid": "2ee9ea1c-47e6-11e6-9fb4-525400659b2e"
    },
    "spec": {
        "externalID": "localhost.localdomain"
    },
    "status": {
        "addresses": [
            {
                "address": "10.0.2.15",
                "type": "LegacyHostIP"
            },
            {
                "address": "10.0.2.15",
                "type": "InternalIP"
            }
        ],
        "allocatable": {
            "alpha.kubernetes.io/nvidia-gpu": "0",
            "cpu": "2",
            "memory": "8175808Ki",
            "pods": "110"
        },
        "capacity": {
            "alpha.kubernetes.io/nvidia-gpu": "0",
            "pod.alpha.kubernetes.io/opaque-int-resource-bananas": "555",
            "cpu": "2",
            "memory": "8175808Ki",
            "pods": "110"
        },
        "conditions": [
            {
                "lastHeartbeatTime": "2016-08-11T16:44:47Z",
                "lastTransitionTime": "2016-07-12T04:07:43Z",
                "message": "kubelet has sufficient disk space available",
                "reason": "KubeletHasSufficientDisk",
                "status": "False",
                "type": "OutOfDisk"
            },
            {
                "lastHeartbeatTime": "2016-08-11T16:44:47Z",
                "lastTransitionTime": "2016-07-12T04:07:43Z",
                "message": "kubelet has sufficient memory available",
                "reason": "KubeletHasSufficientMemory",
                "status": "False",
                "type": "MemoryPressure"
            },
            {
                "lastHeartbeatTime": "2016-08-11T16:44:47Z",
                "lastTransitionTime": "2016-08-10T06:27:11Z",
                "message": "kubelet is posting ready status",
                "reason": "KubeletReady",
                "status": "True",
                "type": "Ready"
            },
            {
                "lastHeartbeatTime": "2016-08-11T16:44:47Z",
                "lastTransitionTime": "2016-08-10T06:27:01Z",
                "message": "kubelet has no disk pressure",
                "reason": "KubeletHasNoDiskPressure",
                "status": "False",
                "type": "DiskPressure"
            }
        ],
        "daemonEndpoints": {
            "kubeletEndpoint": {
                "Port": 10250
            }
        },
        "images": [],
        "nodeInfo": {
            "architecture": "amd64",
            "bootID": "1f7e95ca-a4c2-490e-8ca2-6621ae1eb5f0",
            "containerRuntimeVersion": "docker://1.10.3",
            "kernelVersion": "4.5.7-202.fc23.x86_64",
            "kubeProxyVersion": "v1.3.0-alpha.4.4285+7e4b86c96110d3-dirty",
            "kubeletVersion": "v1.3.0-alpha.4.4285+7e4b86c96110d3-dirty",
            "machineID": "cac4063395254bc89d06af5d05322453",
            "operatingSystem": "linux",
            "osImage": "Fedora 23 (Cloud Edition)",
            "systemUUID": "D6EE0782-5DEB-4465-B35D-E54190C5EE96"
        }
    }
}
```

After patching, the kubelet's next sync fills in allocatable:

```
$ kubectl get node localhost.localdomain -o json | jq .status.allocatable
```

```json
{
  "alpha.kubernetes.io/nvidia-gpu": "0",
  "pod.alpha.kubernetes.io/opaque-int-resource-bananas": "555",
  "cpu": "2",
  "memory": "8175808Ki",
  "pods": "110"
}
```

Create two pods, one that needs a single banana and another that needs a truck load:

```
$ kubectl create -f chimp.yaml
$ kubectl create -f superchimp.yaml
```

Inspect the scheduler result and pod status:

```
$ kubectl describe pods chimp
Name:           chimp
Namespace:      default
Node:           localhost.localdomain/10.0.2.15
Start Time:     Thu, 11 Aug 2016 19:58:46 +0000
Labels:         <none>
Status:         Running
IP:             172.17.0.2
Controllers:    <none>
Containers:
  nginx:
    Container ID:       docker://46ff268f2f9217c59cc49f97cc4f0f085d5ac0e251f508cc08938601117c0cec
    Image:              nginx:1.10
    Image ID:           docker://sha256:82e97a2b0390a20107ab1310dea17f539ff6034438099384998fd91fc540b128
    Port:               80/TCP
    Limits:
      cpu:                                      500m
      memory:                                   64Mi
      pod.alpha.kubernetes.io/opaque-int-resource-bananas:   3
    Requests:
      cpu:                                      250m
      memory:                                   32Mi
      pod.alpha.kubernetes.io/opaque-int-resource-bananas:   1
    State:                                      Running
      Started:                                  Thu, 11 Aug 2016 19:58:51 +0000
    Ready:                                      True
    Restart Count:                              0
    Volume Mounts:                              <none>
    Environment Variables:                      <none>
Conditions:
  Type          Status
  Initialized   True 
  Ready         True 
  PodScheduled  True 
No volumes.
QoS Class:      Burstable
Events:
  FirstSeen     LastSeen        Count   From                            SubobjectPath           Type            Reason                  Message
  ---------     --------        -----   ----                            -------------           --------        ------                  -------
  9m            9m              1       {default-scheduler }                                    Normal          Scheduled               Successfully assigned chimp to localhost.localdomain
  9m            9m              2       {kubelet localhost.localdomain}                         Warning         MissingClusterDNS       kubelet does not have ClusterDNS IP configured and cannot create Pod using "ClusterFirst" policy. Falling back to DNSDefault policy.
  9m            9m              1       {kubelet localhost.localdomain} spec.containers{nginx}  Normal          Pulled                  Container image "nginx:1.10" already present on machine
  9m            9m              1       {kubelet localhost.localdomain} spec.containers{nginx}  Normal          Created                 Created container with docker id 46ff268f2f92
  9m            9m              1       {kubelet localhost.localdomain} spec.containers{nginx}  Normal          Started                 Started container with docker id 46ff268f2f92
```

```
$ kubectl describe pods superchimp
Name:           superchimp
Namespace:      default
Node:           /
Labels:         <none>
Status:         Pending
IP:
Controllers:    <none>
Containers:
  nginx:
    Image:      nginx:1.10
    Port:       80/TCP
    Requests:
      cpu:                                      250m
      memory:                                   32Mi
      pod.alpha.kubernetes.io/opaque-int-resource-bananas:   10Ki
    Volume Mounts:                              <none>
    Environment Variables:                      <none>
Conditions:
  Type          Status
  PodScheduled  False 
No volumes.
QoS Class:      Burstable
Events:
  FirstSeen     LastSeen        Count   From                    SubobjectPath   Type            Reason                  Message
  ---------     --------        -----   ----                    -------------   --------        ------                  -------
  3m            1s              15      {default-scheduler }                    Warning         FailedScheduling        pod (superchimp) failed to fit in any node
fit failure on node (localhost.localdomain): Insufficient pod.alpha.kubernetes.io/opaque-int-resource-bananas
```
2016-10-28 22:25:18 -07:00
Anirudh Ramanathan 2efdd9edc2 Merge pull request #35828 from timstclair/summary-test
Increase sys container usageBytes upper bound
2016-10-28 20:56:13 -07:00
Kubernetes Submit Queue beda882dce Merge pull request #35819 from vishh/gci-mounter-update
Automatic merge from submit-queue

Add netbase package to gci mounter container image

cc @rootfs @jingxu97
2016-10-28 20:45:16 -07:00
Jess Frazelle b610a5588d
Update CHANGELOG.md for v1.4.5. 2016-10-28 19:08:32 -07:00
Kubernetes Submit Queue 3e7172d49e Merge pull request #34859 from jingxu97/syncAttach-10-15
Automatic merge from submit-queue

Add sync state loop in master's volume reconciler

At master volume reconciler, the information about which volumes are
attached to nodes is cached in actual state of world. However, this
information might be out of date in case that node is terminated (volume
is detached automatically). In this situation, reconciler assume volume
is still attached and will not issue attach operation when node comes
back. Pods created on those nodes will fail to mount.
This PR adds the logic to periodically sync up the truth for attached
volumes kept in
the actual state cache. If the volume is no longer attached to the node,
the actual state will be updated to reflect the truth. In turn,
reconciler will take actions if needed.
To avoid issuing many concurrent operations on cloud provider, this PR
tries to add batch operation to check whether a list of volumes are
attached to the node instead of one request per volume.
2016-10-28 18:33:29 -07:00
Fabio Yeon 34d6df6893 Merge pull request #35825 from dchen1107/master
Bump GCE debian image to container-vm-v20161025 (CVE-2016-5195 Dirty…
2016-10-28 16:55:38 -07:00
Tim St. Clair 304dbd0e2e
Increase sys container usageBytes upper bound 2016-10-28 14:50:08 -07:00
Kubernetes Submit Queue bbe36f9186 Merge pull request #35812 from rmmh/owner-better
Automatic merge from submit-queue

Improve update_owners.py username detection and error message.

Fixes the root cause of #35808.
2016-10-28 14:44:38 -07:00
Kubernetes Submit Queue cf7178d7c3 Merge pull request #35572 from bprashanth/ip_gc
Automatic merge from submit-queue

GC pod ips

Finally managed to write a *failing* test. 
Supersedes https://github.com/kubernetes/kubernetes/pull/34373

```release-note
GC pod ips
```
2016-10-28 14:44:28 -07:00
Dawn Chen b29115658f Bump GCE debian image to container-vm-v20161025 (CVE-2016-5195 (Dirty COW)) 2016-10-28 14:23:49 -07:00
Vishnu Kannan 90053e34e2 Add netbase package to gci mounter container image
Signed-off-by: Vishnu Kannan <vishnuk@google.com>
2016-10-28 14:10:07 -07:00
Ryan Hitchman 20754c0f5c Improve update_owners.py username detection and error message.
Also, skip _output.
2016-10-28 13:23:19 -07:00
Lucas Käldström 00fda67931 Fix cadvisor_unsupported and the crossbuild 2016-10-28 22:57:16 +03:00
Kubernetes Submit Queue bc7ae399f8 Merge pull request #35737 from ixdy/remove-arch-binaries-from-kubernetes-full-tarball
Automatic merge from submit-queue

Stop including arch-specific binaries in kubernetes.tar.gz

**What this PR does / why we need it**:
This PR stops including the kubernetes client and server tarballs in `kubernetes.tar.gz`. These should instead be downloaded separately for only the required architectures.

The `cluster/get-kube.sh` (https://get.k8s.io) and `cluster/get-kube-binaries.sh` handle downloading and extracting the necessary binaries for you automatically. Jenkins also uses this workflow now.

Anyone still expecting binaries in kubernetes.tar.gz will be broken, but I've at least fixed all occurrences in-tree.

**Which issue this PR fixes**: fixes #28629, chips away at #28435

**Release note**:
```release-note
Arch-specific server and client binaries are no longer included in `kubernetes.tar.gz`. You must manually download the necessary architecture-specific tarballs or use `kubernetes/cluster/get-kube-binaries.sh` to download them for you.
```

cc @luxas @zmerlynn @justinsb @mikedanese @thockin @spxtr
2016-10-28 11:02:53 -07:00
Connor Doyle b0421c1ba4 Updated test owners file. 2016-10-28 10:28:50 -07:00
Connor Doyle c93646e8da Support opaque integer resource accounting.
- Prevents kubelet from overwriting capacity during sync.
- Handles opaque integer resources in the scheduler.
  - Adds scheduler predicate tests for opaque resources.
- Validates opaque int resources:
  - Ensures supplied opaque int quantities in node capacity,
    node allocatable, pod request and pod limit are integers.
  - Adds tests for new validation logic (node update and pod spec).
- Added e2e tests for opaque integer resources.
2016-10-28 10:15:13 -07:00
Kubernetes Submit Queue 1cba31af40 Merge pull request #35541 from foxish/deletions-safe-again
Automatic merge from submit-queue

Moving some force deletion logic from the NC into the PodGC

**What this PR does / why we need it**: Moves some pod force-deletion behavior into the PodGC, which is a better place for these.

This should be a NOP because we're just moving functionality
around and thanks to #35476, the podGC controller should always
run.

Related: https://github.com/kubernetes/kubernetes/pull/34160, https://github.com/kubernetes/kubernetes/issues/35145

cc @gmarek @kubernetes/sig-apps
2016-10-28 09:40:00 -07:00
Jing Xu abbde43374 Add sync state loop in master's volume reconciler
At master volume reconciler, the information about which volumes are
attached to nodes is cached in actual state of world. However, this
information might be out of date in case that node is terminated (volume
is detached automatically). In this situation, reconciler assume volume
is still attached and will not issue attach operation when node comes
back. Pods created on those nodes will fail to mount.

This PR adds the logic to periodically sync up the truth for attached volumes kept in the actual state cache. If the volume is no longer attached to the node, the actual state will be updated to reflect the truth. In turn, reconciler will take actions if needed.

To avoid issuing many concurrent operations on cloud provider, this PR
tries to add batch operation to check whether a list of volumes are
attached to the node instead of one request per volume.

More details are explained in PR #33760
2016-10-28 09:24:53 -07:00
Wojciech Tyczynski 96a26d93f5 Merge pull request #35789 from wojtek-t/fix_quota_backend_bytes
Fix wrong flag to etcd in kubemark
2016-10-28 17:08:12 +02:00
Wojciech Tyczynski 6a4a4bcf36 Fix wrong flag to etcd in kubemark 2016-10-28 15:54:15 +02:00
Kubernetes Submit Queue 1c677ed91e Merge pull request #35690 from gmarek/e2e2
Automatic merge from submit-queue

Create multiple namespaces in the Density test
2016-10-28 06:06:20 -07:00
Kubernetes Submit Queue 6ce128c4b1 Merge pull request #35606 from gmarek/scheduler
Automatic merge from submit-queue

Small cleanup of scheduler default algorithm provider

It's a no-op PR that just moves stuff around.
2016-10-28 06:06:11 -07:00
gmarek 30c78c8ab3 Create multiple namespaces in the Density test 2016-10-28 13:50:39 +02:00
Wojciech Tyczynski 2f756e4ebc Merge pull request #35766 from wojtek-t/backend_quota_bytes_kubemark
Increase backend-quota-bytes in kubemark
2016-10-28 12:14:21 +02:00
Kubernetes Submit Queue 14495fed7c Merge pull request #35717 from vishh/rkt-v1.18.0
Automatic merge from submit-queue

Update rkt version on GCI nodes to v1.18.0

v1.18.0 avoids outputting debug information by default which happens to
pollute events and kubelet logs.
2016-10-28 03:10:30 -07:00
Kubernetes Submit Queue 0b03a854b4 Merge pull request #35762 from mikedanese/dont-depend
Automatic merge from submit-queue

don't import pkg/client/unversioned when generating clients

This is causing weird dependency graphs in bazel and is no longer necessary.
2016-10-28 02:28:04 -07:00
Marek Grabowski 5ded63a635 Merge pull request #35763 from kubernetes/revert-35350-enable-gci-cmount
Revert "Enable containerized storage plugins mounter on GCI"
2016-10-28 10:32:23 +02:00
Wojciech Tyczynski 137d2398a8 Increase backend-quota-bytes in kubemark 2016-10-28 09:14:57 +02:00
Kubernetes Submit Queue 433848c18f Merge pull request #35753 from philips/remove-troubleshooting
Automatic merge from submit-queue

docs: remove troubleshooting
2016-10-27 23:57:41 -07:00
Kubernetes Submit Queue 2ff7e26796 Merge pull request #35674 from YuPengZTE/devIE
Automatic merge from submit-queue

"ie." is not the correct abbreviation for "ID EST"

**What this PR does / why we need it**:
"i.e." is the correct abbreviation for "ID EST"

Signed-off-by: yupeng <yu.peng36@zte.com.cn>
2016-10-27 23:57:33 -07:00
Marek Grabowski 765f7b9406 Revert "Enable containerized storage plugins mounter on GCI" 2016-10-28 08:41:43 +02:00
Mike Danese 799c099c65 don't import pkg/client/unversioned when generating clients 2016-10-27 23:39:27 -07:00
bprashanth 37bc34c567 periodically GC pod ips 2016-10-27 22:15:35 -07:00
Brandon Philips ae3bd5db4e docs: remove troubleshooting
Based on comment from @bgrant0607 https://github.com/kubernetes/kubernetes/pull/35544/files#r85368740
2016-10-27 21:42:28 -07:00
Kubernetes Submit Queue e37b7cbde0 Merge pull request #35663 from janetkuo/statefulset
Automatic merge from submit-queue

Rename PetSet to StatefulSet

<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://github.com/kubernetes/kubernetes/blob/master/CONTRIBUTING.md and developer guide https://github.com/kubernetes/kubernetes/blob/master/docs/devel/development.md
2. If you want *faster* PR reviews, read how: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md
3. Follow the instructions for writing a release note: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/pull-requests.md#release-notes
-->

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

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

**Special notes for your reviewer**: cc @erictune @foxish @kubernetes/sig-apps @ymqytw 

**Release note**:
<!--  Steps to write your release note:
1. Use the release-note-* labels to set the release note state (if you have access) 
2. Enter your extended release note in the below block; leaving it blank means using the PR title as the release note. If no release note is required, just write `NONE`. 
-->
```release-note
```
2016-10-27 20:16:50 -07:00
Kubernetes Submit Queue 37b3a8461c Merge pull request #35743 from rmmh/owner-self
Automatic merge from submit-queue

Make update_owners.py assign new tests to self by default.
2016-10-27 19:33:21 -07:00
Kubernetes Submit Queue 52988de1ee Merge pull request #35350 from vishh/enable-gci-cmount
Automatic merge from submit-queue

Enable containerized storage plugins mounter on GCI

```release-note
On GCI, kubelet uses an external mounter script (typically a special container running in a chroot) to perform mount operations
```
2016-10-27 19:33:13 -07:00
Kubernetes Submit Queue b98a990a31 Merge pull request #19343 from kargakis/perma-failed-deployments
Automatic merge from submit-queue

Add perma-failed deployments API

@kubernetes/deployment @smarterclayton 

API for https://github.com/kubernetes/kubernetes/issues/14519

Docs at https://github.com/kubernetes/kubernetes.github.io/pull/1337
2016-10-27 18:46:48 -07:00
Ryan Hitchman df04f33aa9 Make update_owners.py assign new tests to self by default. 2016-10-27 17:39:30 -07:00
Janet Kuo e0252f9be0 Update test owners 2016-10-27 17:25:46 -07:00
Janet Kuo 3febdb7f71 Remove petset from 1.4 generated client to pass import-boss verification 2016-10-27 17:25:10 -07:00
Janet Kuo 74dbfdca97 (Auto-gen) Run update-all.sh, codecgen, munge docs, and bazel 2016-10-27 17:25:10 -07:00
Janet Kuo f35a095b50 Manually remove previously generated petset client 2016-10-27 17:25:10 -07:00
Janet Kuo e9927664cf Remove unnecessary dependency in client-gen 2016-10-27 17:25:10 -07:00
Janet Kuo c2bf059bdc Manually remove generated.go 2016-10-27 17:25:10 -07:00
Janet Kuo 10aee82ae3 Rename PetSet API to StatefulSet 2016-10-27 17:25:10 -07:00
Kubernetes Submit Queue a266f72b34 Merge pull request #35730 from yujuhong/expand_benchmarks
Automatic merge from submit-queue

Add coreos and gci images to the node benchmark job
2016-10-27 16:47:19 -07:00
Kubernetes Submit Queue 0b9547f6ad Merge pull request #35668 from MrHohn/addon-manager-changelog
Automatic merge from submit-queue

Added Changelog to addon manager

From #35651.

It would be good to have this changelog recording who and when pushed a new image to gcr.io. I retrieved the information from the [commit history](https://github.com/kubernetes/kubernetes/commits/master/cluster/addons/addon-manager).

@mikedanese
2016-10-27 16:47:09 -07:00