Solved Problems with google-cloud-sdk

  • Thread starter Deleted member 36389
  • Start date
D

Deleted member 36389

Guest
We have 7 servers all running FreeBSD 11.1 fully patched and up to date using freebsd-update. We run jails on each server and have a custom script to backup each jail to Google Cloud. However, I just realized today that it hasn't been working for the last two months.

When I try to run gsutil or gcloud on the servers I get an error, however in each jail it runs just fine and both instances are installed and configured in exactly the same way so I'm at a loss as to why it would not work on the host servers but does work in the jails and I've exhausted every option I can think of in trying to fix it.

Here's the full output from installing google-cloud-sdk to trying to run gsutil and gcloud and the errors I get.

Oh, and downloading google-cloud-sdk-196.0.0-linux-x86_64.tar.gz direct from Google and running that executable works just fine, on the host servers, which is all that the FreeBSD package really is, from what I can tell.

Any thoughts or leads as to where to look and things to try would be greatly appreciated.

Thank you!

Oh, and before people ask about python2:
Code:
lrwxr-xr-x  1 root  wheel     7 Oct  3  2017 /usr/local/bin/python -> python2
lrwxr-xr-x  1 root  wheel    14 Oct  3  2017 /usr/local/bin/python-config -> python2-config
lrwxr-xr-x  1 root  wheel     9 Oct  3  2017 /usr/local/bin/python2 -> python2.7
lrwxr-xr-x  1 root  wheel    16 Oct  3  2017 /usr/local/bin/python2-config -> python2.7-config
-r-xr-xr-x  1 root  wheel  5432 Oct 26 01:19 /usr/local/bin/python2.7
-r-xr-xr-x  1 root  wheel  1769 Oct 26 01:19 /usr/local/bin/python2.7-config

Code:
example:/home/test # pkg install google-cloud-sdk
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 6 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    google-cloud-sdk: 196.0.0
    python27: 2.7.14_1
    python: 2.7_3,2
    python2: 2_3
    py27-sqlite3: 2.7.14_7
    py27-setuptools: 39.0.1

Number of packages to be installed: 6

The process will require 156 MiB more space.

Proceed with this action? [y/N]: y
[1/6] Installing python27-2.7.14_1...
[1/6] Extracting python27-2.7.14_1: 100%
[2/6] Installing python2-2_3...
[2/6] Extracting python2-2_3: 100%
[3/6] Installing py27-setuptools-39.0.1...
[3/6] Extracting py27-setuptools-39.0.1: 100%
[4/6] Installing python-2.7_3,2...
[4/6] Extracting python-2.7_3,2: 100%
[5/6] Installing py27-sqlite3-2.7.14_7...
[5/6] Extracting py27-sqlite3-2.7.14_7: 100%
[6/6] Installing google-cloud-sdk-196.0.0...
[6/6] Extracting google-cloud-sdk-196.0.0: 100%
Message from python27-2.7.14_1:

===========================================================================

Note that some standard Python modules are provided as separate ports
as they require additional dependencies. They are available as:

bsddb           databases/py-bsddb
gdbm            databases/py-gdbm
sqlite3         databases/py-sqlite3
tkinter         x11-toolkits/py-tkinter

===========================================================================
example:/home/test # gsutil
Traceback (most recent call last):
  File "/usr/local/bin/../google-cloud-sdk/bin/bootstrapping/gsutil.py", line 12, in <module>
    import bootstrapping
  File "/usr/local/google-cloud-sdk/bin/bootstrapping/bootstrapping.py", line 15, in <module>
    from googlecloudsdk.core import config
  File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/core/config.py", line 387, in <module>
 
  File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/core/config.py", line 314, in Load
    def logs_dir(self):
TypeError: __init__() got an unexpected keyword argument 'release_notes_url'
example:/home/test # gcloud
ERROR: gcloud failed to load: __init__() got an unexpected keyword argument 'release_notes_url'
    gcloud_main = _import_gcloud_main()
    import googlecloudsdk.gcloud_main
    from googlecloudsdk.calliope import base
    from googlecloudsdk.calliope import arg_parsers
    from googlecloudsdk.core import log
    import json
    import sys
  File "/usr/local/google-cloud-sdk/lib/googlecloudsdk/core/config.py", line 314, in Load
TypeError: __init__() got an unexpected keyword argument 'release_notes_url'

This usually indicates corruption in your gcloud installation or problems with your Python interpreter.

Please verify that the following is the path to a working Python 2.7 executable:
    /usr/local/bin/python2

If it is not, please set the CLOUDSDK_PYTHON environment variable to point to a working Python 2.7 executable.

If you are still experiencing problems, please reinstall the Cloud SDK using the instructions here:
    https://cloud.google.com/sdk/
 
Looks like there was no solution, it just magically started working.

Is it ok to re-open a closed bug or best to create a new report?
 
I think I figured it out. It seems that the google-cloud-sdk port does not delete all files when uninstalled which can cause upgraded versions to not work. At least I believe this to be the case as I originally upgraded from 183 to 194 and that was when I started having this problem, I could not get 194 to work and subsequent upgrades to 195 and 196 would not work either. However, after deleting /usr/local/google-cloud-sdk and reinstalling it works fine.

I will create a bug report based on this information.
 
Back
Top