-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
kops-controller can't determine AWS region #9856
Comments
@SearsAW I think I have a fix for this. In case you want to try it, let me know. |
@hakman I'm down for trying. |
Would it be ok to create a new cluster based on Kops 1.19 like the one below? $ wget https://storage.googleapis.com/kops-ci/pulls/pull-kops-e2e-kubernetes-aws/pull-095d7b1c0f/linux/amd64/kops
$ export KOPS_BASE_URL=https://storage.googleapis.com/kops-ci/pulls/pull-kops-e2e-kubernetes-aws/pull-095d7b1c0f
$ kops create cluster ... |
#9575 also fixes this. |
I will give this a shot tonight after work. |
@hakman I get the following error when creating/updating the cluster.
|
@SearsAW you seem to be using the |
1. What
kops
version are you running? The commandkops version
, will displaythis information.
2. What Kubernetes version are you running?
kubectl version
will print theversion if a cluster is running or provide the Kubernetes version specified as
a
kops
flag.3. What cloud provider are you using?
AWS GovCloud
4. What commands did you run? What is the simplest way to reproduce this issue?
This was done as part of an upgrade from Kubernetes v1.17.10 created using kops v1.17.1 to Kubernetes v1.18.8 using kops v1.18.0. We upgraded the cluster and removed the pinned Docker version (originally added to fix Docker issues on Amazon Linux). So it went something like the following:
kops upgrade cluster --yes kops edit cluster # removed the docker stuff kops update cluster --yes kops rolling-update cluster --yes
5. What happened after the commands executed?
Everything came up again smoothly except the
role
labels weren't being added to the worker nodes. Looking into thekops-controller
, we were getting errors like this:6. What did you expect to happen?
I expected the
kops-controller
to be able to determine I'm running in by reading that file and not error out. Therefore, thekops-controller
would be able to proceed and add the labels to the node.7. Please provide your cluster manifest. Execute
kops get --name my.example.com -o yaml
to display your cluster manifest.You may want to remove your cluster name and other sensitive information.
8. Please run the commands with most verbose logging by adding the
-v 10
flag.Paste the logs into this report, or in a gist and provide the gist link here.
9. Anything else do we need to know?
This is running in AWS GovCloud region
us-gov-west-1
.Digging into the code, I found the place where this check it happening. By setting the
AWS_REGION
environment variable in the Daemonset, I was able to get things working. However, this won't be a long-term solution since I assume this will get overwritten when we do another upgrade.I looked at the file
/sys/devices/virtual/dmi/id/product_uuid
directly on the node since it is the file the controller can't open and saw that it is owned byroot
. So Initially I was thinking maybe Amazon Linux makesroot
own it but it isn't on other distros. This is incorrect. I spun up an Ubuntu instance, and it too had that file owned by root.I also tried updating to the most recent AMI of Amazon Linux, but that didn't fix anything either.
The text was updated successfully, but these errors were encountered: