Comment 57 for bug 1559072

Volodymyr Litovka (doka.ua) wrote :

Openstack: stable/ocata
Ubuntu 16.04.02 Xenial Xerus

$ openstack server list
+--------------------------------------+--------+-----------+
| ID | Name | Status |
+--------------------------------------+--------+-----------+
| 54b2465f-6a5d-467e-8815-42c436852ba6 | jex-n1 | ACTIVE |
| a0442c11-dc5b-4d8f-9e77-a83b59782b7c | jex-n2 | SUSPENDED |
+--------------------------------------+--------+-----------+

$ openstack server rebuild jex-n1
'unicode' object has no attribute 'get'

====== --debug -vvvv =======
GET call to compute for http://controller:8774/v2.1/servers?name=jex-n1 used request id req-def51157-4adb-4c37-9ccf-77a8124fa939
REQ: curl -g -i -X GET http://controller:8774/v2.1/servers/54b2465f-6a5d-467e-8815-42c436852ba6 -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}7970e0bb2968bd69cc6f49026ba350e55da7b105"
http://controller:8774 "GET /v2.1/servers/54b2465f-6a5d-467e-8815-42c436852ba6 HTTP/1.1" 200 1782
RESP: [200] Content-Length: 1782 Content-Type: application/json Openstack-Api-Version: compute 2.1 X-Openstack-Nova-Api-Version: 2.1 Vary: OpenStack-API-Version, X-OpenStack-Nova-API-Version X-Compute-Request-Id: req-4e02c928-6dbc-4f79-9cc9-1ca0ad8e69e3 Date: Mon, 05 Jun 2017 10:44:16 GMT
RESP BODY: {"server": {"OS-EXT-STS:task_state": null, "addresses": {"e-net": [{"OS-EXT-IPS-MAC:mac_addr": "d0:1c:a0:04:a4:5d", "version": 4, "addr": "51.255.0.248", "OS-EXT-IPS:type": "fixed"}], "jex-net": [{"OS-EXT-IPS-MAC:mac_addr": "d0:1c:a0:74:f8:57", "version": 4, "addr": "1.1.1.10", "OS-EXT-IPS:type": "fixed"}], "dummy-net": [{"OS-EXT-IPS-MAC:mac_addr": "d0:1c:a0:8c:ae:f2", "version": 4, "addr": "25.0.0.7", "OS-EXT-IPS:type": "fixed"}]}, "links": [{"href": "http://controller:8774/v2.1/servers/54b2465f-6a5d-467e-8815-42c436852ba6", "rel": "self"}, {"href": "http://controller:8774/servers/54b2465f-6a5d-467e-8815-42c436852ba6", "rel": "bookmark"}], "image": "", "OS-EXT-STS:vm_state": "active", "OS-EXT-SRV-ATTR:instance_name": "instance-0000016f", "OS-SRV-USG:launched_at": "2017-06-05T08:53:58.000000", "flavor": {"id": "d0ff4bc5-df38-4f20-8908-afc516d594e6", "links": [{"href": "http://controller:8774/flavors/d0ff4bc5-df38-4f20-8908-afc516d594e6", "rel": "bookmark"}]}, "id": "54b2465f-6a5d-467e-8815-42c436852ba6", "security_groups": [{"name": "default"}, {"name": "jex-esg"}], "user_id": "0d01892c43b0498198c4716d510c6667", "OS-DCF:diskConfig": "MANUAL", "accessIPv4": "", "accessIPv6": "", "progress": 0, "OS-EXT-STS:power_state": 1, "OS-EXT-AZ:availability_zone": "nova", "metadata": {}, "status": "ACTIVE", "updated": "2017-06-05T08:53:59Z", "hostId": "4c5f24a68ef88f97beb99c3e34d5ea6cba6d3fabe3dc5a6487ed8415", "OS-EXT-SRV-ATTR:host": "ardbeg", "OS-SRV-USG:terminated_at": null, "key_name": null, "OS-EXT-SRV-ATTR:hypervisor_hostname": "compute0.cloud.local", "name": "jex-n1", "created": "2017-06-05T08:53:42Z", "tenant_id": "d8051a3ff3ad4c4bb380f828992b8178", "os-extended-volumes:volumes_attached": [{"id": "d76e23e8-c6cb-462e-9ac0-81b2d733fc77"}], "config_drive": ""}}
GET call to compute for http://controller:8774/v2.1/servers/54b2465f-6a5d-467e-8815-42c436852ba6 used request id req-4e02c928-6dbc-4f79-9cc9-1ca0ad8e69e3
'unicode' object has no attribute 'get'
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 112, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/dist-packages/openstackclient/compute/v2/server.py", line 1215, in take_action
    image_id = parsed_args.image or server._info.get('image', {}).get('id')
AttributeError: 'unicode' object has no attribute 'get'
clean_up RebuildServer: 'unicode' object has no attribute 'get'
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/osc_lib/shell.py", line 135, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 279, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/dist-packages/osc_lib/shell.py", line 180, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 112, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/dist-packages/openstackclient/compute/v2/server.py", line 1215, in take_action
    image_id = parsed_args.image or server._info.get('image', {}).get('id')
AttributeError: 'unicode' object has no attribute 'get'

END return value: 1