Fix Usage event when a volume in allocated state is deleted (#5901)

Co-authored-by: SadiJr <sadi@scclouds.com.br>
This commit is contained in:
SadiJr 2022-02-21 06:06:47 -03:00 committed by GitHub
parent 5d1e54a4ab
commit e7082d9384
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1605,6 +1605,7 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
_volsDao.remove(volume.getId());
try {
stateTransitTo(volume, Volume.Event.DestroyRequested);
stateTransitTo(volume, Volume.Event.OperationSucceeded);
} catch (NoTransitionException e) {
s_logger.debug("Failed to destroy volume" + volume.getId(), e);
return null;