Commit c0e05bf
committed
ceph-volume: drop unnecessary call to
`Zap.zap_lv()` currently makes a call to `get_single_lv()`:
```
lv = api.get_single_lv(filters={'lv_name': device.lv_name,
'vg_name': device.vg_name})
```
this isn't needed and redundant as zap_lv() takes an instance of `Device()`
as argument which has already a `lv_api` attribute:
class Device in device.py:
```
else:
vgname, lvname = self.path.split('/')
filters = {'lv_name': lvname, 'vg_name': vgname}
lv = lvm.get_single_lv(filters=filters) # <---- same call
if lv:
self.lv_api = lv
```
This implies a duplicate call to `subprocess.Popen()` unnecessarily.
Fixes: https://tracker.ceph.com/issues/68312
Signed-off-by: Guillaume Abrioux <[email protected]>get_single_lv()
1 parent 41f803a commit c0e05bf
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
195 | | - | |
| 194 | + | |
196 | 195 | | |
197 | 196 | | |
198 | 197 | | |
| |||
0 commit comments