Skip to content

Commit ba74778

Browse files
committed
backup(nas): wrapper uses the passed bitmap name instead of re-parsing it
The BITMAP_CREATED line is only a success signal (the bitmap genuinely isn't created for stopped-VM RBD/LINSTOR sources); its value is the same --bitmap-new we passed in, so use command.getBitmapNew() rather than re-parsing the echoed value. Addresses review comment on #13074 (LibvirtTakeBackupCommandWrapper).
1 parent 3456ba7 commit ba74778

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtTakeBackupCommandWrapper.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ public Answer execute(TakeBackupCommand command, LibvirtComputingResource libvir
122122
for (String line : stdout.split("\n")) {
123123
String trimmed = line.trim();
124124
if (trimmed.startsWith("BITMAP_CREATED=")) {
125-
bitmapCreated = trimmed.substring("BITMAP_CREATED=".length());
125+
// The marker only confirms the bitmap was actually created on the disks
126+
// (it isn't, e.g., for stopped-VM RBD/LINSTOR sources). The name itself is
127+
// the value we already passed via --bitmap-new, so use that rather than
128+
// re-parsing the echoed value.
129+
bitmapCreated = command.getBitmapNew();
126130
continue;
127131
}
128132
if (trimmed.startsWith("INCREMENTAL_FALLBACK=")) {

0 commit comments

Comments
 (0)