server: Do not resize volume of running vm on KVM host if host is not Up or not Enabled#4148
Conversation
… Up or not Enabled
| /* Do not resize volume of running vm on KVM host if host is not Up or not Enabled */ | ||
| if (currentSize != newSize && userVm.getState() == State.Running && userVm.getHypervisorType() == HypervisorType.KVM) { | ||
| HostVO host = _hostDao.findById(userVm.getHostId()); | ||
| if (host.getStatus() != Status.Up) { |
There was a problem hiding this comment.
@ustcweizhou should you do a null check, what if the host was removed?
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔debian. JID-1422 |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔debian. JID-1438 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1834)
|
|
LGTM |
Description
If we resize a volume of a vm running on a host which is not Up or not Enable, the job will be scheduled to another normal host. Then the volume will be resized by "qemu-img resize" instead of "virsh blockresize", the image might be corrupted after resize.
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?