cinder list shows multiple duplicate copies of each volume
This is due to get_local_volumes api changed from community, it always
cannot get local volume from db(empty list []), so driver attempts
to insert new volumes every time restarted or periodically sync.
Change-Id: I225394bfaff2229dbb93caa69e067154c608c15a
Closes-Bug: 1435121
(cherry picked from commit 516eba24a7
)
This commit is contained in:
parent
148c8822e5
commit
86b4c4ee2d
|
@ -816,8 +816,8 @@ class PowerVCCinderManager(service.Service):
|
||||||
db_matches = db.volume_get_all(context,
|
db_matches = db.volume_get_all(context,
|
||||||
marker=None,
|
marker=None,
|
||||||
limit=None,
|
limit=None,
|
||||||
sort_key='created_at',
|
sort_keys=['created_at'],
|
||||||
sort_dir='desc')
|
sort_dirs=['desc'])
|
||||||
for local_volume in db_matches:
|
for local_volume in db_matches:
|
||||||
if self._get_pvc_id_from_local_volume(local_volume)is not None:
|
if self._get_pvc_id_from_local_volume(local_volume)is not None:
|
||||||
local_pvc_volumes.append(local_volume)
|
local_pvc_volumes.append(local_volume)
|
||||||
|
|
Loading…
Reference in New Issue