-
Notifications
You must be signed in to change notification settings - Fork 234
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
No preflight check of config files #646
Comments
I agree on that, and I actually ran in the same issue. There should be something like either schema validation of the terraform output, or at least when an empty kubelet config is generated (which is the case here), there should be an error about that. |
We version the documentation and generally recommend to use documentation for your desired version (by switching the branch or tag). However, in this case, the documentation is absolutely the same between v0.9.x and v.0.10.x, so it's okay. 🙂
We haven't changed the config format since a long time ago, so everything should work as expected, even with v0.9.2. Although, v0.9.2 is quite old at this point and I would recommend going with v0.10.0-alpha.3. The new stable version is expected after 1.16 goes out.
This error pretty much doesn't say anything usable, but from the experience, it makes me think there is something wrong with the hostname (e.g. see #645). Regarding hostnames, we added some additional validations and workarounds, so this maybe explains why it works with v0.10.0-alpha.3.
I'm not sure what graceful and idempotent termination means. Can you please explain a little bit more what steps would you like to see?
This is a little bit tricky. We are running commands over SSH and depend on external components, e.g. kubeadm. One kubeadm error (like this one) can have multiple meanings, so even if we parse it, we don't know what to instruct the user. But, I agree that our error format is bad and I'd like to be able to better show the error and point users to some documentation or something similar.
How do you know the kubelet config is empty? I'd like to trace this but I'd need some more details on how to reproduce it. |
So in this case the kubelet config file wasn't even created, not only empty:
I just meant to exit kubeone with a meaningful error message and without actually changing the environment. But I see that this can be tricky when running stuff over ssh and relying on external tools. |
I agree with the meaningful error message part but slightly disagree on the environment part. You can always use the |
how about % git diff v0.9.2..v0.10.0-alpha.3 output.tf diff --git a/examples/terraform/aws/output.tf b/examples/terraform/aws/output.tf
index ce1c65a..7a22621 100644
--- a/examples/terraform/aws/output.tf
+++ b/examples/terraform/aws/output.tf
@@ -31,6 +31,7 @@ output "kubeone_hosts" {
cloud_provider = "aws"
private_address = aws_instance.control_plane.*.private_ip
public_address = aws_instance.control_plane.*.public_ip
+ hostnames = aws_instance.control_plane.*.private_dns
ssh_agent_socket = var.ssh_agent_socket
ssh_port = var.ssh_port
ssh_private_key_file = var.ssh_private_key_file I ran into this problem, but cannot remember if it was exactly the hostnames. |
So I used version v0.10.0-alpha.3 successfully without specifying the hostnames in the terraform output. So I guess this is a non-issue at least for versions equal to or higher than 0.10.0-apha.3. Maybe a comment in the docs about that is enough? I could open a PR for that. |
It's specified automatically (see the output @thz posted) unless you are using your own Terraform scripts.
It should be a non-issue since v0.10.0-alpha.0 when we introduced the ability to set the hostnames (#567).
That would be very nice, but the problem might be what workaround to recommend. Note that you can't set the hostname for versions before v0.10.0-alpha.0. For such versions, the hostname was determined automatically. Cherry-picking that change is not possible at all because of multiple reasons. I guess that this error only occurs when you have a longer cluster name, i.e. longer instances names. If we can confirm that, we can add to docs to either use shorter cluster/instance names or to use v0.10.0 instead. |
Currently, there is no way to validate the Because of that, I'm going to close this issue. |
@xmudrii: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What happened:
When provisioning a new k8s cluster on AWS with KubeOne version 0.9.2, following the 'Quickstart on AWS' tutorial on the master branch I encountered following error message:
This is fixed when using a current kubeone version (e.g. v0.10.0-alpha.3), since then the config format used in the 'Quickstart on AWS' tutorial apparently fits the kubeone version. I however would have expected a graceful and idempotent termination of kubeone before running in a problem while provisioning.
What is the expected behavior:
Successfully create a cluster or give meaningful output about wrong config format and exit before attempting to create the cluster.
How to reproduce the issue:
Use the config from the 'Quickstart on AWS' tutorial from the master branch with an older version of kubeone (e.g. v0.9.2)
Anything else we need to know?
Information about the environment:
KubeOne version (
kubeone version
):Operating system: Linux 4.19.60-1-MANJARO x86_64 GNU/Linux
Provider you're deploying cluster on: AWS
Operating system you're deploying on: Ubuntu 18.04 amd64
The text was updated successfully, but these errors were encountered: