Bug 1801937

Summary: Flavor value is not displayed when using openstack server list command
Product: Red Hat OpenStack Reporter: jpateteg
Component: python-openstackclientAssignee: melanie witt <mwitt>
Status: CLOSED MIGRATED QA Contact: nlevinki <nlevinki>
Severity: medium Docs Contact:
Priority: medium    
Version: 17.0 (Wallaby)CC: alifshit, apevec, broose, dasmith, dhill, eglynn, jhakimra, jpateteg, jpichon, kchamart, lhh, lyarwood, mwitt, pambre, sbauza, sgordon, smooney, vromanso
Target Milestone: AlphaKeywords: Patch, Reopened, Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: python-openstackclient-6.2.0-0.20230428105153.05d34ff.el9ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2027859 (view as bug list) Environment:
Last Closed: 2024-01-10 20:35:30 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:
Bug Depends On:    
Bug Blocks: 2027859, 2027879, 2030905    
Attachments:
Description Flags
debug file none

Description jpateteg 2020-02-11 23:36:52 UTC
Description of problem:

When creating an instance, the value of the flavor is not displayed in the "flavor" column of the "openstack server list" command.

Version-Release number of selected component (if applicable):
openstack-nova-compute:16.0-80

How reproducible:
Create an instance using openstack cli, and then check the server list with the openstack server list command.

Steps to Reproduce:
1. Create an instance using openstack CLI (openstack server create myvm-1 --image cirros-OK --flavor m1.tiny --nic net-id=internal)
2.Execute "openstack server list" once it is active


Actual results:
flavor column is empty

Expected results:
flavor column should return "m1.tiny" value and display it

Additional info:

When the instance is created, the flavor column have information: | flavor                              | disk='0', ephemeral='0', , original_name='m1.tiny', ram='512', swap='0', vcpus='1' |

Also if "openstack server show e31b9e4c-3701-4d07-8a92-8b76520f325e" is executed, the flavor list is populated.

Comment 1 jpateteg 2020-02-11 23:57:15 UTC
When selecting a different display format, issue is the same:

(osp-test-jp) [stack@osp-test-jp-undercloud ~]$ openstack server list -f json
[
  {
    "ID": "1c8550fc-1a45-4d8a-93a5-30b414d94fd4",
    "Name": "myvm-1",
    "Status": "ACTIVE",
    "Networks": "internal=172.20.0.94",
    "Image": "cirros-OK",
    "Flavor": ""
  }
]

Comment 2 Lee Yarwood 2020-02-14 15:30:39 UTC
Can you provide output of the command with --debug so we can trace what's going on here?

Comment 3 jpateteg 2020-02-14 16:32:53 UTC
Created attachment 1663150 [details]
debug file

outputof the command with the debug flag

Comment 6 melanie witt 2020-07-23 22:25:41 UTC
What version of the python-openstackclient do you have installed? (openstack --version) And are you passing a microversion (with --os-compute-api-version) or do you have a OS_COMPUTE_API_VERSION set in the environment? I am only able to reproduce the behavior you describe when I use microversion >= 2.47.

$ openstack --version
openstack 5.2.0

$ openstack --os-compute-api-version 2.47 server list
+--------------------------------------+------+--------+---------------------------------------------------------+--------------------------+--------+
| ID                                   | Name | Status | Networks                                                | Image                    | Flavor |
+--------------------------------------+------+--------+---------------------------------------------------------+--------------------------+--------+
| b7199e0d-6aab-4a1b-bc30-b4daad7d83e0 | hi   | ACTIVE | private=fdd1:6fa4:8457:0:f816:3eff:fea6:6352, 10.0.0.12 | cirros-0.5.1-x86_64-disk |        |
+--------------------------------------+------+--------+---------------------------------------------------------+--------------------------+--------+

$ openstack --os-compute-api-version 2.1 server list
+--------------------------------------+------+--------+---------------------------------------------------------+--------------------------+---------+
| ID                                   | Name | Status | Networks                                                | Image                    | Flavor  |
+--------------------------------------+------+--------+---------------------------------------------------------+--------------------------+---------+
| b7199e0d-6aab-4a1b-bc30-b4daad7d83e0 | hi   | ACTIVE | private=fdd1:6fa4:8457:0:f816:3eff:fea6:6352, 10.0.0.12 | cirros-0.5.1-x86_64-disk | m1.tiny |
+--------------------------------------+------+--------+---------------------------------------------------------+--------------------------+---------+

There was a bug fixed upstream [1] for 'openstack server show' not showing the flavor with microversions >= 2.47 but it looks like it was not fixed for 'openstack server list'.

So it looks like we just need to do a fix similar to [1] upstream for the 'openstack server list' command.

[1] https://review.opendev.org/573813

Comment 7 stchen 2020-11-04 19:55:04 UTC
Closing EOL, OSP 16.0 has been retired as of Oct 27, 2020

Comment 8 melanie witt 2020-11-19 22:45:14 UTC
Reopening for OSP17 as the issue still exists.