Actions
Bug #49643
closedget_first_lv() can return wrong lv
% Done:
0%
Source:
Tags:
Backport:
pacific,octopus
Regression:
No
Severity:
3 - minor
Reviewed:
Description
A review in a recent patch made me realize this function should be reworked and renamed because it could return an LV different than the one really wanted.
example:
If a system has multiple LVs having the same name in different volume groups, using `get_first_lv()` like the following (as seen in a recent patch [1]) :
`lv = api.get_first_lv(filters={'lv_name': lv_name})`
You have no guarantee which LV you will get.
Since I don't see a valid use case where we wouldn't care about which LV we are getting with this function when several LVs are available, I think this function should be reworked (even the name of the function is misleading/confusing).
[1] https://github.com/ceph/ceph/pull/38368/files#r586481975
Updated by Guillaume Abrioux over 2 years ago
- Status changed from In Progress to Pending Backport
- Backport set to pacific,octopus
Updated by Guillaume Abrioux over 2 years ago
- Copied to Backport #53283: octopus: get_first_lv() can return wrong lv added
Updated by Guillaume Abrioux over 2 years ago
- Copied to Backport #53284: pacific: get_first_lv() can return wrong lv added
Updated by Guillaume Abrioux over 2 years ago
- Status changed from Pending Backport to Resolved
Actions