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

s3context.go: permission denied: unable to read /sys/devices/virtual/dmi/id/product_uuid #9173

Closed
linecolumn opened this issue May 24, 2020 · 6 comments
Assignees

Comments

@linecolumn
Copy link

Running KOPS 1.18.0-alpha.3 (git-27aab12b2) with Ubuntu Focal (AMI: 099720109477/ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20200423) on AWS along with Kubernetes v1.18.3

During multiply cluster creation following messages always appears:

s3context.go:170] defaulting region to "us-east-1"
s3context.go:210] found bucket in region "eu-central-1"
s3context.go:325] unable to read /sys/devices/virtual/dmi/id/product_uuid, assuming not running on EC2: open /sys/devices/virtual/dmi/id/product_uuid: permission denied
@hakman
Copy link
Member

hakman commented May 25, 2020

/assign

@linecolumn
Copy link
Author

KOPS 1.18-beta.1, messages are gone away.

@w3irdrobot
Copy link

Still seeing this issue on 1.18.0.

I0901 17:32:15.966765       1 s3context.go:325] unable to read /sys/devices/virtual/dmi/id/product_uuid, assuming not running on EC2: open /sys/devices/virtual/dmi/id/product_uuid: permission denied
I0901 17:32:15.967033       1 s3context.go:170] defaulting region to "us-east-1"
I0901 17:32:16.311839       1 s3context.go:191] unable to get bucket location from region "us-east-1"; scanning all regions: InvalidToken: The provided token is malformed or otherwise invalid.
     status code: 400, request id: 4Z4P1MCS0S6K8P0R, host id: M67PQ8xsEyazS/D+lvTOnl923PFNblBbWxDR0WqPRZxOCkHnz5K5bytXqPOpx4xCsKD5dJc/dfI=
 E0901 17:32:16.647080       1 controller.go:258] controller-runtime/controller "msg"="Reconciler error" "error"="unable to load cluster object for node ip-172-20-40-221.us-gov-west-1.compute.internal: error loading Cluster \"s3://cipher
 morph-com-k8s-local-kops/ciphermorph.com.k8s.local/cluster.spec\": Unable to list AWS regions: AuthFailure: AWS was not able to validate the provided access credentials\n\tstatus code: 401, request id: 870266f7-a2ac-417e-9fb3-e7496e5ba6
 29"  "controller"="node" "request"={"Namespace":"","Name":"ip-172-20-40-221.us-gov-west-1.compute.internal"}

We are running us-gov-west-1.

@w3irdrobot
Copy link

w3irdrobot commented Sep 1, 2020

Looking at the code, it appears setting the AWS_REGION manually will let us move forward. Can confirm that this works. However, this feels like I'm avoiding the problem instead of letting kops do its thing.

@hakman
Copy link
Member

hakman commented Sep 1, 2020

@SearsAW Please open a new issue with all the required info, so that it's easy to reproduce.
A PR would also be welcomed :).

@w3irdrobot
Copy link

@hakman I opened #9856 to start the discussion. I'd love to do the PR if I knew what the actual fix was. :)

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