-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kube-apiserver flag redefined: log_dir #19
Comments
@vklonghml maybe this is not directly related to your problem, but why would k8s.io/kubernetes/cmd/kube-apiserver/apiserver.go ended up calling client-go? |
I'm willing to guess that your vendor folder contains two glogs and this is causing the redefinition error i.e.
One quick solution might be to delete the |
Yesterday I hit the same issue with error messages like When a go application depends on client-go, developer should either manually clean up duplicated vendors locally, (like above) or make it selectively vendor In the long term, I think client-go should not include own vendor directories on its own, like being discussed in #83. |
@dongsupark if client-go doesn't include vendor/, |
K8s vendor trees should be installed with "glide install --strip-vendor", so that kubeless doesn't panic with errors like "flag redefined: log_dir" at runtime. Fixes vmware-archive#46 See also kubernetes/client-go#19 (comment)
hi,forums
when i run go install in cmd/kube-apiserver, then start this binary, the service always failed with
panic(0x305bb20, 0xc8203cb430)
/usr/local/go/src/runtime/panic.go:481 +0x3e6
flag.(_FlagSet).Var(0xc820088300, 0x7f9dde6366a0, 0xc8203cb3e0, 0x42546b0, 0x7, 0x4714660, 0x2f)
/usr/local/go/src/flag/flag.go:776 +0x454
flag.(_FlagSet).StringVar(0xc820088300, 0xc8203cb3e0, 0x42546b0, 0x7, 0x0, 0x0, 0x4714660, 0x2f)
/usr/local/go/src/flag/flag.go:679 +0xc7
flag.(*FlagSet).String(0xc820088300, 0x42546b0, 0x7, 0x0, 0x0, 0x4714660, 0x2f, 0xc8203cb3d0)
/usr/local/go/src/flag/flag.go:692 +0x83
flag.String(0x42546b0, 0x7, 0x0, 0x0, 0x4714660, 0x2f, 0x7f9dde5b4d00)
/usr/local/go/src/flag/flag.go:699 +0x5f
github.com/golang/glog.init()
/opt/k8s/src/github.com/golang/glog/glog_file.go:41 +0x13e
k8s.io/client-go/1.4/pkg/labels.init()
/opt/k8s/src/k8s.io/client-go/1.4/pkg/labels/selector.go:822 +0x5b
k8s.io/client-go/1.4/pkg/api/unversioned.init()
/opt/k8s/src/k8s.io/client-go/1.4/pkg/api/unversioned/zz_generated.deepcopy.go:390 +0x6f
k8s.io/client-go/1.4/pkg/api.init()
/opt/k8s/src/k8s.io/client-go/1.4/pkg/api/zz_generated.deepcopy.go:3749 +0x6e
k8s.io/client-go/1.4/rest.init()
/opt/k8s/src/k8s.io/client-go/1.4/rest/versions.go:88 +0x75
k8s.io/kubernetes/plugin/pkg/client/auth/gcp.init()
/opt/k8s/src/k8s.io/kubernetes/plugin/pkg/client/auth/gcp/gcp.go:119 +0x59
k8s.io/kubernetes/plugin/pkg/client/auth.init()
/opt/k8s/src/k8s.io/kubernetes/plugin/pkg/client/auth/plugins.go:23 +0x3b
k8s.io/kubernetes/pkg/client/unversioned.init()
/opt/k8s/src/k8s.io/kubernetes/pkg/client/unversioned/util.go:79 +0xe7
k8s.io/kubernetes/pkg/controller/serviceaccount.init()
/opt/k8s/src/k8s.io/kubernetes/pkg/controller/serviceaccount/tokens_controller.go:746 +0xa8
k8s.io/kubernetes/cmd/kube-apiserver/app.init()
/opt/k8s/src/k8s.io/kubernetes/cmd/kube-apiserver/app/server.go:310 +0x107
main.init()
/opt/k8s/src/k8s.io/kubernetes/cmd/kube-apiserver/apiserver.go:54 +0x4f
even doing the steps below:
1)run godep restore (godep) in the client-go/1.4 folder, then remove the vendor folder of client-go. Then the packages in your GOPATH will be the only copy
2)or run godep save in your application folder to flatten all dependencies.
the problems can not be resolved, how can i do to solve this, thks.
The text was updated successfully, but these errors were encountered: