mirror of https://github.com/apache/cloudstack.git
CS-16089: Create Template after upgrade from snapshot taken in 2.2.14 was failing since the swift_id was not null but 0 instead. Put a check in the code to check for not null and not 0 swift_id to go and download the snapshot from the swift.
Reviewed-by: Kishan
This commit is contained in:
parent
20ccb6c1cb
commit
7aa7d6e39f
|
|
@ -842,7 +842,7 @@ public class SnapshotManagerImpl implements SnapshotManager, SnapshotService, Ma
|
|||
@Override
|
||||
public HostVO getSecondaryStorageHost(SnapshotVO snapshot) {
|
||||
HostVO secHost = null;
|
||||
if( snapshot.getSwiftId() == null ) {
|
||||
if( snapshot.getSwiftId() == null || snapshot.getSwiftId() == 0) {
|
||||
secHost = _hostDao.findById(snapshot.getSecHostId());
|
||||
} else {
|
||||
Long dcId = snapshot.getDataCenterId();
|
||||
|
|
|
|||
|
|
@ -1523,7 +1523,7 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
|||
}
|
||||
}
|
||||
}
|
||||
if( snapshot.getSwiftId() != null ) {
|
||||
if( snapshot.getSwiftId() != null && snapshot.getSwiftId() != 0 ) {
|
||||
_snapshotMgr.downloadSnapshotsFromSwift(snapshot);
|
||||
}
|
||||
cmd = new CreatePrivateTemplateFromSnapshotCommand(pool.getUuid(), secondaryStorageURL, dcId, accountId, snapshot.getVolumeId(), backupSnapshotUUID, snapshot.getName(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue