gana2188 / google-cloud-sdk

Automatically exported from code.google.com/p/google-cloud-sdk
0 stars 0 forks source link

gcloud command and installation fails after update #111

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

./google-cloud-sdk/install.sh

What is the expected output? What do you see instead?

installed google cloud sdk, but installation failed

What is the output of 'gcloud info'?

gcloud is not installed, so nothing was shown.

but during installation, 

after asking "Do you want to help improve the Google Cloud SDK (Y/n)", 

the output is :

Traceback (most recent call last):
  File "/home/m1010/./google-cloud-sdk/bin/bootstrapping/install.py", line 357, in <module>
    main()
  File "/home/m1010/./google-cloud-sdk/bin/bootstrapping/install.py", line 334, in main
    bootstrapping.CommandStart('INSTALL', component_id='core')
  File "/home/m1010/google-cloud-sdk/bin/bootstrapping/bootstrapping.py", line 188, in CommandStart
    metrics.Executions(command_name, version)
  File "/home/m1010/google-cloud-sdk/bin/bootstrapping/../../lib/googlecloudsdk/core/metrics.py", line 239, in Executions
    _CollectGAEvent('Executions', command_name, version_string)
  File "/home/m1010/google-cloud-sdk/bin/bootstrapping/../../lib/googlecloudsdk/core/metrics.py", line 205, in _CollectGAEvent
    _GAEvent(category=category, action=action, label=label, value=value))
  File "/home/m1010/google-cloud-sdk/bin/bootstrapping/../../lib/googlecloudsdk/core/metrics.py", line 156, in CollectGAEvent
    project_id_hash = self._GetProjectIDHash()
  File "/home/m1010/google-cloud-sdk/bin/bootstrapping/../../lib/googlecloudsdk/core/metrics.py", line 133, in _GetProjectIDHash
    project_id = properties.VALUES.core.project.Get()
  File "/home/m1010/google-cloud-sdk/bin/bootstrapping/../../lib/googlecloudsdk/core/properties.py", line 479, in Get
    self.Validate(value)
  File "/home/m1010/google-cloud-sdk/bin/bootstrapping/../../lib/googlecloudsdk/core/properties.py", line 493, in Validate
    self.__validator(value)
  File "/home/m1010/google-cloud-sdk/bin/bootstrapping/../../lib/googlecloudsdk/core/properties.py", line 348, in ProjectValidator
    'project must be the project ID, not the project number')
googlecloudsdk.core.properties.InvalidValueError: project must be the project 
ID, not the project number

Please provide any additional information below.

I've used the sdk for months and it works fine until I updated it one hour ago.

Seems to be the issue of project id, which indicated project id should be used 
instead of project number. 

But every "gcloud" command failed so I can not reset the project id with 
"gcloud config set" or other commands. 

Therefore I tried re-install the sdk and now even re-installation fails.

Please give me any tip or help to fix this, or any way to get a older version 
sdk to keep my work going!

Thanks a lot!

Original issue reported on code.google.com by Andrew.Y...@gmail.com on 10 Feb 2015 at 3:14

GoogleCodeExporter commented 8 years ago
Yes, we put in some validation to ensure that the project id is used instead of 
the project number.  We should have been a bit more careful with the rollout of 
this validation though (so you could run gcloud config set to fix it).

Your properties are stored in ~/.config/gcloud/properties
You can remove the "project" property from there which should fix the issue.  
You can then use `gcloud config set` to set the project to the correct value.

I'll open a bug to improve the validation so that `gcloud config set` can be 
run when there are invalid properties.

Original comment by markp...@google.com on 10 Feb 2015 at 5:41