Skip to content

Instantly share code, notes, and snippets.

View resouer's full-sized avatar
🏡
Sunnyvale

Lei Zhang (Harry) resouer

🏡
Sunnyvale
View GitHub Profile
@resouer
resouer / gist:6ad3ec445cdab0ab3a8e5149a734d294
Created October 21, 2016 12:19
infra container in cri-o
cri-o中infra container的处理,都在server/sandbox.go里。
infra container即pod/sandbox,名字是:sandbox.name + "-infra"
infra container的管理逻辑是由kubelet控制的,调用crio的sandbox方法,比如下面的:
RunPodSandbox
负责hold network namespace of pod,所以需要处理:
1. set DNS option
2. mount /etc/resolv.conf
@resouer
resouer / Node taint tolerant
Last active December 19, 2016 04:50
maintain a node
// taint节点,阻止新的pod上来
kubectl taint nodes node08 dedicated=maintaining:NoSchedule
// label节点,只允许指定的pod上来
kubectl label nodes node08 hyper/nodetype=maintaining
// 然后在Pod定义中加入如下annotation:
```
annotations:
scheduler.alpha.kubernetes.io/tolerations: '[{"key":"dedicated", "value":"maintaining"}]'
scheduler.alpha.kubernetes.io/affinity: >
Log file created at: 2017/03/21 08:08:05
Running on machine: frakti-e2e
Binary: Built with gc go1.7.3 for linux/amd64
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
F0321 08:08:05.304607 31421 hyperd.go:173] Hyper serve RPC error: accept tcp 127.0.0.1:22318: use of closed network connection
goroutine 256 [running]:
github.com/hyperhq/hyperd/vendor/github.com/golang/glog.stacks(0xc420024001, 0xc4212ed200, 0x459, 0x2710)
/root/go-project/src/github.com/hyperhq/hyperd/vendor/github.com/golang/glog/glog.go:769 +0xa5
github.com/hyperhq/hyperd/vendor/github.com/golang/glog.(*loggingT).output(0x1f5d1c0, 0xc400000003, 0xc42098c780, 0x1ce88f1, 0x9, 0xad, 0x0)
/root/go-project/src/github.com/hyperhq/hyperd/vendor/github.com/golang/glog/glog.go:723 +0x1c7
Mar 23 06:09:11 frakti-e2e hyperd[6437]: E0323 06:09:11.787796 6437 info.go:20] GetPodInfo error: Can not get Pod info with pod ID(k8s_POD.0_var-expansion-d
Mar 23 06:09:11 frakti-e2e hyperd[6437]: E0323 06:09:11.788238 6437 info.go:20] GetPodInfo error: Can not get Pod info with pod ID(k8s_POD.0_var-expansion-f
Mar 23 06:09:11 frakti-e2e hyperd[6437]: E0323 06:09:11.788498 6437 info.go:20] GetPodInfo error: Can not get Pod info with pod ID(k8s_POD.0_var-expansion-f
Mar 23 06:09:11 frakti-e2e hyperd[6437]: E0323 06:09:11.791908 6437 pod.go:51] CleanPod 5001f2fdfc8f960d2a699cbf577bccec761550af68b00d828734436f5d177da1 fai
Mar 23 06:09:11 frakti-e2e hyperd[6437]: E0323 06:09:11.793910 6437 pod.go:51] CleanPod 6c4e820551ca4d1166e7c3dd59f2b16a0613891b3af05a21be94dd29f3e6a479 fai
Mar 23 06:09:11 frakti-e2e hyperd[6437]: E0323 06:09:11.809581 6437 pod.go:51] CleanPod 09f4d60b269031a2d71c76dfd3b558a2f87979249d9c494cb083a94818a0023a fai
Mar 23 06:09:11 frakti-e2e hyperd[6437]: E0323 06:09:11.820591
Summarizing 9 Failures:
[Fail] [k8s.io] EmptyDir volumes [It] should support (non-root,0644,tmpfs) [Conformance] [Volume]
/root/go-project/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/framework/util.go:2197
[Fail] [k8s.io] EmptyDir volumes [It] should support (non-root,0777,default) [Conformance] [Volume]
/root/go-project/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/framework/util.go:2197
[Fail] [k8s.io] Projected [It] should project all components that make up the projection API [Conformance] [Volume] [Projection]
/root/go-project/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/framework/util.go:2197
root@frakti-e2e kubernetes]# make test-e2e-node PARALLELISM=2 TEST_ARGS='--kubelet-flags="--container-runtime=remote --container-runtime-endpoint=/var/run/frakti.sock --feature-gates=AllAlpha=true,Accelerators=false"' FOCUS="EmptyDir volumes"
+++ [0323 08:47:46] Building the toolchain targets:
k8s.io/kubernetes/hack/cmd/teststale
k8s.io/kubernetes/vendor/github.com/jteeuwen/go-bindata/go-bindata
+++ [0323 08:47:46] Generating bindata:
test/e2e/generated/gobindata_util.go
~/go-project/src/k8s.io/kubernetes ~/go-project/src/k8s.io/kubernetes/test/e2e/generated
~/go-project/src/k8s.io/kubernetes/test/e2e/generated
+++ [0323 08:47:46] Building go targets for linux/amd64:
vendor/github.com/onsi/ginkgo/ginkgo
@resouer
resouer / docker build base log
Created April 27, 2017 10:15
docker build base log
Step 1 : FROM ubuntu:14.04
---> 302fa07d8117
Step 2 : MAINTAINER maintainers@projectclearwater.org
---> Running in 00cc60a57984
---> d339beaebf0d
Removing intermediate container 00cc60a57984
Step 3 : RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y supervisor curl
---> Running in 009a6f1619a2
Ign http://archive.ubuntu.com trusty InRelease
Get:1 http://archive.ubuntu.com trusty-updates InRelease [65.9 kB]
Stackube is a Kubernetes-centric OpenStack distro. It allows you to run
a Kubernetes cluster with standalone OpenStack components with both soft and hard
multi-tenancy. It works as a thin layer of production ready cloud infrastructure which fully based on container.
Stackube aligns with the OpenStack mission:
We have a clear and defined scope which aims at building a native Kubernetes cluster working along side with standalone vanilla OpenStack components, and use OpenStack to provide production ready multi-tenant networking and persistent volume. Please check our [scope documentation](https://github.com/openstack/stackube/blob/master/doc/source/stackube_scope_clarification.rst) for more detail.
The 4 opens:
@resouer
resouer / issue.md
Last active January 11, 2018 18:17
Moving the equivalence class cache from alpha to beta

Feature Description

  • One-line feature description (can be used as a release note): Moving the equivalence class cache from alpha to beta.
  • Primary contact (assignee): @resouer, @misterikkit
  • Responsible SIGs: @kubernetes/sig-scheduling-feature-requests
  • Design proposal link (community repo): Equivalence class cache scheduling design doc
  • Link to e2e and/or unit tests: e2e test of equivalence class cache
  • Reviewer(s) - (for LGTM) recommend having 2+ reviewers (at least one from code-area OWNERS file) agreed to review. Reviewers from multiple companies preferred: @davidopp, @bsalamat , @erictune, @k82cn, @timothysc, @wojtek-t
  • Approver (likely from SIG/area to which feature belongs): @davidopp, @wojtek-t
  • Feature target (which target eq