kubernetes-sigs / cluster-capacity

Cluster capacity analysis
Apache License 2.0
440 stars 103 forks source link

Rebase to kube 1.9 #95

Closed aveshagarwal closed 6 years ago

aveshagarwal commented 6 years ago

Cluster capacity functionality is working. But unit tests in pkg/framework/restclient/external/restclient_test.go in failing with following reason, so still looking into this.

./test.sh
--- FAIL: TestSyncPods (0.00s)
panic: no kind is registered for the type v1.PodList [recovered]
    panic: no kind is registered for the type v1.PodList

goroutine 18 [running]:
testing.tRunner.func1(0xc4201380f0)
    /usr/lib/golang/src/testing/testing.go:711 +0x2d2
panic(0x10356a0, 0xc420070ff0)
    /usr/lib/golang/src/runtime/panic.go:491 +0x283
github.com/kubernetes-incubator/cluster-capacity/vendor/k8s.io/apimachinery/pkg/runtime.EncodeOrDie(0x7f34c8a6b360, 0xc4204fd180, 0x19b7f60, 0xc420340000, 0xc4204fd180, 0x11981fb)
    /root/upstream-code/gocode/src/github.com/kubernetes-incubator/cluster-capacity/vendor/k8s.io/apimachinery/pkg/runtime/codec.go:74 +0xbf
github.com/kubernetes-incubator/cluster-capacity/pkg/framework/restclient/external.(*RESTClient).createReadCloser(0xc420313dc0, 0x118cf9a, 0x4, 0x19b7f60, 0xc420340000, 0x19b7f60, 0xc420340000, 0x0)
    /root/upstream-code/gocode/src/github.com/kubernetes-incubator/cluster-capacity/pkg/framework/restclient/external/restclient.go:319 +0x41a
github.com/kubernetes-incubator/cluster-capacity/pkg/framework/restclient/external.(*RESTClient).createListReadCloser(0xc420313dc0, 0x118cf9a, 0x4, 0x19cba60, 0xc420147580, 0x0, 0x10d51c0, 0xc420270e40)
    /root/upstream-code/gocode/src/github.com/kubernetes-incubator/cluster-capacity/pkg/framework/restclient/external/restclient.go:328 +0xc2
github.com/kubernetes-incubator/cluster-capacity/pkg/framework/restclient/external.(*RESTClient).Do(0xc420313dc0, 0xc4204d0b00, 0x0, 0x2c, 0x0)
    /root/upstream-code/gocode/src/github.com/kubernetes-incubator/cluster-capacity/pkg/framework/restclient/external/restclient.go:495 +0xb60
github.com/kubernetes-incubator/cluster-capacity/vendor/k8s.io/client-go/rest.(*Request).request(0xc420458900, 0xc4205fb538, 0x0, 0x0)
    /root/upstream-code/gocode/src/github.com/kubernetes-incubator/cluster-capacity/vendor/k8s.io/client-go/rest/request.go:663 +0x2ab
github.com/kubernetes-incubator/cluster-capacity/vendor/k8s.io/client-go/rest.(*Request).Do(0xc420458900, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /root/upstream-code/gocode/src/github.com/kubernetes-incubator/cluster-capacity/vendor/k8s.io/client-go/rest/request.go:735 +0xb7
github.com/kubernetes-incubator/cluster-capacity/vendor/k8s.io/client-go/tools/cache.NewListWatchFromClient.func1(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x118bfa7, ...)
    /root/upstream-code/gocode/src/github.com/kubernetes-incubator/cluster-capacity/vendor/k8s.io/client-go/tools/cache/listwatch.go:72 +0x1d8
github.com/kubernetes-incubator/cluster-capacity/vendor/k8s.io/client-go/tools/pager.SimplePageFunc.func1(0x19c9120, 0xc420014128, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /root/upstream-code/gocode/src/github.com/kubernetes-incubator/cluster-capacity/vendor/k8s.io/client-go/tools/pager/pager.go:39 +0x64
github.com/kubernetes-incubator/cluster-capacity/vendor/k8s.io/client-go/tools/pager.(*ListPager).List(0xc4205fb9a0, 0x19c9120, 0xc420014128, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /root/upstream-code/gocode/src/github.com/kubernetes-incubator/cluster-capacity/vendor/k8s.io/client-go/tools/pager/pager.go:77 +0x105
github.com/kubernetes-incubator/cluster-capacity/vendor/k8s.io/client-go/tools/cache.(*ListWatch).List(0xc420147320, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /root/upstream-code/gocode/src/github.com/kubernetes-incubator/cluster-capacity/vendor/k8s.io/client-go/tools/cache/listwatch.go:97 +0x147
github.com/kubernetes-incubator/cluster-capacity/pkg/framework/restclient/external.getResourceList(0x19b13e0, 0xc420313dc0, 0x118cf9a, 0x4, 0x0, 0x0)
    /root/upstream-code/gocode/src/github.com/kubernetes-incubator/cluster-capacity/pkg/framework/restclient/external/restclient_test.go:148 +0x12a
github.com/kubernetes-incubator/cluster-capacity/pkg/framework/restclient/external.TestSyncPods(0xc4201380f0)
    /root/upstream-code/gocode/src/github.com/kubernetes-incubator/cluster-capacity/pkg/framework/restclient/external/restclient_test.go:157 +0x10f
testing.tRunner(0xc4201380f0, 0x1206208)
    /usr/lib/golang/src/testing/testing.go:746 +0xd0
created by testing.(*T).Run
    /usr/lib/golang/src/testing/testing.go:789 +0x2de
FAIL    github.com/kubernetes-incubator/cluster-capacity/pkg/framework/restclient/external  0.101s
ok      github.com/kubernetes-incubator/cluster-capacity/pkg/framework  0.774s
ok      github.com/kubernetes-incubator/cluster-capacity/pkg/framework/strategy 0.061s
make: *** [test] Error 1

@sjenning

aveshagarwal commented 6 years ago

As unit tests are passing, and cluster capacity functionality is working, I am going to merge this.