Skip to content

fix node deployment to include GOOGLE_APPLICATION_CREDENTIALS envvar #79

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

Closed
wants to merge 1 commit into from

Conversation

ashleyschuett
Copy link

No description provided.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 26, 2018
@k8s-ci-robot k8s-ci-robot requested review from davidz627 and msau42 July 26, 2018 01:06
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 26, 2018
@msau42
Copy link
Contributor

msau42 commented Jul 26, 2018

Are you seeing an issue without this fix?

The node controller only handles mount and unmount so should not need to make cloud provider calls

@ashleyschuett
Copy link
Author

When I tried to deploy the manifests without this fix it kept going into a crash loop back off. I'll test again today without this change and get the exact logs.

@ashleyschuett
Copy link
Author

ashleyschuett commented Jul 26, 2018

Without the env var specified the gce-pd-driver container contains the following logs

# kubectl logs csi-gce-pd-node-5s5g5 gce-pd-driver
I0726 18:38:38.501711       1 main.go:49] Driver vendor version latest
W0726 18:38:38.512482       1 gce.go:97] GOOGLE_APPLICATION_CREDENTIALS env var not set
I0726 18:38:38.512520       1 gce.go:99] Using DefaultTokenSource &oauth2.reuseTokenSource{new:google.computeSource{account:""}, mu:sync.Mutex{state:0, sema:0x0}, t:(*oauth2.Token)(nil)}
E0726 18:38:38.513326       1 gce.go:106] error fetching initial token: metadata: GCE metadata "instance/service-accounts/default/token" not defined
E0726 18:39:33.198707       1 gce.go:106] error fetching initial token: metadata: GCE metadata "instance/service-accounts/default/token" not defined
E0726 18:39:38.200638       1 gce.go:106] error fetching initial token: metadata: GCE metadata "instance/service-accounts/default/token" not defined
E0726 18:39:43.200748       1 gce.go:106] error fetching initial token: metadata: GCE metadata "instance/service-accounts/default/token" not defined
E0726 18:39:48.200834       1 gce.go:106] error fetching initial token: metadata: GCE metadata "instance/service-accounts/default/token" not defined
E0726 18:39:53.200793       1 gce.go:106] error fetching initial token: metadata: GCE metadata "instance/service-accounts/default/token" not defined
E0726 18:39:58.201192       1 gce.go:106] error fetching initial token: metadata: GCE metadata "instance/service-accounts/default/token" not defined
E0726 18:40:03.200787       1 gce.go:106] error fetching initial token: metadata: GCE metadata "instance/service-accounts/default/token" not defined
E0726 18:40:03.202209       1 gce.go:106] error fetching initial token: metadata: GCE metadata "instance/service-accounts/default/token" not defined
F0726 18:40:03.202249       1 main.go:56] Failed to get cloud provider: timed out waiting for the condition

@msau42
Copy link
Contributor

msau42 commented Jul 27, 2018

Ah ok yes I think this is needed for GetNodeInfo in order to get the zone

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 27, 2018
@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 27, 2018
@davidz627
Copy link
Contributor

davidz627 commented Jul 27, 2018

Hi @ashleyschuett thanks for the interest and contribution!

The Node should not need any GCP credentials to function. The topology support PR (which includes NodeGetInfo that Michelle mentioned) (#77) introduces a dependency on the GCE Metadata server so I thought this might be related to that, but that hasn't made it into master yet.

Depending on whether we need the credential for actual node operations (metadata server calls) or not, I'm thinking the actual solution may be this: #34 instead of giving credentials to the node container that it doesn't strictly need.

Some additional questions to try figure out why we're seeing this error:
Are you deploying using the provided scripts in an unmodified state? Which version of Kubernetes are you running and is it on GCE or GKE?

@kubernetes-sigs kubernetes-sigs deleted a comment from k8s-ci-robot Jul 27, 2018
@davidz627 davidz627 removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 27, 2018
@ashleyschuett
Copy link
Author

I am using the script on a GCE cluster that I created.

@msau42
Copy link
Contributor

msau42 commented Jul 30, 2018

How are you deploying the GCE cluster?

I think at least in a GKE and GCE kube-up deployment, there is some extra logic done to give the nodes a default service account.

@davidz627
Copy link
Contributor

davidz627 commented Aug 15, 2018

Hi @ashleyschuett wondering if you have been able to deploy the driver without this issue since?

@davidz627
Copy link
Contributor

Closing due to inactivity. Feel free to reopen if you are still seeing this issue.

@davidz627 davidz627 closed this Sep 18, 2018
@ridv
Copy link

ridv commented Jan 28, 2021

Now that #77 change has landed in Stable, I was unable to run this on our 1.18 cluster on GCE without adding these changes to the driver. (I was hitting the same errors as the author of the PR).

I see #34 still has not landed.

Any guidance here? Running the scripts from this repo untouched.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 28, 2021
@k8s-ci-robot
Copy link
Contributor

@ashleyschuett: PR needs rebase.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants