-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Cannot create a spanner session when running in compute engine #3933
Comments
Does the credential already have the |
@lukesneeringer, @jonparrott We cannot update scopes on GCE credentials, which means that should not be subclassed from |
I opened googleapis/google-auth-library-python#194 to track the issue. |
googleapis/google-auth-library-python#195 suggests a new If that PR is merged and released, the code we have now in |
googleapis/google-auth-library-python#195 has been merged. |
What is the core issue here? Why is session creation failing? |
@vkedia See googleapis/google-auth-library-python#194, and the fix in googleapis/google-auth-library-python#195 which updates GCE credentials such that they no longer advertise (falsely) that they can create instances with added scopes. |
So does this mean that spanner client does not work at all on compute engine? It definitely did work the last time I tried it. |
Note: google-auth 1.1 is on PyPI now. |
I have the same issue when trying to use the spanner client under plain machine (like my mac). |
Via #3950. |
Cannot create a session when running in compute engine
An error occurs when session.create() is called from a compute engine vm. The Compute Engine VM is running in the same Google Cloud Project as the Spanner instance.
1. OS type and version
Debian GNU/Linux 9.1 (compute engine vm)
2. Python version
Python 2.7.13
3. google-cloud-python version
google-auth==1.0.2
google-auth-httplib2==0.0.2
google-cloud-bigquery==0.27.0
google-cloud-core==0.27.1
google-cloud-spanner==0.27.0
google-cloud-storage==1.4.0
google-compute-engine==2.6.0
4. Stacktrace
5. Steps to reproduce/6. Code example
Create a Spanner instance and database in a Google Cloud Project. In the same project, create a Compute Engine VM and allow full access to all cloud APIs during creation. In the vm, run the following lines: (store the proper values in instance_name and database_name)
The text was updated successfully, but these errors were encountered: