darxkies / k8s-tew

Kubernetes - The Easier Way
GNU General Public License v3.0
307 stars 38 forks source link

Invalid cross-device link during etcd configure #12

Closed magicmicah closed 5 years ago

magicmicah commented 5 years ago

Hi,

This is on Oracle Linux 7.6 but I assume this could happen on any LVM setup where /opt and /tmp are separate volumes. During the configure state, I get an invalid cross-device link error message during download of etcd.

./k8s-tew --debug generate INFO[0000] Generated config entries INFO[0000] Saved config filename=/etc/k8s-tew/config.yaml INFO[0000] Copied filename=/opt/k8s-tew/bin/k8s-tew name=k8s-tew INFO[0000] Downloading name=etcd-v3.3.12-linux-amd64.tar.gz url="https://github.com/coreos/etcd/releases/download/v3.3.12/etcd-v3.3.12-linux-amd64.tar.gz" ERRO[0002] Generate failed error="could not rename '/tmp/etcd-v3.3.12-linux-amd64/etcd-v3.3.12-linux-amd64/etcdctl' to '/opt/k8s-tew/bin/etcd/etcdctl': rename /tmp/etcd-v3.3.12-linux-amd64/etcd-v3.3.12-linux-amd64/etcdctl /opt/k8s-tew/bin/etcd/etcdctl: invalid cross-device link"

My understanding of this error message is that a hard link cannot be made between separate partitions. I worked around this by making my K8S_TEW_BASE_DIRECTORY exist directly under the same partition (/opt/k8s-tew). I redid the configure and it completed but now everything that would be created to the the root / is not there so the systemctl commands don't work.

I could try manually merging, but wanted to report in case you had thoughts in how the hard linking is working during the etcd configure. My guess is it's like that for any resource downloaded to /tmp. Hope you can help with this. This is a really cool configuration utility and am looking forward to using it.

darxkies commented 5 years ago

Thank you for reporting that.

I will take a look at that soon.

Any other issues related to Oracle Linux 7.6? I have never tried it out.

darxkies commented 5 years ago

There is another solution to that issue.

You can use the same machine to deploy from and to (over ssh). Similarly to this: https://github.com/darxkies/k8s-tew/blob/master/setup/ubuntu-single-node/Makefile

darxkies commented 5 years ago

Please try the new release https://github.com/darxkies/k8s-tew/releases/tag/2.3.1

This should fix the issue. I was not able to reproduce the error previously using Vagrant and Oracle Linux 7.6

magicmicah commented 5 years ago

Hey @darxkies ,

Thanks for the quick turnaround! The install did go smooth but I'm seeing some other issues related to running kubelet now.

E0411 10:23:21.161304 8986 remote_runtime.go:85] Version from runtime service failed: rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService E0411 10:23:21.161349 8986 kuberuntime_manager.go:196] Get runtime version failed: rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService F0411 10:23:21.161360 8986 server.go:265] failed to run Kubelet: failed to create kubelet: rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService

Trying to track down what some of these messages might mean.

darxkies commented 5 years ago

With Vagrant/Oracle Linux 7.6 it worked without problems.

How did you install it? From ISO? And did you use VirtualBox or VMWare or something else?