Project

General

Profile

Actions

Bug #49643

closed

get_first_lv() can return wrong lv

Added by Guillaume Abrioux about 3 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
pacific,octopus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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


Related issues 2 (0 open2 closed)

Copied to ceph-volume - Backport #53283: octopus: get_first_lv() can return wrong lvResolvedGuillaume AbriouxActions
Copied to ceph-volume - Backport #53284: pacific: get_first_lv() can return wrong lvResolvedGuillaume AbriouxActions
Actions #1

Updated by Guillaume Abrioux about 3 years ago

  • Pull request ID set to 39907
Actions #2

Updated by Guillaume Abrioux over 2 years ago

  • Status changed from In Progress to Pending Backport
  • Backport set to pacific,octopus
Actions #3

Updated by Guillaume Abrioux over 2 years ago

  • Copied to Backport #53283: octopus: get_first_lv() can return wrong lv added
Actions #4

Updated by Guillaume Abrioux over 2 years ago

  • Copied to Backport #53284: pacific: get_first_lv() can return wrong lv added
Actions #5

Updated by Guillaume Abrioux over 2 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF