5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-10 01:18:01 +03:00

api: vm clone: remove cloned FW conf in error cleanup path

We clone the source VM firewall config before forking the "realcmd"
worker, but did not mind cleaning it up again if the clone failed
somewhere in the worker.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-01-15 08:06:14 +01:00
parent a85ff91ba0
commit c05c90a10d

View File

@ -2940,6 +2940,9 @@ __PACKAGE__->register_method({
eval { PVE::Storage::vdisk_free($storecfg, $volid); };
warn $@ if $@;
}
PVE::Firewall::remove_vmfw_conf($newid);
die "clone failed: $err";
}