Skip to content
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

panic: webhook flag redefined: log_dir #6

Open
dougbtv opened this issue Jan 9, 2019 · 2 comments
Open

panic: webhook flag redefined: log_dir #6

dougbtv opened this issue Jan 9, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@dougbtv
Copy link
Member

dougbtv commented Jan 9, 2019

[centos@kube-nonetwork-master net-attach-def-admission-controller]$ kubectl logs net-attach-def-admission-controller-server-765d66c78b-nstmt --namespace=kube-system
webhook flag redefined: log_dir
panic: webhook flag redefined: log_dir
goroutine 1 [running]:
flag.(*FlagSet).Var(0xc42003a120, 0x11e3fe0, 0xc420070d20, 0x1104d9b, 0x7, 0x11281a6, 0x2f)
	/usr/local/go/src/flag/flag.go:810 +0x540
flag.(*FlagSet).StringVar(0xc42003a120, 0xc420070d20, 0x1104d9b, 0x7, 0x0, 0x0, 0x11281a6, 0x2f)
	/usr/local/go/src/flag/flag.go:713 +0x8b
flag.(*FlagSet).String(0xc42003a120, 0x1104d9b, 0x7, 0x0, 0x0, 0x11281a6, 0x2f, 0xc420070d10)
	/usr/local/go/src/flag/flag.go:726 +0x8b
flag.String(0x1104d9b, 0x7, 0x0, 0x0, 0x11281a6, 0x2f, 0xc4200e4800)
	/usr/local/go/src/flag/flag.go:733 +0x69
@dougbtv dougbtv added the bug Something isn't working label Jan 9, 2019
@dougbtv
Copy link
Member Author

dougbtv commented Jan 9, 2019

Looks like it was an improper flattening of deps, glog package is included multiple times:

grep -Prin "log_dir" *
vendor/github.com/intel/multus-cni/vendor/github.com/golang/glog/glog.go:49://	-log_dir=""
vendor/github.com/intel/multus-cni/vendor/github.com/golang/glog/glog_file.go:41:var logDir = flag.String("log_dir", "", "If non-empty, write log files in this directory")
vendor/github.com/golang/glog/glog.go:49://	-log_dir=""
vendor/github.com/golang/glog/glog_file.go:41:var logDir = flag.String("log_dir", "", "If non-empty, write log files in this directory")

Went ahead and manually deleted multiple inclusion for now:

rm -Rf vendor/github.com/intel/multus-cni/vendor/github.com/golang/glog/

Plan to PR into develop branch.

@dougbtv dougbtv closed this as completed Jan 9, 2019
@przemeklal
Copy link
Contributor

Hey @dougbtv, I think this could be fixed with --strip-vendor - it will remove nested vendor dirs, inlcuding glog from Multus. Would this be more "clean" solution?

@przemeklal przemeklal reopened this Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants