mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-22 13:33:52 +03:00
(cherry picked from commit 0a57636bf3
)
This commit is contained in:
parent
5966e8d60d
commit
0949062589
@ -2319,13 +2319,6 @@ void LifeCycleManager::trigger_disk_resize_success(int vid)
|
||||
|
||||
if ( auto vm = vmpool->get(vid) )
|
||||
{
|
||||
VirtualMachineDisk * disk = vm->get_resize_disk();
|
||||
|
||||
if ( disk == nullptr )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
state = vm->get_lcm_state();
|
||||
|
||||
switch (state)
|
||||
@ -2345,6 +2338,15 @@ void LifeCycleManager::trigger_disk_resize_success(int vid)
|
||||
return;
|
||||
}
|
||||
|
||||
VirtualMachineDisk * disk = vm->get_resize_disk();
|
||||
|
||||
if ( disk == nullptr )
|
||||
{
|
||||
vm->log("LCM", Log::ERROR,
|
||||
"disk_resize_success, but the VM doesn't have a disk with resize operation in progress");
|
||||
return;
|
||||
}
|
||||
|
||||
disk->clear_resize(false);
|
||||
|
||||
is_persistent = disk->is_persistent();
|
||||
@ -2403,8 +2405,6 @@ void LifeCycleManager::trigger_disk_resize_failure(int vid)
|
||||
|
||||
if ( auto vm = vmpool->get(vid) )
|
||||
{
|
||||
VirtualMachineDisk * disk = vm->get_resize_disk();
|
||||
|
||||
state = vm->get_lcm_state();
|
||||
|
||||
switch (state)
|
||||
@ -2423,6 +2423,15 @@ void LifeCycleManager::trigger_disk_resize_failure(int vid)
|
||||
return;
|
||||
}
|
||||
|
||||
VirtualMachineDisk * disk = vm->get_resize_disk();
|
||||
|
||||
if ( disk == nullptr )
|
||||
{
|
||||
vm->log("LCM", Log::ERROR,
|
||||
"disk_resize_failure, but the VM doesn't have a disk with resize operation in progress");
|
||||
return;
|
||||
}
|
||||
|
||||
vm_uid = vm->get_uid();
|
||||
vm_gid = vm->get_gid();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user