-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Prevent KVM from performing volume migrations of running instances #4562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent KVM from performing volume migrations of running instances #4562
Conversation
GabrielBrascher
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM.
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm
66fa777 to
5113863
Compare
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2524 |
weizhouapache
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code makes sense.
could you please create pr for 4.15 instead of master ? (some changes on pom.xml needs to be reverted)
|
The PR base branch is 4.15 @weizhouapache, I think you mean rebase against 4.15 |
@rhtyd by the way, is there same issue in 4.14 ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code LGTM.
great job @GutoVeronezi
what do you mean with:
How Has This Been Tested?
It has been tested locally.
could you please explain how to test this branch?
I tested this branch using the following behavior.
- Create a virtual machine using KVM as a hypervisor
- Run the 'migrateVolume' command with the instance running.
- I checked the database to see if the information on that disk had been 'changed'
- check the storage pool to see if the target volume has actually been moved as requested
- at this point we can verify an inconsistency, the database tells us that the volume has been moved to the target storage pool, however it is not possible to identify the volume in this storage pool.
is this correct my test form?
|
@RodrigoDLopez it's a good way to test it. Before the commit, what you described in step 5 is what was happening. To test it...
|
|
@GutoVeronezi @rhtyd |
|
Thanks for the review guys. To us, it is fine if it only goes to master. |
@GutoVeronezi |
@weizhouapache |
@GutoVeronezi when you create a pr, it will trigger jenkins test, travis test, trillian test, and also be reviewed and/or manual tested by community. no matter which dest branch is. |
@weizhouapache |
|
@GutoVeronezi ok, got it. |
shwstppr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@weizhouapache @DaanHoogland @rhtyd do we plan to backport this or should this go into 4.15.1.0?
|
@weizhouapache @shwstppr @GutoVeronezi @rhtyd I am always for merging in the oldest applicable branch first. If we want this in those branches we should rebase it first (imnsho). |
@DaanHoogland I agree. merge it to 4.14 at first, then merge to 4.15/master. @GutoVeronezi can you create this branch from 4.14, apply the code change and force-push to github ? |
KVM has a limitation to modify instances definitions while they are on running state. Therefore, it is not possible to change volumes backend location easily. There is a problem in the `migrateVolume` API. This API command ignores that limitation and causes an inconsistence on the database. ACS processes the migrate command, copies the volume to the destination storage, modifies the database and finishes the process with success. However, the running backend is still using the "old volume file". This PR intends to prevent KVM to perform volumes migrations while KVM instances are in the running state and inform the user of an alternative API command that enables such operation on running instances.
5113863 to
bc760f2
Compare
|
@weizhouapache done |
weizhouapache
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm
@GutoVeronezi good, thanks |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✖centos8 ✖debian. JID-2708 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-3540)
|
|
not sure if we need more third party testing on this. @rhtyd @weizhouapache, can we ? |
|
Simple fix, I add a space between |
…es (apache#4562) * Prevent KVM from performing volume migrations of running instances KVM has a limitation to modify instances definitions while they are on running state. Therefore, it is not possible to change volumes backend location easily. There is a problem in the `migrateVolume` API. This API command ignores that limitation and causes an inconsistence on the database. ACS processes the migrate command, copies the volume to the destination storage, modifies the database and finishes the process with success. However, the running backend is still using the "old volume file". This PR intends to prevent KVM to perform volumes migrations while KVM instances are in the running state and inform the user of an alternative API command that enables such operation on running instances. * Update VolumeApiServiceImpl.java Co-authored-by: Daniel Augusto Veronezi Salvador <[email protected]> Co-authored-by: Rohit Yadav <[email protected]>
Description
KVM has a limitation to modify instances definitions while they are on running state. Therefore, it is not possible to change volumes backend location easily.
There is a problem in the
migrateVolumeAPI. This API command ignores that limitation and causes an inconsistence on the database. ACS processes the migrate command, copies the volume to the destination storage, modifies the database and finishes the process with success. However, the running backend is still using the "old volume file".This PR intends to prevent KVM to perform volumes migrations while KVM instances are in the running state and inform the user of an alternative API command that enables such operation on running instances.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
How Has This Been Tested?
It has been tested locally.