Secondary Storage Usage Improvements#4053
Conversation
DaanHoogland
left a comment
There was a problem hiding this comment.
some intermediate comments. no blockers and not done with the full review.
| @Override | ||
| public MigrationResponse migrateData(Long srcDataStoreId, List<Long> destDatastores, MigrationPolicy migrationPolicy) { |
There was a problem hiding this comment.
this method is way too long. please modularise it into byte size chunks and factor it out to a worker - or utility class?
I can not set a rule but in my opinion any method larger than 20 line or any class larger than 300 lines is probably not separating concerns.
every comment in this method should probably be converted to a good method name and extracted, and so should many top level blocks (if-, for- and while statements
There was a problem hiding this comment.
Created a utility class
There was a problem hiding this comment.
It is still 112 lines and there are a lot of comments in it that could serve as method names. This would help make the code more prozaic and thus easier to read. This method could do with some modularisation.
There was a problem hiding this comment.
75 lines, still big but i slowly get the picture ;)
| @Override | ||
| public MigrationResponse migrateData(Long srcDataStoreId, List<Long> destDatastores, MigrationPolicy migrationPolicy) { |
There was a problem hiding this comment.
It is still 112 lines and there are a lot of comments in it that could serve as method names. This would help make the code more prozaic and thus easier to read. This method could do with some modularisation.
|
Packaging result: ✖centos7 ✖centos8 ✖debian. JID-1990 |
|
@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-1993 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2733)
|
|
Tests LGTM, I checked all are intermittent failures. |
|
@blueorangutan package |
|
@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2016 |
|
@blueorangutan test |
|
@Pearl1594 a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
| @@ -0,0 +1 @@ | |||
| cks | |||
|
@Pearl1594 pl advise if/when this is ready for merge, thnx |
|
@rhtyd post this round of smoke test, the PR will be ready for merging |
|
Trillian test result (tid-2753)
|
|
@rhtyd - ready to merge - test failures seem unrelated to this PR |
| @@ -53,6 +53,33 @@ ALTER TABLE `cloud`.`vm_instance` ADD COLUMN `backup_offering_id` bigint unsigne | |||
| ALTER TABLE `cloud`.`vm_instance` ADD COLUMN `backup_external_id` varchar(255) DEFAULT NULL COMMENT 'ID of external backup job or container if any'; | |||
| ALTER TABLE `cloud`.`vm_instance` ADD COLUMN `backup_volumes` text DEFAULT NULL COMMENT 'details of backedup volumes'; | |||
|
|
|||
There was a problem hiding this comment.
This schema change has to be moved to schema-41400to41500.sql.
@Pearl1594 please raise a separate PR as this is already merged.
Enable migration of data between secondary storage pools - addresses feature: apache/cloudstack#4053
Enable migration of data between secondary storage pools - addresses feature: #4053 Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Description
This feature enables the following:
Related Primate PR: apache/cloudstack-primate#326
Types of changes