Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ public boolean deleteVMSnapshot(VMSnapshot vmSnapshot) {
final String snapshotName = vmSnapshotVO.getName();
final List<String> failedToDelete = new ArrayList<>();
for (VolumeObjectTO volumeObjectTO : volumeTOs) {
final String rscName = LinstorUtil.RSC_PREFIX + volumeObjectTO.getUuid();
final String volPath = volumeObjectTO.getPath();
final String rscName = LinstorUtil.RSC_PREFIX + (volPath != null ? volPath : volumeObjectTO.getUuid());
String err = linstorDeleteSnapshot(api, rscName, snapshotName);

if (err != null)
Expand Down Expand Up @@ -292,7 +293,8 @@ private boolean revertVMSnapshotOperation(VMSnapshot vmSnapshot, long userVmId)
final String snapshotName = vmSnapshotVO.getName();

for (VolumeObjectTO volumeObjectTO : volumeTOs) {
final String rscName = LinstorUtil.RSC_PREFIX + volumeObjectTO.getUuid();
final String volPath = volumeObjectTO.getPath();
final String rscName = LinstorUtil.RSC_PREFIX + (volPath != null ? volPath : volumeObjectTO.getUuid());
String err = linstorRevertSnapshot(api, rscName, snapshotName);
if (err != null) {
throw new CloudRuntimeException(String.format(
Expand Down