googlearchive / k8s-service-catalog

[DEPRECATED] Commandline tool to manage Service Catalog lifecycle and GCP Service Broker atop Kubernetes Cluster
Apache License 2.0
69 stars 31 forks source link

`sc` installer should show the error message of `gcloud` #60

Closed mihnjong closed 6 years ago

mihnjong commented 7 years ago

When running sc add-gcp-broker, it failed in gcloud command, but it only shows the following error message:

using project:  [REDACTED]                                                                                                                   
enabled required APIs  [deploymentmanager.googleapis.com servicebroker.googleapis.com serviceregistry.googleapis.com]                                 
failed to configure GCP broker                                                                                                                        
error creating service account key :failed to create service account key:  : exit status 1  

We should also collect the error message of gcloud command, and show them when we run sc with verbose mode (or even by default).

$ gcloud beta iam service-accounts keys create --iam-account [REDACTED] /tmp/service-catalog-gc\p294682850/key.json                                                           
ERROR: (gcloud.beta.iam.service-accounts.keys.create) RESOURCE_EXHAUSTED: Maximum number of keys on account reached.                                  
- '@type': type.googleapis.com/google.rpc.RetryInfo                                                                                                   
  retryDelay: 86401s                                                                                                                                  
- '@type': type.googleapis.com/google.rpc.DebugInfo                                                                                                   
  detail: '[ORIGINAL ERROR] generic::resource_exhausted: Maximum number of keys on                                                                    
    account reached. [google.rpc.error_details_ext] { message: "Maximum number of                                                                     
    keys on account reached." details { type_url: "type.googleapis.com/google.rpc.RetryInfo"                                                          
    value: "\n\004\010\201\243\005" } }' 
mihnjong commented 6 years ago

What do we output after change?