turbinia icon indicating copy to clipboard operation
turbinia copied to clipboard

Turbinia client hangs when revoking GCP credentials

Open hacktobeer opened this issue 3 years ago • 3 comments

When revoking GCP credentials ($ gcloud auth revoke) the client library hang for 600 seconds trying to call the create_topic() code below: https://github.com/google/turbinia/blob/master/turbinia/pubsub.py#L68

Should we set a retry and timeout object when creating the PublisherClient to minimise the time the user has to wait? https://googleapis.dev/python/pubsub/latest/UPGRADING.html#custom-retry-and-timeout-settings-for-publisher-client

hacktobeer avatar Aug 23 '21 13:08 hacktobeer

FWIW, I tried

from google.api_core.timeout  import ConstantTimeout
# ...
self.publisher.create_topic(self.topic_path, timeout=ConstantTimeout(timeout=10))

And that didn't change the behavior

tomchop avatar Aug 23 '21 14:08 tomchop

What's the use-case or steps to reproduce this here? Is this when revoking, re-auth'ing and then re-running turbiniactl?

aarontp avatar Sep 30 '21 00:09 aarontp

Do a request and fetch the results with the wait option, go to another terminal and revoke the gcloud credentials, which makes the turbinia client hang. It would be nice to see if it's possible to do some error checking in the wait function or be able to set a timeout.

hacktobeer avatar Sep 30 '21 07:09 hacktobeer