mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-23 22:50:09 +03:00
F #5326: Fix snapshot state check
This commit is contained in:
parent
d1aac6bebb
commit
8b31c3d448
@ -1519,8 +1519,10 @@ int DispatchManager::snapshot_delete(int vid, int snap_id,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ( (vm->get_state() != VirtualMachine::ACTIVE || vm->get_lcm_state() != VirtualMachine::RUNNING) ||
|
||||
(!vmm->is_keep_snapshots(vm->get_vmm_mad()) && vm->get_state() == VirtualMachine::POWEROFF) )
|
||||
if ( (vm->get_state() != VirtualMachine::ACTIVE ||
|
||||
vm->get_lcm_state() != VirtualMachine::RUNNING) &&
|
||||
(!vmm->is_keep_snapshots(vm->get_vmm_mad()) ||
|
||||
vm->get_state() != VirtualMachine::POWEROFF) )
|
||||
{
|
||||
oss << "Could not delete snapshot " << snap_id << " for VM " << vid
|
||||
<< ", wrong state " << vm->state_str() << ".";
|
||||
|
Loading…
x
Reference in New Issue
Block a user