Share networks not being retrieved while showing security service

Bug #1981626 reported by Carlos Eduardo
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
In Progress
Low
Unassigned

Bug Description

Description
===========
While showing security services, we should be displaying the share networks even when there are no share networks attached. Only the detail API is returning such field.

Steps to reproduce
==================

You can reproduce this with manilaclient or calling the API itself. Steps to reproduce using manilaclient:
* Create a share network
* Create a security service
* Attach the share network to the security service
* Run manila security-service-show command specifying the name of the security service

Expected result
===============
The security service show command should display the share networks that the security service is attached to, as shown in [0].

Actual result
=============
Share networks are not being displayed, as shown in [1].

Environment
===========
1. Devstack on master branch (zed)

2. Does not need a specific backend to reproduce

Logs & Configs
==============

[0] https://paste.opendev.org/show/bTl4edBRpSH0ey1onjqA/
[1] https://paste.opendev.org/show/bGjdONp17ryfcUHz5PH1/

Revision history for this message
Carlos Eduardo (silvacarlose) wrote :

The code that appends share networks to the output is in this [2] part of the code. This bug is not reproducible while specifying the ID of the security service in manilaclient because when specifying the ID, we will use the show API, and when specifying the name, we will use the generic search that consists in a detail + filtering out the options.

[2] https://github.com/openstack/manila/blob/master/manila/api/v1/security_service.py#L141

Revision history for this message
Carlos Eduardo (silvacarlose) wrote :

One approach to solve this bug would be:

- Introduce a new API microversion
- In the detail view, if the request API version does not match the introduced one, we keep the same behavior as before, only adding the security service in the detail, in the end of the method.
- In the views, add a new versioned method to add share networks
- Older APIs will not have the share networks being displayed in the show, to do not break clients consuming the API

tags: added: api low-hanging-fruit
Vida Haririan (vhariria)
Changed in manila:
importance: Undecided → Low
status: New → Triaged
Vida Haririan (vhariria)
Changed in manila:
assignee: nobody → Luiz Felipe Looze dos Santos (luizsantos)
milestone: none → zed-3
Revision history for this message
Vida Haririan (vhariria) wrote :
Changed in manila:
milestone: zed-3 → zed-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/manila/+/858356

Changed in manila:
status: Triaged → In Progress
Changed in manila:
milestone: zed-rc1 → antelope-1
Changed in manila:
milestone: antelope-1 → antelope-2
Changed in manila:
milestone: antelope-2 → antelope-3
Changed in manila:
milestone: antelope-3 → antelope-rc1
Changed in manila:
milestone: antelope-rc1 → bobcat-1
Changed in manila:
milestone: bobcat-1 → bobcat-2
Changed in manila:
milestone: bobcat-2 → bobcat-3
Changed in manila:
milestone: bobcat-3 → caracal-1
Changed in manila:
milestone: caracal-1 → caracal-2
Changed in manila:
milestone: caracal-2 → caracal-3
Changed in manila:
milestone: caracal-3 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.