gana2188 / google-cloud-sdk

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

Unable to add tags with gcloud using "gcloud compute instances add-tags" #87

Open GoogleCodeExporter opened 8 years ago

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

gcloud compute instances add-tags cloud-uscentral-ppls-cache02 --tags 
allow-http allow-docker allow-coreos coreos ppls-cache --zone us-central1-a

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

Unknown output, as I haven't made this work before on any previous version that 
I've used.

$ gcloud compute instances add-tags cloud-uscentral-ppls-cache02 --tags 
allow-http allow-docker allow-coreos coreos ppls-cache --zone us-central1-a
Traceback (most recent call last):
  File "/home/mnguyen/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 153, in <module>
    main()
  File "/home/mnguyen/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 149, in main
    _cli.Execute()
  File "/home/mnguyen/google-cloud-sdk/./lib/googlecloudsdk/calliope/cli.py", line 381, in Execute
    post_run_hooks=self.__post_run_hooks, kwargs=kwargs)
  File "/home/mnguyen/google-cloud-sdk/./lib/googlecloudsdk/calliope/frontend.py", line 274, in _Execute
    pre_run_hooks=pre_run_hooks, post_run_hooks=post_run_hooks)
  File "/home/mnguyen/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 889, in Run
    output_formatter(result)
  File "/home/mnguyen/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 875, in OutputFormatter
    command_instance.Display(args, obj)
  File "/home/mnguyen/google-cloud-sdk/./lib/googlecloudsdk/compute/lib/base_classes.py", line 965, in Display
    list(resources)
  File "/home/mnguyen/google-cloud-sdk/./lib/googlecloudsdk/compute/lib/base_classes.py", line 928, in Run
    new_object = self.Modify(args, objects[0])
  File "/home/mnguyen/google-cloud-sdk/lib/googlecloudsdk/compute/subcommands/instances/add_tags.py", line 27, in Modify
    new_object = copy.deepcopy(existing)
  File "/usr/lib64/python2.6/copy.py", line 189, in deepcopy
    y = _reconstruct(x, rv, 1, memo)
  File "/usr/lib64/python2.6/copy.py", line 338, in _reconstruct
    state = deepcopy(state, memo)
  File "/usr/lib64/python2.6/copy.py", line 162, in deepcopy
    y = copier(x, memo)
  File "/usr/lib64/python2.6/copy.py", line 255, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/usr/lib64/python2.6/copy.py", line 162, in deepcopy
    y = copier(x, memo)
  File "/usr/lib64/python2.6/copy.py", line 255, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "/usr/lib64/python2.6/copy.py", line 189, in deepcopy
    y = _reconstruct(x, rv, 1, memo)
  File "/usr/lib64/python2.6/copy.py", line 329, in _reconstruct
    y.append(item)
  File "/home/mnguyen/google-cloud-sdk/./lib/protorpc/messages.py", line 1087, in append
    self.__field.validate_element(value)
AttributeError: 'FieldList' object has no attribute '_FieldList__field'

What is the output of 'gcloud info'?

Google Cloud SDK [0.9.35]

Platform: [Linux, x86_64]
Python Version: [2.6.6 (r266:84292, Jan 22 2014, 09:42:36)  [GCC 4.4.7 20120313 
(Red Hat 4.4.7-4)]]
Site Packages: [Disabled]

Installation Root: [/home/x/google-cloud-sdk]
Installed Components:
  core: [2014.11.03]
  core-nix: [2014.10.20]
  compute: [2014.10.30]
  gsutil-nix: [4.6]
  gsutil: [4.6]
  bq: [2.0.18]
  dns: [2014.10.30]
  sql: [2014.10.30]
  gcutil: [1.16.5]
  gcutil-nix: [1.16.5]
  bq-nix: [2.0.18]
System PATH: 
[/home/x/google-cloud-sdk/bin:/home/x/src/ansible/bin:/home/x/google-cloud-sdk/b
in:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/x/bin]
Cloud SDK on PATH: [True]

Installation Properties: [/home/x/google-cloud-sdk/properties]
User Config Directory: [/home/x/.config/gcloud]
User Properties: [/home/x/.config/gcloud/properties]
Current Workspace: [None]
Workspace Config Directory: [None]
Workspace Properties: [None]

Account: [x]
Project: [x]

Current Properties:
  [core]
    project: [x]
    account: [x]
    disable_usage_reporting: [True]
    user_output_enabled: [True]

Logs Directory: [/home/x/.config/gcloud/logs]
Last Log File: [/home/x/.config/gcloud/logs/2014.11.05/17.24.31.462304.log]

Please provide any additional information below.

Doing a "gcloud compute instances describe" on the instance confirms the tags 
did not get added.

Original issue reported on code.google.com by moo...@gmail.com on 5 Nov 2014 at 10:27

GoogleCodeExporter commented 8 years ago
can you try running with python 2.7?

Original comment by gsfow...@google.com on 7 Nov 2014 at 8:28

GoogleCodeExporter commented 8 years ago
No, I can't, not installed on the server on which this is running on. :(

Actually, this is very much related and seemingly quite the same in appearance 
with this other issue with which I also previously had trouble with, but which 
seems to have been fixed since:

https://code.google.com/p/google-cloud-sdk/issues/detail?id=79

Original comment by moo...@gmail.com on 7 Nov 2014 at 11:55

GoogleCodeExporter commented 8 years ago
We'll track this one, as we're working on Python 2.6 compatibility. Right now, 
we only guarantee Python 2.7.

What type of server are you on? Is this a Google Compute Engine machine?

Is there no way that you can install Python 2.7 on the server? Do you have sudo 
access to the machine? Or is more an issue of needed to keep Python 2.6 around?

Original comment by rdayal@google.com on 10 Nov 2014 at 4:28

GoogleCodeExporter commented 8 years ago
This is a pretty stock CentOS 6.6 installation.

It's not in GCE, just a simple installation running on a VM installed from the 
ISO.  

The idea was to stay as close to base as possible and sticking to 2.6 since 
it's available out of the box and not install anything more.  But if 2.7 is 
needed, I guess I won't have a choice but to install it via the SCL repo or 
something similar to avoid these types of issues.

Original comment by moo...@gmail.com on 18 Nov 2014 at 7:32