Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: In volume details, io_limit_policy dictionary in key 'name' is holding 'id' value. #43

Open
Piaskun opened this issue Oct 4, 2023 · 2 comments
Labels
needs-triage Triage required type/bug Something isn't working

Comments

@Piaskun
Copy link

Piaskun commented Oct 4, 2023

Describe the bug
If volume has io_limit_policy applied, on volume details we have:

"io_limit_policy": {
  "id": "qp_2",
  "name": "qp_2"
},

So for both 'id' and 'name' key, dictionary has 'id' value.

To Reproduce
Steps to reproduce the behavior:

  1. Set IO policy on volume
  2. Query volume details
  3. io_limit_policy dictionary has io_policy id in both 'id' and 'name' keys.

Expected behavior
io_limit_policy dictionary has io_policy name value under 'name' key.

Additional context
I suspect bug in:
volume.py line 971:

            if obj_vol.io_limit_policy:
                volume_details.update(
                    {'io_limit_policy': {'name': obj_vol.io_limit_policy.id,
                                         'id': obj_vol.io_limit_policy.id}})
@Piaskun Piaskun added needs-triage Triage required type/bug Something isn't working labels Oct 4, 2023
@Piaskun
Copy link
Author

Piaskun commented Oct 5, 2023

I can confirm, that change in volume.py line 971

            if obj_vol.io_limit_policy:
                volume_details.update(
                    {'io_limit_policy': {'name': obj_vol.io_limit_policy.name,
                                         'id': obj_vol.io_limit_policy.id}})

fixed this issue

@anupamaloke
Copy link
Collaborator

Hi @Piaskun, thank you for reporting this issue and the fix. Would you also like to submit a PR may be :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Triage required type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants