Uh oh!
There was an error while loading. Please reload this page.
[CLOUDSTACK-10323] Allow changing disk offering during volume migration - #2486
Conversation
borisstoyanov
commented
Mar 14, 2018
thanks for this PR @rafaelweingartner, are you looking into adding a marvin tests for this ? |
rafaelweingartner
commented
Mar 14, 2018
I added unit test for the code I changed. I was not planning to create a Marvin tests though. |
borisstoyanov
commented
Mar 14, 2018
@blueorangutan package |
blueorangutan
commented
Mar 14, 2018
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
borisstoyanov
commented
Mar 14, 2018
ok @rafaelweingartner, let me run some tests |
blueorangutan
commented
Mar 14, 2018
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1777 |
borisstoyanov
commented
Mar 14, 2018
@blueorangutan test |
blueorangutan
commented
Mar 14, 2018
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Mar 14, 2018
Trillian test result (tid-2363)
|
borisstoyanov
commented
Mar 15, 2018
@rafaelweingartner I've created a marvin test but I'm not able to push to your repo. How can I contribute? |
rafaelweingartner
commented
Mar 15, 2018
Thanks! |
borisstoyanov
commented
Mar 15, 2018
I'm not sure I'm doing this right.. but git says there's nothing to compare.. |
rafaelweingartner
commented
Mar 15, 2018
Did you pushed your changes to your branch in the remote repository? |
borisstoyanov
commented
Mar 15, 2018
@blueorangutan package |
blueorangutan
commented
Mar 15, 2018
@borisstoyanov a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Mar 15, 2018
Packaging result: ✔centos6 ✔centos7 ✖debian. JID-1781 |
blueorangutan
commented
Mar 15, 2018
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
DaanHoogland
commented
Mar 15, 2018
debian packaging failed and so did jenkins and travis! |
rafaelweingartner
commented
Mar 15, 2018
Yes. However, that is a consequence of the last merge and is fixed with: #2491 |
borisstoyanov
commented
Mar 16, 2018
@blueorangutan test |
blueorangutan
commented
Mar 16, 2018
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
borisstoyanov
commented
Mar 16, 2018
@blueorangutan test |
blueorangutan
commented
Mar 16, 2018
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
This is a continuation of work developed on PR apache#2425 (CLOUDSTACK-10240), which provided root admins an override mechanism to move volumes between storage systems types (local/shared) even when the disk offering would not allow such operation. To complete the work, we will now provide a way for administrators to enter a new disk offering that can reflect the new placement of the volume. We will add an extra parameter to allow the root admin inform a new disk offering for the volume. Therefore, when the volume is being migrated, it will be possible to replace the disk offering to reflect the new placement of the volume. The API method will have the following parameters: * storageid (required) * volumeid (required) * livemigrate(optional) * newdiskofferingid (optional) – this is the new parameter The expected behavior is the following: * If “newdiskofferingid” is not provided the current behavior is maintained. Override mechanism will also keep working as we have seen so far. * If the “newdiskofferingid” is provided by the admin, we will execute the following checks ** new disk offering mode (local/shared) must match the target storage mode. If it does not match, an exception will be thrown and the operator will receive a message indicating the problem. ** we will check if the new disk offering tags match the target storage tags. If it does not match, an exception will be thrown and the operator will receive a message indicating the problem. ** check if the target storage has the capacity for the new volume. If it does not have enough space, then an exception is thrown and the operator will receive a message indicating the problem. ** check if the size of the volume is the same as the size of the new disk offering. If it is not the same, we will ALLOW the change of the service offering, and a warning message will be logged. We execute the change of the Disk offering as soon as the migration of the volume finishes. Therefore, if an error happens during the migration and the volume remains in the original storage system, the disk offering will keep reflecting this situation.
* Adding a test to cover migration with new disk offering * Update test_volumes.py * Update test_volumes.py
3f90089 to
4b87733Comparerafaelweingartner
commented
Mar 16, 2018
@DaanHoogland now everything is ok again. |
DaanHoogland
commented
Mar 16, 2018
thanks @rafaelweingartner , didn't notice the relation |
blueorangutan
commented
Apr 7, 2018
@rafaelweingartner a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Apr 7, 2018
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1889 |
DaanHoogland
commented
Apr 8, 2018
@blueorangutan test |
blueorangutan
commented
Apr 8, 2018
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Apr 9, 2018
Trillian test result (tid-2471)
|
rafaelweingartner
commented
Apr 9, 2018
@borisstoyanov with that change in the test case, now the test we created for this PR passed. Some tests failed, but they are different from the last run. |
borisstoyanov
commented
Apr 10, 2018
yup, let me run it again @blueorangutan test |
blueorangutan
commented
Apr 10, 2018
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
PaulAngus
commented
Apr 10, 2018
@blueorangutan test |
blueorangutan
commented
Apr 10, 2018
@PaulAngus a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Apr 11, 2018
Trillian test result (tid-2488)
|
rafaelweingartner
commented
Apr 16, 2018
@nitin-maharana are you LGTM here? |
GabrielBrascher
left a comment
There was a problem hiding this comment.
Thanks for the PR @rafaelweingartner.
I have just two minor observations on Javadoc.
The code is well documented and covered with unit tests; additionally, it has passed on integration tests. Based on that, it LGTM.
| StoragePool destPool = (StoragePool)dataStoreMgr.getDataStore(destPoolId, DataStoreRole.Primary); | ||
| assert (destPool != null); | ||
| /** | ||
| * Retrieve the new disk offering UUID that might be sent to replace the current one in the volume being migrated. |
There was a problem hiding this comment.
I think that it should be "Retrieves", right?
There was a problem hiding this comment.
If you read as "it (the method) retrieves the new .....". Then, yes, I guess it should be "Retrieves".
I will change that.
| } | ||
| /** | ||
| * Retrieve the storage pool tags as a {@link String}. If the storage pool does not have tags we return a null value. |
There was a problem hiding this comment.
I think that "Retrieves" would best fit here.
…l selected After using the feature introduced by apache#2486 in production, we felt the need for an improvement in the UI. It is interesting to filter the displayed disk offerings according to the type of storage selected (local/shared) to migrate the volume to.
…l selected After using the feature introduced by apache#2486 in production, we felt the need for an improvement in the UI. It is interesting to filter the displayed disk offerings according to the type of storage selected (local/shared) to migrate the volume to.
…l selected After using the feature introduced by apache#2486 in production, we felt the need for an improvement in the UI. It is interesting to filter the displayed disk offerings according to the type of storage selected (local/shared) to migrate the volume to.
…l selected After using the feature introduced by apache#2486 in production, we felt the need for an improvement in the UI. It is interesting to filter the displayed disk offerings according to the type of storage selected (local/shared) to migrate the volume to.
…l selected After using the feature introduced by apache#2486 in production, we felt the need for an improvement in the UI. It is interesting to filter the displayed disk offerings according to the type of storage selected (local/shared) to migrate the volume to.

This is a continuation of work developed on PR #2425 (CLOUDSTACK-10240), which provided root admins an override mechanism to move volumes between storage systems types (local/shared) even when the disk offering would not allow such operation. To complete the work, we will now provide a way for administrators to enter a new disk offering that can reflect the new placement of the volume. We will add an extra parameter to allow the root admin inform a new disk offering for the volume. Therefore, when the volume is being migrated, it will be possible to replace the disk offering to reflect the new placement of the volume.
The API method will have the following parameters:
The expected behavior is the following:
We execute the change of the Disk offering as soon as the migration of the volume finishes. Therefore, if an error happens during the migration and the volume remains in the original storage system, the disk offering will keep reflecting this situation.
Attached is a screenshot to show how the migrate option will look like:
