Bug 1478287 - python-openstackclient doesn't show project id of security groups
python-openstackclient doesn't show project id of security groups
Status: CLOSED ERRATA
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-openstackclient (Show other bugs)
11.0 (Ocata)
x86_64 Linux
low Severity low
: beta
: 12.0 (Pike)
Assigned To: Julie Pichon
Honza Pokorny
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-04 04:15 EDT by Rhys Oxenham
Modified: 2017-12-13 16:49 EST (History)
8 users (show)

See Also:
Fixed In Version: python-openstackclient-3.12.0-0.20170728181821.f67ebce.el7ost
Doc Type: Bug Fix
Doc Text:
When showing the list of Neutron security groups, the Project column referenced the tenant ID instead of the project ID. This caused the Project column to appear blank. This fix changes the behavior of the operation to get the project ID, and now the list of Neutron security groups shows the relevant project ID in the Project column.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-12-13 16:49:38 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1659967 None None None 2017-08-15 10:22 EDT
OpenStack gerrit 437320 None None None 2017-08-15 10:24 EDT

  None (edit)
Description Rhys Oxenham 2017-08-04 04:15:11 EDT
Description of problem:

When using the python-openstackclient (on the OSP11 undercloud) to list available security groups, it doesn't show the association of a group to a project in the high-level list, only when you ask it to show you the actual group.

For example:

[stack@undercloud director]$ openstack security group list
+--------------------------------------+---------+------------------------+---------+
| ID                                   | Name    | Description            | Project |
+--------------------------------------+---------+------------------------+---------+
| 19f43d66-0dbf-48c9-a4d5-6d3bb3c4c219 | default | Default security group |         |
| e776d298-b64a-4ce9-a6a2-9818f14bf071 | default | Default security group |         |
+--------------------------------------+---------+------------------------+---------+

Yet, if I go into one of them, it shows the project id...

[stack@undercloud director]$ openstack security group show e776d298-b64a-4ce9-a6a2-9818f14bf071
+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field           | Value                                                                                                                                                                                                                               |
+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| created_at      | 2017-08-04T08:03:06Z                                                                                                                                                                                                                |
| description     | Default security group                                                                                                                                                                                                              |
| id              | e776d298-b64a-4ce9-a6a2-9818f14bf071                                                                                                                                                                                                |
| name            | default                                                                                                                                                                                                                             |
| project_id      | 1742f2ee2c0941d69ab7f634a2441ba9                                                                                                                                                                                                    |
| revision_number | 1                                                                                                                                                                                                                                   |
| rules           | created_at='2017-08-04T08:03:06Z', direction='ingress', ethertype='IPv4', id='1845f055-0571-4155-80e0-e95c7ee211f7', remote_group_id='e776d298-b64a-4ce9-a6a2-9818f14bf071', revision_number='1', updated_at='2017-08-04T08:03:06Z' |
|                 | created_at='2017-08-04T08:03:06Z', direction='egress', ethertype='IPv4', id='51738c8e-4127-4294-bb9f-81da06f66dc5', revision_number='1', updated_at='2017-08-04T08:03:06Z'                                                          |
|                 | created_at='2017-08-04T08:03:06Z', direction='egress', ethertype='IPv6', id='bd0a0b5a-67b4-48d3-9b82-688dba82041c', revision_number='1', updated_at='2017-08-04T08:03:06Z'                                                          |
|                 | created_at='2017-08-04T08:03:06Z', direction='ingress', ethertype='IPv6', id='ce43ac30-edcc-4aab-b7e6-83d36be8fb55', remote_group_id='e776d298-b64a-4ce9-a6a2-9818f14bf071', revision_number='1', updated_at='2017-08-04T08:03:06Z' |
| updated_at      | 2017-08-04T08:03:06Z                                                                                                                                                                                                                |
+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
[stack@undercloud director]$ openstack project list
+----------------------------------+---------+
| ID                               | Name    |
+----------------------------------+---------+
| 1742f2ee2c0941d69ab7f634a2441ba9 | admin   |
| 33b5226c54074c66b922dd4daf33488b | service |
+----------------------------------+---------+

The (soon to be deprecated) neutron CLI shows it successfully though...

[stack@undercloud director]$ neutron security-group-list
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
+--------------------------------------+---------+----------------------------------+----------------------------------------------------------------------+
| id                                   | name    | tenant_id                        | security_group_rules                                                 |
+--------------------------------------+---------+----------------------------------+----------------------------------------------------------------------+
| 19f43d66-0dbf-48c9-a4d5-6d3bb3c4c219 | default |                                  | egress, IPv4                                                         |
|                                      |         |                                  | egress, IPv6                                                         |
|                                      |         |                                  | ingress, IPv4, remote_group_id: 19f43d66-0dbf-48c9-a4d5-6d3bb3c4c219 |
|                                      |         |                                  | ingress, IPv6, remote_group_id: 19f43d66-0dbf-48c9-a4d5-6d3bb3c4c219 |
| e776d298-b64a-4ce9-a6a2-9818f14bf071 | default | 1742f2ee2c0941d69ab7f634a2441ba9 | egress, IPv4                                                         |
|                                      |         |                                  | egress, IPv6                                                         |
|                                      |         |                                  | ingress, IPv4, remote_group_id: e776d298-b64a-4ce9-a6a2-9818f14bf071 |
|                                      |         |                                  | ingress, IPv6, remote_group_id: e776d298-b64a-4ce9-a6a2-9818f14bf071 |
+--------------------------------------+---------+----------------------------------+----------------------------------------------------------------------+

Version-Release number of selected component (if applicable):

kernel-3.10.0-693.el7.x86_64
python-openstackclient-3.8.1-1.el7ost.noarch
python-neutronclient-6.1.0-1.el7ost.noarch
openstack-tripleo-heat-templates-6.1.0-2.el7ost.noarch

How reproducible:

Consistent during testing.


Steps to Reproduce:
1. Deploy vanilla OSP11 environment using TripleO/OSP director
2. Source the overcloudrc file
3. Use python-openstackclient to list security group rules, observe no project association in the output, yet it's correctly associated in the database

Actual results:

Project ID's are empty in the output

Expected results:

Project ID's are correctly listed in the output


Additional info:
Comment 1 Julie Pichon 2017-08-15 10:23:00 EDT
Thank you for the bug report. This appears to be fixed in 3.10 in Pike/OSP12.

I also proposed an Ocata backport upstream in the background, we'll see how it goes.
Comment 4 Julie Pichon 2017-09-07 12:33:39 EDT
For the record, the Ocata backport also merged upstream ( https://review.openstack.org/#/c/493884/ ) and should be included in the next OSP11 rebase.
Comment 8 errata-xmlrpc 2017-12-13 16:49:38 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:3462

Note You need to log in before you can comment on or make changes to this bug.