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

Init doesn't work on kubernetes 1.8 #24

Open
jaxxstorm opened this issue Feb 12, 2018 · 3 comments
Open

Init doesn't work on kubernetes 1.8 #24

jaxxstorm opened this issue Feb 12, 2018 · 3 comments

Comments

@jaxxstorm
Copy link

I'm trying to upgrade our kubernetes 1.6 cluster to kubernetes 1.8.4. By default, it seems the --enable-controller-attach-detach is enabled on the kubelets, and the execution is done remotely via the controller manager.

Upon intialising, I get the following error in the controller-manager log:

E0212 18:46:44.760037       1 driver-call.go:237] Failed to unmarshal output for command: init, output: "", error: unexpected end of JSON input
W0212 18:46:44.760051       1 driver-call.go:145] FlexVolume: driver call failed: executable: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/virtuozzo~ploop/ploop, args: [init], error: fork/exec /usr/libexec/kubernetes/kubelet-plugins/volume/exec/virtuozzo~ploop/ploop: no such file or directory, output: ""
E0212 18:46:44.760078       1 plugins.go:515] Error dynamically probing plugins: Error creating Flexvolume plugin from directory virtuozzo~ploop, skipping. Error: unexpected end of JSON input
@jaxxstorm
Copy link
Author

I have no idea what's happening here, it seems the ploop exec which is bind mounted inside the container is executing in a weird way:

/usr/libexec/kubernetes/kubelet-plugins/volume/exec/virtuozzo~ploop # ./ploop
/bin/sh: ./ploop: not found

This is from within the kube-controller-manager container

@jaxxstorm
Copy link
Author

Ah, I figured it out.

The issue is that by default, the binary is built using CGO, so there's a bunch of statically linked files in there:

ldd /usr/libexec/kubernetes/kubelet-plugins/volume/exec/virtuozzo~ploop/ploop
	linux-vdso.so.1 =>  (0x00007ffcccaef000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fcf3e465000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fcf3e0a4000)
	/lib64/ld-linux-x86-64.so.2 (0x0000560a1644b000)

If you disable CGO, it works fine:

CGO_ENABLED=0 go build -o ploop .

@avagin
Copy link

avagin commented Feb 14, 2018

Why do you need the attach-detach controller? I installed 1.8 with out plugins, with a disabled attach-detach controller and everything works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants