mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
linstor: deleteAsync fallback to volume UUID if path not set yet (#9325)
This commit is contained in:
parent
121a35d666
commit
eb1a0ef7f2
@ -242,7 +242,9 @@ public class LinstorPrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver
|
|||||||
case VOLUME:
|
case VOLUME:
|
||||||
{
|
{
|
||||||
final VolumeInfo volumeInfo = (VolumeInfo) dataObject;
|
final VolumeInfo volumeInfo = (VolumeInfo) dataObject;
|
||||||
final String rscName = LinstorUtil.RSC_PREFIX + volumeInfo.getPath();
|
// if volume creation wasn't completely done .setPath wasn't called, so we fallback to vol.getUuid()
|
||||||
|
final String volUuid = volumeInfo.getPath() != null ? volumeInfo.getPath() : volumeInfo.getUuid();
|
||||||
|
final String rscName = LinstorUtil.RSC_PREFIX + volUuid;
|
||||||
deleteResourceDefinition(storagePool, rscName);
|
deleteResourceDefinition(storagePool, rscName);
|
||||||
|
|
||||||
long usedBytes = storagePool.getUsedBytes();
|
long usedBytes = storagePool.getUsedBytes();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user