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

cannot move '/home/core/kubeconfig' to '/etc/kubernetes/kubeconfig': No such file or directory #612

Closed
bcg62 opened this issue Jan 4, 2020 · 3 comments · Fixed by #615
Closed

Comments

@bcg62
Copy link

bcg62 commented Jan 4, 2020

Bug

Environment

  • Platform: bare-metal
  • OS: container-linux
  • Release: b2eb3e0
  • Terraform: 0.12.18
  • Plugins:
  • provider.ct v0.4.0
  • provider.local v1.4.0
  • provider.matchbox v0.3.0
  • provider.null v2.1.2
  • provider.template v2.1.2
  • provider.tls v2.1.1

Problem

Terraform output shows:

module.cluster.module.typhoon.null_resource.copy-controller-secrets[2] (remote-exec): mv: cannot move '/home/core/kubeconfig' to '/etc/kubernetes/kubeconfig': No such file or directory

The host shows

$ ls -lrt /home/core/kubeconfig
-rw-r--r--. 1 core core 5645 Jan  4 11:22 /home/core/kubeconfig

Maybe this is some sort of race condition?

Following this:

module.cluster.module.typhoon.null_resource.copy-worker-secrets[1]: Creation complete after 14m4s [id=8115494576772202412]

Error: error executing "/tmp/terraform_2006031982.sh": Process exited with status 1



Error: error executing "/tmp/terraform_1397021072.sh": Process exited with status 1



Error: error executing "/tmp/terraform_1038493895.sh": Process exited with status 1



Error: error executing "/tmp/terraform_2147143729.sh": Process exited with status 1



Error: error executing "/tmp/terraform_949615003.sh": Process exited with status 1



Error: error executing "/tmp/terraform_2075195276.sh": Process exited with status 1

Inspecting host, terraform_132190432.sh file is empty.

Desired Behavior

Complete provision

Steps to Reproduce

Terraform apply + pxe boot.

@bcg62
Copy link
Author

bcg62 commented Jan 4, 2020

Trying to execute the command manually via ssh results in the same error:

ssh core@xxx.xxx.xxx.xxx mv /home/core/kubeconfig /etc/kubernetes/kubeconfig
mv: cannot move '/home/core/kubeconfig' to '/etc/kubernetes/kubeconfig': No such file or directory

the destination does not yet exist on workers.

$ ssh core@xxx.xxx.xxx.xxx ls -lrt /home/core/kubeconfig
-rw-r--r--. 1 core core 5645 Jan  4 11:25 /home/core/kubeconfig
$ ssh core@xxx.xxx.xxx.xxx ls -lrt /etc/kubernetes
ls: cannot access '/etc/kubernetes': No such file or directory

@dghubble
Copy link
Member

dghubble commented Jan 7, 2020

This is from a recent unreleased change which has the side effect of not creating /etc/kubernetes during first boot from disk. Thanks for flagging. This is limited to Container/Flatcar Linux + bare-metal or DigitalOcean.

To solve your problem, you can reprovision with any of the tagged releases, such as v1.17.0.

@dghubble
Copy link
Member

dghubble commented Jan 7, 2020

Alternately, newer sha 0223b31

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

Successfully merging a pull request may close this issue.

2 participants