mirror of https://github.com/apache/cloudstack.git
volume upload: persisting into volume store ref only when SSVM is found
This commit is contained in:
parent
b343fb79e3
commit
a710743871
|
|
@ -1226,9 +1226,6 @@ public class VolumeServiceImpl implements VolumeService {
|
|||
|
||||
@Override
|
||||
public Pair<EndPoint,DataObject> registerVolumeForPostUpload(VolumeInfo volume, DataStore store) {
|
||||
DataObject volumeOnStore = store.create(volume);
|
||||
|
||||
volumeOnStore.processEvent(Event.CreateOnlyRequested);
|
||||
|
||||
EndPoint ep = _epSelector.select(store);
|
||||
if (ep == null) {
|
||||
|
|
@ -1236,6 +1233,7 @@ public class VolumeServiceImpl implements VolumeService {
|
|||
s_logger.warn(errorMessage);
|
||||
throw new CloudRuntimeException(errorMessage);
|
||||
}
|
||||
DataObject volumeOnStore = store.create(volume);
|
||||
return new Pair<>(ep,volumeOnStore);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue