Bug 1463649

Summary: "openstack server list" return some additional request information in output instead of clear result. nova list return only result
Product: Red Hat OpenStack Reporter: Artem Hrechanychenko <ahrechan>
Component: python-openstackclientAssignee: Julie Pichon <jpichon>
Status: CLOSED WORKSFORME QA Contact: Ola Pavlenko <opavlenk>
Severity: medium Docs Contact:
Priority: medium    
Version: 12.0 (Pike)CC: ahrechan, apevec, beth.white, lhh, ohochman, srevivo
Target Milestone: Upstream M3Keywords: Triaged
Target Release: 13.0 (Queens)   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-27 09:46:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Artem Hrechanychenko 2017-06-21 12:22:43 UTC
Description of problem:
"openstack server list"  return some additional request information in output instead of clear result.  nova list return only result
(undercloud) [stack@undercloud-0 ~]$ openstack server list
REQ: curl -g -i -X GET http://192.168.24.1:8774/v2.1/servers/detail -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}465821c9985490b3bbe4874a89078b0ea456e7fc"
RESP: [200] Content-Length: 3368 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-Openstack-Request-Id: req-c42598bf-a041-459d-93d7-0d3efa67b781 X-Compute-Request-Id: req-c42598bf-a041-459d-93d7-0d3efa67b781 Date: Wed, 21 Jun 2017 12:12:17 GMT Connection: keep-alive 
RESP BODY: {"servers": [{"OS-EXT-STS:task_state": null, "addresses": {"ctlplane": [{"OS-EXT-IPS-MAC:mac_addr": "52:54:00:c6:77:e9", "version": 4, "addr": "192.168.24.13", "OS-EXT-IPS:type": "fixed"}]}, "links": [{"href": "http://192.168.24.1:8774/v2.1/servers/506c1c4a-9853-4041-8acb-07438314ff3d", "rel": "self"}, {"href": "http://192.168.24.1:8774/servers/506c1c4a-9853-4041-8acb-07438314ff3d", "rel": "bookmark"}], "image": {"id": "08898f28-62b4-488b-80b2-ad92e28d126b", "links": [{"href": "http://192.168.24.1:8774/images/08898f28-62b4-488b-80b2-ad92e28d126b", "rel": "bookmark"}]}, "OS-EXT-STS:vm_state": "active", "OS-EXT-SRV-ATTR:instance_name": "instance-00000002", "OS-SRV-USG:launched_at": "2017-06-21T10:52:57.000000", "flavor": {"id": "286865d3-464f-4299-919a-e9b6cb43a6f7", "links": [{"href": "http://192.168.24.1:8774/flavors/286865d3-464f-4299-919a-e9b6cb43a6f7", "rel": "bookmark"}]}, "id": "506c1c4a-9853-4041-8acb-07438314ff3d", "security_groups": [{"name": "default"}], "user_id": "279bdffd25a94e89a45bf1e7ab7a8c91", "OS-DCF:diskConfig": "MANUAL", "accessIPv4": "", "accessIPv6": "", "progress": 0, "OS-EXT-STS:power_state": 1, "OS-EXT-AZ:availability_zone": "nova", "config_drive": "True", "status": "ACTIVE", "updated": "2017-06-21T10:52:58Z", "hostId": "9adbfc09e91ae1a854834bd1f6d8aea2ed4d2051dcb30f57c1078bf3", "OS-EXT-SRV-ATTR:host": "undercloud-0.redhat.local", "OS-SRV-USG:terminated_at": null, "key_name": "default", "OS-EXT-SRV-ATTR:hypervisor_hostname": "dc32f6de-f97b-44ac-a079-ea278cad9f26", "name": "overcloud-controller-0", "created": "2017-06-21T10:50:12Z", "tenant_id": "4ddc29a502244fa4a0b5c07654e0f83c", "os-extended-volumes:volumes_attached": [], "metadata": {}}, {"OS-EXT-STS:task_state": null, "addresses": {"ctlplane": [{"OS-EXT-IPS-MAC:mac_addr": "52:54:00:3c:40:2c", "version": 4, "addr": "192.168.24.15", "OS-EXT-IPS:type": "fixed"}]}, "links": [{"href": "http://192.168.24.1:8774/v2.1/servers/79f9cc9b-48d8-4d9a-92a1-e27c98e0820a", "rel": "self"}, {"href": "http://192.168.24.1:8774/servers/79f9cc9b-48d8-4d9a-92a1-e27c98e0820a", "rel": "bookmark"}], "image": {"id": "08898f28-62b4-488b-80b2-ad92e28d126b", "links": [{"href": "http://192.168.24.1:8774/images/08898f28-62b4-488b-80b2-ad92e28d126b", "rel": "bookmark"}]}, "OS-EXT-STS:vm_state": "active", "OS-EXT-SRV-ATTR:instance_name": "instance-00000001", "OS-SRV-USG:launched_at": "2017-06-21T10:52:53.000000", "flavor": {"id": "dfebb430-fdf7-4bef-89ec-bb33b44e9d78", "links": [{"href": "http://192.168.24.1:8774/flavors/dfebb430-fdf7-4bef-89ec-bb33b44e9d78", "rel": "bookmark"}]}, "id": "79f9cc9b-48d8-4d9a-92a1-e27c98e0820a", "security_groups": [{"name": "default"}], "user_id": "279bdffd25a94e89a45bf1e7ab7a8c91", "OS-DCF:diskConfig": "MANUAL", "accessIPv4": "", "accessIPv6": "", "progress": 0, "OS-EXT-STS:power_state": 1, "OS-EXT-AZ:availability_zone": "nova", "config_drive": "True", "status": "ACTIVE", "updated": "2017-06-21T10:52:53Z", "hostId": "9adbfc09e91ae1a854834bd1f6d8aea2ed4d2051dcb30f57c1078bf3", "OS-EXT-SRV-ATTR:host": "undercloud-0.redhat.local", "OS-SRV-USG:terminated_at": null, "key_name": "default", "OS-EXT-SRV-ATTR:hypervisor_hostname": "cdc85e50-46f1-4cf8-b8cf-95cac15e958b", "name": "overcloud-compute-0", "created": "2017-06-21T10:50:07Z", "tenant_id": "4ddc29a502244fa4a0b5c07654e0f83c", "os-extended-volumes:volumes_attached": [], "metadata": {}}]}

GET call to compute for http://192.168.24.1:8774/v2.1/servers/detail used request id req-c42598bf-a041-459d-93d7-0d3efa67b781
REQ: curl -g -i -X GET http://192.168.24.1:8774/v2.1/flavors/detail -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}465821c9985490b3bbe4874a89078b0ea456e7fc"
RESP: [200] Content-Length: 3220 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-Openstack-Request-Id: req-d743e394-8227-451c-885c-9a6e1acd9013 X-Compute-Request-Id: req-d743e394-8227-451c-885c-9a6e1acd9013 Date: Wed, 21 Jun 2017 12:12:17 GMT Connection: keep-alive 
RESP BODY: {"flavors": [{"links": [{"href": "http://192.168.24.1:8774/v2.1/flavors/10d34581-4fd3-40c4-8985-343fa5c81c53", "rel": "self"}, {"href": "http://192.168.24.1:8774/flavors/10d34581-4fd3-40c4-8985-343fa5c81c53", "rel": "bookmark"}], "ram": 4096, "OS-FLV-DISABLED:disabled": false, "os-flavor-access:is_public": true, "rxtx_factor": 1.0, "disk": 40, "id": "10d34581-4fd3-40c4-8985-343fa5c81c53", "name": "baremetal", "vcpus": 1, "swap": "", "OS-FLV-EXT-DATA:ephemeral": 0}, {"links": [{"href": "http://192.168.24.1:8774/v2.1/flavors/286865d3-464f-4299-919a-e9b6cb43a6f7", "rel": "self"}, {"href": "http://192.168.24.1:8774/flavors/286865d3-464f-4299-919a-e9b6cb43a6f7", "rel": "bookmark"}], "ram": 8192, "OS-FLV-DISABLED:disabled": false, "os-flavor-access:is_public": true, "rxtx_factor": 1.0, "disk": 37, "id": "286865d3-464f-4299-919a-e9b6cb43a6f7", "name": "controller", "vcpus": 3, "swap": "", "OS-FLV-EXT-DATA:ephemeral": 0}, {"links": [{"href": "http://192.168.24.1:8774/v2.1/flavors/535af2a9-1160-4c87-9f32-4e7685c8e7c4", "rel": "self"}, {"href": "http://192.168.24.1:8774/flavors/535af2a9-1160-4c87-9f32-4e7685c8e7c4", "rel": "bookmark"}], "ram": 4096, "OS-FLV-DISABLED:disabled": false, "os-flavor-access:is_public": true, "rxtx_factor": 1.0, "disk": 40, "id": "535af2a9-1160-4c87-9f32-4e7685c8e7c4", "name": "swift-storage", "vcpus": 1, "swap": "", "OS-FLV-EXT-DATA:ephemeral": 0}, {"links": [{"href": "http://192.168.24.1:8774/v2.1/flavors/7ef34697-ab66-4cb9-968d-4c87a790141b", "rel": "self"}, {"href": "http://192.168.24.1:8774/flavors/7ef34697-ab66-4cb9-968d-4c87a790141b", "rel": "bookmark"}], "ram": 4096, "OS-FLV-DISABLED:disabled": false, "os-flavor-access:is_public": true, "rxtx_factor": 1.0, "disk": 40, "id": "7ef34697-ab66-4cb9-968d-4c87a790141b", "name": "ceph-storage", "vcpus": 1, "swap": "", "OS-FLV-EXT-DATA:ephemeral": 0}, {"links": [{"href": "http://192.168.24.1:8774/v2.1/flavors/9cdaad7c-391b-4b11-8aac-7dbcaca34b72", "rel": "self"}, {"href": "http://192.168.24.1:8774/flavors/9cdaad7c-391b-4b11-8aac-7dbcaca34b72", "rel": "bookmark"}], "ram": 4096, "OS-FLV-DISABLED:disabled": false, "os-flavor-access:is_public": true, "rxtx_factor": 1.0, "disk": 40, "id": "9cdaad7c-391b-4b11-8aac-7dbcaca34b72", "name": "block-storage", "vcpus": 1, "swap": "", "OS-FLV-EXT-DATA:ephemeral": 0}, {"links": [{"href": "http://192.168.24.1:8774/v2.1/flavors/dc464788-a121-4215-989d-4e0fd618add4", "rel": "self"}, {"href": "http://192.168.24.1:8774/flavors/dc464788-a121-4215-989d-4e0fd618add4", "rel": "bookmark"}], "ram": 4096, "OS-FLV-DISABLED:disabled": false, "os-flavor-access:is_public": true, "rxtx_factor": 1.0, "disk": 40, "id": "dc464788-a121-4215-989d-4e0fd618add4", "name": "control", "vcpus": 1, "swap": "", "OS-FLV-EXT-DATA:ephemeral": 0}, {"links": [{"href": "http://192.168.24.1:8774/v2.1/flavors/dfebb430-fdf7-4bef-89ec-bb33b44e9d78", "rel": "self"}, {"href": "http://192.168.24.1:8774/flavors/dfebb430-fdf7-4bef-89ec-bb33b44e9d78", "rel": "bookmark"}], "ram": 6144, "OS-FLV-DISABLED:disabled": false, "os-flavor-access:is_public": true, "rxtx_factor": 1.0, "disk": 37, "id": "dfebb430-fdf7-4bef-89ec-bb33b44e9d78", "name": "compute", "vcpus": 3, "swap": "", "OS-FLV-EXT-DATA:ephemeral": 0}]}

GET call to compute for http://192.168.24.1:8774/v2.1/flavors/detail used request id req-d743e394-8227-451c-885c-9a6e1acd9013
+--------------------------------------+------------------------+--------+------------------------+----------------+
| ID                                   | Name                   | Status | Networks               | Image Name     |
+--------------------------------------+------------------------+--------+------------------------+----------------+
| 506c1c4a-9853-4041-8acb-07438314ff3d | overcloud-controller-0 | ACTIVE | ctlplane=192.168.24.13 | overcloud-full |
| 79f9cc9b-48d8-4d9a-92a1-e27c98e0820a | overcloud-compute-0    | ACTIVE | ctlplane=192.168.24.15 | overcloud-full |
+--------------------------------------+------------------------+--------+------------------------+----------------+


(undercloud) [stack@undercloud-0 ~]$ nova list
+--------------------------------------+------------------------+--------+------------+-------------+------------------------+
| ID                                   | Name                   | Status | Task State | Power State | Networks               |
+--------------------------------------+------------------------+--------+------------+-------------+------------------------+
| 79f9cc9b-48d8-4d9a-92a1-e27c98e0820a | overcloud-compute-0    | ACTIVE | -          | Running     | ctlplane=192.168.24.15 |
| 506c1c4a-9853-4041-8acb-07438314ff3d | overcloud-controller-0 | ACTIVE | -          | Running     | ctlplane=192.168.24.13 |
+--------------------------------------+------------------------+--------+------------+-------------+------------------------+


Version-Release number of selected component (if applicable):
OSP12
python-openstackclient-3.11.0-0.20170505192416.el7ost.noarch


How reproducible:
always

Steps to Reproduce:
1.install osp12 
2.run "openstack server list"
3.

Actual results:
lot of api requests in stdout

Expected results:
clean results 

Additional info:

Comment 1 Red Hat Bugzilla Rules Engine 2017-06-21 12:22:49 UTC
This bugzilla has been removed from the release and needs to be reviewed and Triaged for another Target Release.

Comment 2 Julie Pichon 2017-08-24 15:12:04 UTC
I just did a brand new OSP12 install and cannot reproduce it:

$ rpm -qa python-openstackclient
python-openstackclient-3.12.0-0.20170728181821.f67ebce.el7ost.noarch

$ openstack image list
+--------------------------------------+------------------------+--------+
| ID                                   | Name                   | Status |
+--------------------------------------+------------------------+--------+
| 933f5f15-8028-4be5-8f1a-e03e39c941ab | bm-deploy-kernel       | active |
[...]

$ openstack server list
+--------------------------------------+------+--------+------------------------+----------------+-----------+
| ID                                   | Name | Status | Networks               | Image          | Flavor    |
+--------------------------------------+------+--------+------------------------+----------------+-----------+
| 3c241f21-d6fe-4089-b08b-a4a7da225fe7 | test | ACTIVE | ctlplane=192.168.24.15 | overcloud-full | baremetal |
+--------------------------------------+------+--------+------------------------+----------------+-----------+

$ nova list
+--------------------------------------+------+--------+------------+-------------+------------------------+
| ID                                   | Name | Status | Task State | Power State | Networks               |
+--------------------------------------+------+--------+------------+-------------+------------------------+
| 3c241f21-d6fe-4089-b08b-a4a7da225fe7 | test | ACTIVE | -          | Running     | ctlplane=192.168.24.15 |
+--------------------------------------+------+--------+------------+-------------+------------------------+

This was also done on an undercloud, as the stack user. A few people have mentioned similar issues on various systems, also with python-openstackclient but sometimes with other clients as well like nova (though perhaps that was related to https://bugs.launchpad.net/python-novaclient/+bug/1697452 ). I've never seen it myself, and it didn't reproduce when I downgraded to the version mentioned in the description either. I wonder if there might be some kind of debug environment variable set up somewhere? Could you have a look through the "env" output to see if anything might fit, and/or post it here as an attachment?

There are bug reports that suggest this may be linked to os-client-config. Mine is at python-os-client-config-1.28.0-0.20170713235318.f74902b.el7ost.noarch on that system. Could you see if this reproduces still when you upgrade both packages to the same versions I have? Thank you.

Comment 5 Artem Hrechanychenko 2017-10-19 22:51:28 UTC
what information is need from me?

Comment 6 Julie Pichon 2017-10-20 07:31:25 UTC
Basically anything to help me reproduce the bug! Is there anything slightly special about your setup? Does the bug still reproduce today? If so:

- Could you have a look through the "env" output and post it here as an attachment?
- Does it happen with all your installs?
- Could you try again with the versions (or newer) that I mentioned in comment 2? That is, python-openstackclient-3.12.0-0.20170728181821.f67ebce and python-os-client-config-1.28.0-0.20170713235318.f74902b. Please include version numbers for both these packages if you do reproduce.

Thanks.

Comment 7 Artem Hrechanychenko 2017-10-27 09:46:58 UTC
(undercloud) [stack@undercloud-0 ~]$ openstack server list
+--------------------------------------+-------------------------+--------+------------------------+----------------+------------+
| ID                                   | Name                    | Status | Networks               | Image          | Flavor     |
+--------------------------------------+-------------------------+--------+------------------------+----------------+------------+
| 1176f86f-350e-4de4-b58a-cc13896f9811 | overcloud-controller-2  | ACTIVE | ctlplane=192.168.24.21 | overcloud-full | controller |
| 2bc3d05c-b885-495b-b0c9-c0a74644bc29 | overcloud-controller-0  | ACTIVE | ctlplane=192.168.24.19 | overcloud-full | controller |
| 87fbb453-3701-4550-bdfd-efeaf32dfcb9 | overcloud-cephstorage-2 | ACTIVE | ctlplane=192.168.24.13 | overcloud-full | ceph       |
| 2a65f5f9-9bcf-4d4b-b2c3-c9a14f2b1eb3 | overcloud-controller-1  | ACTIVE | ctlplane=192.168.24.6  | overcloud-full | controller |
| aa81ca48-d062-4267-ae29-ad702a8ad61c | overcloud-compute-1     | ACTIVE | ctlplane=192.168.24.17 | overcloud-full | compute    |
| 8e6a9b7e-a4ef-4d5f-9624-93f1ad56c5c8 | overcloud-compute-0     | ACTIVE | ctlplane=192.168.24.18 | overcloud-full | compute    |
| 8e6bba98-2a72-473b-82a3-6f8919058fd9 | overcloud-cephstorage-0 | ACTIVE | ctlplane=192.168.24.10 | overcloud-full | ceph       |
| dce8cb50-9bd0-4cdb-a965-cd32e6a097a9 | overcloud-cephstorage-1 | ACTIVE | ctlplane=192.168.24.11 | overcloud-full | ceph       |
+--------------------------------------+-------------------------+--------+------------------------+----------------+------------+
(undercloud) [stack@undercloud-0 ~]$ nova list
/usr/lib/python2.7/site-packages/requests/packages/urllib3/connection.py:303: SubjectAltNameWarning: Certificate for 192.168.24.2 has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
  SubjectAltNameWarning
/usr/lib/python2.7/site-packages/requests/packages/urllib3/connection.py:303: SubjectAltNameWarning: Certificate for 192.168.24.2 has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
  SubjectAltNameWarning
+--------------------------------------+-------------------------+--------+------------+-------------+------------------------+
| ID                                   | Name                    | Status | Task State | Power State | Networks               |
+--------------------------------------+-------------------------+--------+------------+-------------+------------------------+
| 8e6bba98-2a72-473b-82a3-6f8919058fd9 | overcloud-cephstorage-0 | ACTIVE | -          | Running     | ctlplane=192.168.24.10 |
| dce8cb50-9bd0-4cdb-a965-cd32e6a097a9 | overcloud-cephstorage-1 | ACTIVE | -          | Running     | ctlplane=192.168.24.11 |
| 87fbb453-3701-4550-bdfd-efeaf32dfcb9 | overcloud-cephstorage-2 | ACTIVE | -          | Running     | ctlplane=192.168.24.13 |
| 8e6a9b7e-a4ef-4d5f-9624-93f1ad56c5c8 | overcloud-compute-0     | ACTIVE | -          | Running     | ctlplane=192.168.24.18 |
| aa81ca48-d062-4267-ae29-ad702a8ad61c | overcloud-compute-1     | ACTIVE | -          | Running     | ctlplane=192.168.24.17 |
| 2bc3d05c-b885-495b-b0c9-c0a74644bc29 | overcloud-controller-0  | ACTIVE | -          | Running     | ctlplane=192.168.24.19 |
| 2a65f5f9-9bcf-4d4b-b2c3-c9a14f2b1eb3 | overcloud-controller-1  | ACTIVE | -          | Running     | ctlplane=192.168.24.6  |
| 1176f86f-350e-4de4-b58a-cc13896f9811 | overcloud-controller-2  | ACTIVE | -          | Running     | ctlplane=192.168.24.21 |
+--------------------------------------+-------------------------+--------+------------+-------------+------------------------+

python-openstackclient-3.12.0-0.20170821150739.f67ebce.el7ost.noarch
python-os-client-config-1.28.0-0.20170811175957.f74902b.el7ost.noarch