mirror of https://github.com/apache/cloudstack.git
bug 11183: put volume state into "Creating" state if it's created from snapshot.
status 11183: resolved fixed
This commit is contained in:
parent
18255e985c
commit
8bbed3caea
|
|
@ -1754,7 +1754,11 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag
|
|||
volume.setInstanceId(null);
|
||||
volume.setUpdated(new Date());
|
||||
volume.setDomainId((account == null) ? Domain.ROOT_DOMAIN : account.getDomainId());
|
||||
volume.setState(Volume.State.Allocated);
|
||||
if (cmd.getSnapshotId() == null) {
|
||||
volume.setState(Volume.State.Allocated);
|
||||
} else {
|
||||
volume.setState(Volume.State.Creating);
|
||||
}
|
||||
volume = _volsDao.persist(volume);
|
||||
UsageEventVO usageEvent = new UsageEventVO(EventTypes.EVENT_VOLUME_CREATE, volume.getAccountId(), volume.getDataCenterId(), volume.getId(), volume.getName(), diskOfferingId, null, size);
|
||||
_usageEventDao.persist(usageEvent);
|
||||
|
|
|
|||
Loading…
Reference in New Issue