1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-20 10:50:08 +03:00

M #-: Reset VM backups if the current active backup image is deleted

This commit is contained in:
Ruben S. Montero 2022-12-12 10:51:01 +01:00
parent 3beca2d9d3
commit 956af4f8a9
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

@ -524,6 +524,14 @@ void ImageManager::_rm(unique_ptr<image_msg_t> msg)
{
vm->backups().del(img_id);
//Reset increment pointers when removing active backup
if (stoi(vm->backups().last_backup_id()) == img_id)
{
vm->backups().last_increment_id(-1);
vm->backups().incremental_backup_id(-1);
}
vmpool->update(vm.get());
}