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

Can't run terraform destroy on workers been rebooted #6

Closed
simox-83 opened this issue Aug 1, 2018 · 3 comments
Closed

Can't run terraform destroy on workers been rebooted #6

simox-83 opened this issue Aug 1, 2018 · 3 comments

Comments

@simox-83
Copy link

simox-83 commented Aug 1, 2018

If we reboot the worker instances for any reasons and then trying to destroy the cluster, when running terraform destroy on the worker.tf we get an error message:


* data.local_file.user_data: 1 error(s) occurred:

* data.local_file.user_data: data.local_file.user_data: open /tmp/kube-workers/worker-bootstrap.sh: no such file or directory

Can't we just upload that script somewhere else?
Thanks!

@edtoon
Copy link

edtoon commented Aug 1, 2018

The script isn't "uploaded" to that path - it's read from that path on the machine that Terraform is running on, I assume as a quick workaround to Terraform's weird user_data behavior in the past. That will have to be handled differently in order to avoid this error.

(See hashicorp/terraform#145 for more about the "weirdness", it should be fixed now...)

@lander2k2
Copy link
Owner

@edtoon is correct. The file /tmp/kube-workers/worker-bootstrap.sh is created on the local machine during cluster installation. kube-cluster.sh generates that file when masters are created. Then it is referenced when the worker ASG is created.

@simox-83 Have you tried creating an empty file at /tmp/kube-workers/worker-bootstrap.sh? Since you're destroying, it shouldn't matter that it doesn't have the correct content.

@simox-83
Copy link
Author

simox-83 commented Aug 2, 2018

@lander2k2 Thanks for your suggestion. I tried to do what you suggested and it works. Thanks for the clarifications too @edtoon

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

3 participants