rheitzman
rheitzman

Reputation: 2297

gsutil Updates are available check

On seemly random occasions running a gsutil command it displays:

Updates are available for some Cloud SDK components.  To install them,
please run:
  $ gcloud components update

My issue is that I run gsutil commands programmatically on a "server" so I don't see this message as it does not appear in either Standard Out or Err from .Net Process.

I see there is a gsutil version command but I don't see a query to do a check if I have the current version.

Is there a gsutil, or other GCP SDK command, I can run that will tell me if my local copy needs to be updated with output via Standard Out?

Here is the output from Version -l

H:\OUTREACH\WEBSITE\GCP>gsutil version -l
gsutil version: 4.27
checksum: 522455e2d24593ff3a2d3d237eefde57 (OK)
boto version: 2.47.0
python version: 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)]
OS: Windows 7
multiprocessing available: False
using cloud sdk: True
pass cloud sdk credentials to gsutil: True
config path(s): xxxx
gsutil path: xxxx
compiled crcmod: True
installed via package manager: False
editable install: False

Upvotes: 2

Views: 1684

Answers (2)

cherba
cherba

Reputation: 8980

gsutil tool comes with Cloud SDK. When you run gsutil it actually invokes a gcloud wrapper which forwards its credentials to gsutil. Among other things it occasionally checks if newer versions of Cloud SDK are available.

If you do not wish this check to be performed, you can disable it by setting corresponding gcloud property via

gcloud config set component_manager/disable_update_check true

To actually check if update is available you can run

gcloud components list

which will display something like

Your current Cloud SDK version is: 163.0.0
The latest available version is: 165.0.0

To update run gcloud components update.

Upvotes: 4

Mike Schwartz
Mike Schwartz

Reputation: 12145

You can find out if a new copy of gsutil is available by running:

gsutil update

Also, you can avoid having updates offered when running on your server by setting the software_update_check_period variable, as described in https://cloud.google.com/storage/docs/gsutil/commands/update.

Upvotes: 0

Related Questions