You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "weizhouapache (via GitHub)" <gi...@apache.org> on 2024/03/20 08:54:19 UTC

[PR] [WIP] New feature: Import volume from storage pool [cloudstack]

weizhouapache opened a new pull request, #8808:
URL: https://github.com/apache/cloudstack/pull/8808

   ### Description
   
   This PR introduces the feature to import /unmanage volume
   - listvolumesforimport API to list all unmanaged volumes of a primary storage pool
   - importvolume API to import a unmanage volume on primary storage pool
   - unmanageolume API to unmanage a unused volume
   
   
   <!--- ******************************************************************************* -->
   <!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- ******************************************************************************* -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [x] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   - [ ] build/CI
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   
   #### How did you try to break this feature and the system with this change?
   
   <!-- see how your change affects other areas of the code, etc. -->
   
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2024279751

   <b>[SF] Trillian test result (tid-9595)</b>
   Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 42386 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8808-t9595-xenserver-71.zip
   Smoke tests completed. 130 look OK, 0 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2018613153

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9033


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2020295040

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2020438618

   Packaging result [SF]: ✖️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9043


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2020442803

   
   @blueorangutan package
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2033882194

   @blueorangutan test alma9 kvm-alma9


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2024348686

   <b>[SF] Trillian test result (tid-9596)</b>
   Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server r8
   Total time taken: 48101 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8808-t9596-vmware-67u3.zip
   Smoke tests completed. 129 look OK, 1 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_02_balanced_drs_algorithm | `Failure` | 131.29 | test_cluster_drs.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2025791874

   @blueorangutan test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2019095963

   @blueorangutan test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2018788438

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2017475424

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for review] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2069077421

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2020446032

   @weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2019195774

   <b>[SF] Trillian test result (tid-9568)</b>
   Environment: kvm-rocky8 (x2), Advanced Networking with Mgmt server r8
   Total time taken: 51434 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8808-t9568-kvm-rocky8.zip
   Smoke tests completed. 130 look OK, 0 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2012397950

   @weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2013174382

   @blueorangutan test rocky8 kvm-rocky8


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2025576181

   @weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for review] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2069081478

   @weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for review] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2069077518

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "kiranchavala (via GitHub)" <gi...@apache.org>.
kiranchavala commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2029238619

   @blueorangutan ui


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2038956834

   <b>[SF] Trillian test result (tid-9708)</b>
   Environment: kvm-alma9 (x2), Advanced Networking with Mgmt server a9
   Total time taken: 49245 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8808-t9708-kvm-alma9.zip
   Smoke tests completed. 130 look OK, 0 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2037454167

   @blueorangutan test alma9 kvm-alma9


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2042537119

   @weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2037167830

   This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2033527284

   <b>[SF] Trillian test result (tid-9665)</b>
   Environment: kvm-ubuntu22 (x2), Advanced Networking with Mgmt server u22
   Total time taken: 56559 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8808-t9665-kvm-ubuntu22.zip
   Smoke tests completed. 129 look OK, 1 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Failure` | 1059.73 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Failure` | 504.52 | test_vpc_redundant.py
   test_05_rvpc_multi_tiers | `Error` | 504.54 | test_vpc_redundant.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2033886602

   @DaanHoogland a [SL] Trillian-Jenkins test job (alma9 mgmt + kvm-alma9) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2009071554

   ## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/8808?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Project coverage is 4.34%. Comparing base [(`33dc746`)](https://app.codecov.io/gh/apache/cloudstack/commit/33dc7465c2becd95b3e40d4ef6c851fb704b46fc?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`8b4b915`)](https://app.codecov.io/gh/apache/cloudstack/pull/8808?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@             Coverage Diff              @@
   ##               main   #8808       +/-   ##
   ============================================
   - Coverage     31.04%   4.34%   -26.70%     
   ============================================
     Files          5404     361     -5043     
     Lines        380278   29004   -351274     
     Branches      55504    5092    -50412     
   ============================================
   - Hits         118053    1260   -116793     
   + Misses       246485   27604   -218881     
   + Partials      15740     140    -15600     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/8808/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [simulator-marvin-tests](https://app.codecov.io/gh/apache/cloudstack/pull/8808/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/8808/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.34% <ø> (ø)` | |
   | [unit-tests](https://app.codecov.io/gh/apache/cloudstack/pull/8808/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/8808?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2020358789

   <b>[SF] Trillian test result (tid-9579)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 47167 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8808-t9579-kvm-centos7.zip
   Smoke tests completed. 129 look OK, 1 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_02_trigger_shutdown | `Failure` | 336.93 | test_safe_shutdown.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2019097974

   @weizhouapache a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2018792585

   @weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2031682911

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9121


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2042865450

   @weizhouapache a [SL] Trillian-Jenkins test job (rocky8 mgmt + kvm-rocky8) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for review] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2070091615

   @weizhouapache a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for review] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2070083656

   @blueorangutan test


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2009831258

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache closed pull request #8808: [WIP] New feature: Import volume from storage pool
URL: https://github.com/apache/cloudstack/pull/8808


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2024493789

   <b>[SF] Trillian test result (tid-9597)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 57484 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8808-t9597-kvm-centos7.zip
   Smoke tests completed. 128 look OK, 2 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_01_sys_vm_start | `Failure` | 240.42 | test_secondary_storage.py
   test_06_stop_cpvm | `Error` | 946.65 | test_ssvm.py
   test_08_reboot_cpvm | `Error` | 912.16 | test_ssvm.py
   test_10_reboot_cpvm_forced | `Error` | 946.17 | test_ssvm.py
   test_11_destroy_ssvm | `Failure` | 916.18 | test_ssvm.py
   test_12_destroy_cpvm | `Failure` | 914.24 | test_ssvm.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2025794206

   @weizhouapache a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2013176344

   @weizhouapache a [SL] Trillian-Jenkins test job (rocky8 mgmt + kvm-rocky8) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2022860526

   @weizhouapache a [SL] Trillian-Jenkins matrix job (centos7 mgmt + xenserver71, rocky8 mgmt + vmware67u3, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2020647979

   @blueorangutan test matrix


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache closed pull request #8808: [WIP] New feature: Import volume from storage pool
URL: https://github.com/apache/cloudstack/pull/8808


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2029254270

   UI build: :heavy_check_mark:
   Live QA URL: https://qa.cloudstack.cloud/simulator/pr/8808 (QA-JID-312)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2012347078

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8994


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2029239100

   @kiranchavala a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2042669216

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9193


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2020648877

   @weizhouapache a [SL] Trillian-Jenkins matrix job (centos7 mgmt + xenserver71, rocky8 mgmt + vmware67u3, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2017478788

   @weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2017630088

   @weizhouapache a [SL] Trillian-Jenkins test job (rocky8 mgmt + kvm-rocky8) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2018221399

   > You outdid yourself in delivering good code again @weizhouapache , my compliments. As a single remark, I would try to disect `LibvirtGetVolumesOnStorageCommandWrapper.execute(final GetVolumesOnStorageCommand command, final LibvirtComputingResource libvirtComputingResource)` some more.
   > 
   > remarks are not blocking.
   
   thanks @DaanHoogland for review
   `LibvirtGetVolumesOnStorageCommandWrapper` is refactored as well


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2018897490

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9034


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for review] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2069210985

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9362


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2012173359

   @weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2012169260

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2031928877

   @weizhouapache a [SL] Trillian-Jenkins test job (ubuntu22 mgmt + kvm-ubuntu22) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2035827246

   <b>[SF] Trillian test result (tid-9681)</b>
   Environment: kvm-alma9 (x2), Advanced Networking with Mgmt server a9
   Total time taken: 54458 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8808-t9681-kvm-alma9.zip
   Smoke tests completed. 128 look OK, 2 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_11_destroy_ssvm | `Error` | 3.22 | test_ssvm.py
   test_01_migrate_VM_and_root_volume | `Error` | 100.99 | test_vm_life_cycle.py
   test_02_migrate_VM_with_two_data_disks | `Error` | 58.24 | test_vm_life_cycle.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2037279484

   ## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/8808?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   Attention: Patch coverage is `1.11248%` with `800 lines` in your changes are missing coverage. Please review.
   > Project coverage is 18.69%. Comparing base [(`c25264b`)](https://app.codecov.io/gh/apache/cloudstack/commit/c25264bada3b84118b4b20720426625bf6e4b1c0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`a2574bd`)](https://app.codecov.io/gh/apache/cloudstack/pull/8808?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   
   | [Files](https://app.codecov.io/gh/apache/cloudstack/pull/8808?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [ui/src/views/tools/ManageVolumes.vue](https://app.codecov.io/gh/apache/cloudstack/pull/8808?src=pr&el=tree&filepath=ui%2Fsrc%2Fviews%2Ftools%2FManageVolumes.vue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-dWkvc3JjL3ZpZXdzL3Rvb2xzL01hbmFnZVZvbHVtZXMudnVl) | 0.00% | [355 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8808?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...torage/volume/VolumeImportUnmanageManagerImpl.java](https://app.codecov.io/gh/apache/cloudstack/pull/8808?src=pr&el=tree&filepath=server%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fcloudstack%2Fstorage%2Fvolume%2FVolumeImportUnmanageManagerImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c2VydmVyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9jbG91ZHN0YWNrL3N0b3JhZ2Uvdm9sdW1lL1ZvbHVtZUltcG9ydFVubWFuYWdlTWFuYWdlckltcGwuamF2YQ==) | 4.05% | [213 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8808?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...pper/LibvirtGetVolumesOnStorageCommandWrapper.java](https://app.codecov.io/gh/apache/cloudstack/pull/8808?src=pr&el=tree&filepath=plugins%2Fhypervisors%2Fkvm%2Fsrc%2Fmain%2Fjava%2Fcom%2Fcloud%2Fhypervisor%2Fkvm%2Fresource%2Fwrapper%2FLibvirtGetVolumesOnStorageCommandWrapper.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGx1Z2lucy9oeXBlcnZpc29ycy9rdm0vc3JjL21haW4vamF2YS9jb20vY2xvdWQvaHlwZXJ2aXNvci9rdm0vcmVzb3VyY2Uvd3JhcHBlci9MaWJ2aXJ0R2V0Vm9sdW1lc09uU3RvcmFnZUNvbW1hbmRXcmFwcGVyLmphdmE=) | 0.00% | [79 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8808?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...e/cloudstack/storage/volume/VolumeOnStorageTO.java](https://app.codecov.io/gh/apache/cloudstack/pull/8808?src=pr&el=tree&filepath=api%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fcloudstack%2Fstorage%2Fvolume%2FVolumeOnStorageTO.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-YXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9jbG91ZHN0YWNrL3N0b3JhZ2Uvdm9sdW1lL1ZvbHVtZU9uU3RvcmFnZVRPLmphdmE=) | 0.00% | [43 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8808?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...oudstack/api/response/VolumeForImportResponse.java](https://app.codecov.io/gh/apache/cloudstack/pull/8808?src=pr&el=tree&filepath=api%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fcloudstack%2Fapi%2Fresponse%2FVolumeForImportResponse.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-YXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9jbG91ZHN0YWNrL2FwaS9yZXNwb25zZS9Wb2x1bWVGb3JJbXBvcnRSZXNwb25zZS5qYXZh) | 0.00% | [37 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8808?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...ck/api/command/admin/volume/UnmanageVolumeCmd.java](https://app.codecov.io/gh/apache/cloudstack/pull/8808?src=pr&el=tree&filepath=api%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fcloudstack%2Fapi%2Fcommand%2Fadmin%2Fvolume%2FUnmanageVolumeCmd.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-YXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9jbG91ZHN0YWNrL2FwaS9jb21tYW5kL2FkbWluL3ZvbHVtZS9Vbm1hbmFnZVZvbHVtZUNtZC5qYXZh) | 0.00% | [20 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8808?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...tack/api/command/admin/volume/ImportVolumeCmd.java](https://app.codecov.io/gh/apache/cloudstack/pull/8808?src=pr&el=tree&filepath=api%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fcloudstack%2Fapi%2Fcommand%2Fadmin%2Fvolume%2FImportVolumeCmd.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-YXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9jbG91ZHN0YWNrL2FwaS9jb21tYW5kL2FkbWluL3ZvbHVtZS9JbXBvcnRWb2x1bWVDbWQuamF2YQ==) | 0.00% | [18 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8808?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...om/cloud/agent/api/GetVolumesOnStorageCommand.java](https://app.codecov.io/gh/apache/cloudstack/pull/8808?src=pr&el=tree&filepath=core%2Fsrc%2Fmain%2Fjava%2Fcom%2Fcloud%2Fagent%2Fapi%2FGetVolumesOnStorageCommand.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9zcmMvbWFpbi9qYXZhL2NvbS9jbG91ZC9hZ2VudC9hcGkvR2V0Vm9sdW1lc09uU3RvcmFnZUNvbW1hbmQuamF2YQ==) | 0.00% | [11 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8808?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...com/cloud/agent/api/GetVolumesOnStorageAnswer.java](https://app.codecov.io/gh/apache/cloudstack/pull/8808?src=pr&el=tree&filepath=core%2Fsrc%2Fmain%2Fjava%2Fcom%2Fcloud%2Fagent%2Fapi%2FGetVolumesOnStorageAnswer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29yZS9zcmMvbWFpbi9qYXZhL2NvbS9jbG91ZC9hZ2VudC9hcGkvR2V0Vm9sdW1lc09uU3RvcmFnZUFuc3dlci5qYXZh) | 0.00% | [8 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8808?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [.../command/admin/volume/ListVolumesForImportCmd.java](https://app.codecov.io/gh/apache/cloudstack/pull/8808?src=pr&el=tree&filepath=api%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fcloudstack%2Fapi%2Fcommand%2Fadmin%2Fvolume%2FListVolumesForImportCmd.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-YXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9jbG91ZHN0YWNrL2FwaS9jb21tYW5kL2FkbWluL3ZvbHVtZS9MaXN0Vm9sdW1lc0ZvckltcG9ydENtZC5qYXZh) | 0.00% | [7 Missing :warning: ](https://app.codecov.io/gh/apache/cloudstack/pull/8808?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | ... and [5 more](https://app.codecov.io/gh/apache/cloudstack/pull/8808?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@              Coverage Diff              @@
   ##               4.19    #8808       +/-   ##
   =============================================
   - Coverage     30.98%   18.69%   -12.29%     
   + Complexity    34408    18836    -15572     
   =============================================
     Files          5359     5233      -126     
     Lines        377017   355459    -21558     
     Branches      54856    50950     -3906     
   =============================================
   - Hits         116804    66443    -50361     
   - Misses       244852   279328    +34476     
   + Partials      15361     9688     -5673     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/8808/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [simulator-marvin-tests](https://app.codecov.io/gh/apache/cloudstack/pull/8808/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `19.97% <1.98%> (-4.84%)` | :arrow_down: |
   | [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/8808/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.32% <0.00%> (-0.06%)` | :arrow_down: |
   | [unit-tests](https://app.codecov.io/gh/apache/cloudstack/pull/8808/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/8808?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2037459297

   @weizhouapache a [SL] Trillian-Jenkins test job (alma9 mgmt + kvm-alma9) has been kicked to run smoke tests


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2022856736

   @blueorangutan test matrix


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2025711658

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9080


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2042533978

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2044136034

   <b>[SF] Trillian test result (tid-9755)</b>
   Environment: kvm-rocky8 (x2), Advanced Networking with Mgmt server r8
   Total time taken: 49961 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8808-t9755-kvm-rocky8.zip
   Smoke tests completed. 130 look OK, 0 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on code in PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#discussion_r1537594411


##########
test/integration/smoke/test_import_unmanage_volumes.py:
##########
@@ -0,0 +1,168 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+""" Tests for importVolume and unmanageVolume APIs
+"""
+# Import Local Modules
+from marvin.cloudstackAPI import unmanageVolume, listVolumesForImport, importVolume
+from marvin.cloudstackTestCase import cloudstackTestCase, unittest
+from marvin.codes import FAILED
+from marvin.lib.base import (Account,
+                             Domain,
+                             Volume,
+                             ServiceOffering,
+                             DiskOffering,
+                             VirtualMachine)
+from marvin.lib.common import (get_domain, get_zone, get_suitable_test_template)
+
+# Import System modules
+from nose.plugins.attrib import attr
+
+_multiprocess_shared_ = True
+
+
+class TestImportAndUnmanageVolumes(cloudstackTestCase):
+
+    @classmethod
+    def setUpClass(cls):
+        testClient = super(TestImportAndUnmanageVolumes, cls).getClsTestClient()
+        cls.apiclient = testClient.getApiClient()
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
+
+        cls.services = testClient.getParsedTestDataConfig()
+        cls.hypervisor = testClient.getHypervisorInfo()
+        cls.domain = get_domain(cls.apiclient)
+        cls.zone = get_zone(cls.apiclient)
+        cls._cleanup = []
+
+        cls.service_offering = ServiceOffering.create(
+            cls.apiclient,
+            cls.services["service_offerings"]["tiny"]
+        )
+        cls._cleanup.append(cls.service_offering)
+
+        template = get_suitable_test_template(
+            cls.apiclient,
+            cls.zone.id,
+            cls.services["ostype"],
+            cls.hypervisor
+        )
+        if template == FAILED:
+            assert False, "get_test_template() failed to return template"
+
+        cls.services["virtual_machine"]["zoneid"] = cls.zone.id
+        cls.services["mode"] = cls.zone.networktype
+
+        cls.disk_offering = DiskOffering.create(cls.apiclient,
+                                                cls.services["disk_offering"])
+        cls._cleanup.append(cls.disk_offering)
+
+        cls.test_domain = Domain.create(
+            cls.apiclient,
+            cls.services["domain"])
+        cls._cleanup.append(cls.test_domain)
+
+        cls.test_account = Account.create(
+            cls.apiclient,
+            cls.services["account"],
+            admin=True,
+            domainid=cls.test_domain.id)
+        cls._cleanup.append(cls.test_account)
+
+        # Create VM
+        cls.virtual_machine = VirtualMachine.create(
+            cls.apiclient,
+            cls.services["virtual_machine"],
+            templateid=template.id,
+            accountid=cls.test_account.name,
+            domainid=cls.test_account.domainid,
+            serviceofferingid=cls.service_offering.id,
+            mode=cls.services["mode"]
+        )
+        cls._cleanup.append(cls.virtual_machine)
+
+        cls.virtual_machine.stop(cls.apiclient, forced=True)
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestImportAndUnmanageVolumes, cls).tearDownClass()
+
+    def setUp(self):
+        if self.testClient.getHypervisorInfo().lower() != "kvm":
+            raise unittest.SkipTest("This is only available for KVM")

Review Comment:
   fixed, thanks



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for review] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2071560330

   <b>[SF] Trillian test result (tid-9960)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 50992 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8808-t9960-kvm-centos7.zip
   Smoke tests completed. 127 look OK, 3 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_01_events_resource | `Error` | 294.74 | test_events_resource.py
   test_01_events_resource | `Error` | 294.75 | test_events_resource.py
   test_04_deploy_vm_for_other_user_and_test_vm_operations | `Failure` | 95.94 | test_network_permissions.py
   ContextSuite context=TestNetworkPermissions>:teardown | `Error` | 1.40 | test_network_permissions.py
   test_03_secured_to_nonsecured_vm_migration | `Error` | 111.58 | test_vm_life_cycle.py
   test_03_secured_to_nonsecured_vm_migration | `Error` | 111.58 | test_vm_life_cycle.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] New feature: Import/Unmange DATA volume from storage pool [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland merged PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2042861804

   @blueorangutan test rocky8 kvm-rocky8


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2037319009

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9161


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2014518080

   <b>[SF] Trillian test result (tid-9550)</b>
   Environment: kvm-rocky8 (x2), Advanced Networking with Mgmt server r8
   Total time taken: 47583 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8808-t9550-kvm-rocky8.zip
   Smoke tests completed. 130 look OK, 0 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2012394473

   
   @blueorangutan package
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2017628200

   @blueorangutan test rocky8 kvm-rocky8


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on code in PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#discussion_r1537489180


##########
test/integration/smoke/test_import_unmanage_volumes.py:
##########
@@ -0,0 +1,168 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+""" Tests for importVolume and unmanageVolume APIs
+"""
+# Import Local Modules
+from marvin.cloudstackAPI import unmanageVolume, listVolumesForImport, importVolume
+from marvin.cloudstackTestCase import cloudstackTestCase, unittest
+from marvin.codes import FAILED
+from marvin.lib.base import (Account,
+                             Domain,
+                             Volume,
+                             ServiceOffering,
+                             DiskOffering,
+                             VirtualMachine)
+from marvin.lib.common import (get_domain, get_zone, get_suitable_test_template)
+
+# Import System modules
+from nose.plugins.attrib import attr
+
+_multiprocess_shared_ = True
+
+
+class TestImportAndUnmanageVolumes(cloudstackTestCase):
+
+    @classmethod
+    def setUpClass(cls):
+        testClient = super(TestImportAndUnmanageVolumes, cls).getClsTestClient()
+        cls.apiclient = testClient.getApiClient()
+        cls.testdata = cls.testClient.getParsedTestDataConfig()
+
+        cls.services = testClient.getParsedTestDataConfig()
+        cls.hypervisor = testClient.getHypervisorInfo()
+        cls.domain = get_domain(cls.apiclient)
+        cls.zone = get_zone(cls.apiclient)
+        cls._cleanup = []
+
+        cls.service_offering = ServiceOffering.create(
+            cls.apiclient,
+            cls.services["service_offerings"]["tiny"]
+        )
+        cls._cleanup.append(cls.service_offering)
+
+        template = get_suitable_test_template(
+            cls.apiclient,
+            cls.zone.id,
+            cls.services["ostype"],
+            cls.hypervisor
+        )
+        if template == FAILED:
+            assert False, "get_test_template() failed to return template"
+
+        cls.services["virtual_machine"]["zoneid"] = cls.zone.id
+        cls.services["mode"] = cls.zone.networktype
+
+        cls.disk_offering = DiskOffering.create(cls.apiclient,
+                                                cls.services["disk_offering"])
+        cls._cleanup.append(cls.disk_offering)
+
+        cls.test_domain = Domain.create(
+            cls.apiclient,
+            cls.services["domain"])
+        cls._cleanup.append(cls.test_domain)
+
+        cls.test_account = Account.create(
+            cls.apiclient,
+            cls.services["account"],
+            admin=True,
+            domainid=cls.test_domain.id)
+        cls._cleanup.append(cls.test_account)
+
+        # Create VM
+        cls.virtual_machine = VirtualMachine.create(
+            cls.apiclient,
+            cls.services["virtual_machine"],
+            templateid=template.id,
+            accountid=cls.test_account.name,
+            domainid=cls.test_account.domainid,
+            serviceofferingid=cls.service_offering.id,
+            mode=cls.services["mode"]
+        )
+        cls._cleanup.append(cls.virtual_machine)
+
+        cls.virtual_machine.stop(cls.apiclient, forced=True)
+
+    @classmethod
+    def tearDownClass(cls):
+        super(TestImportAndUnmanageVolumes, cls).tearDownClass()
+
+    def setUp(self):
+        if self.testClient.getHypervisorInfo().lower() != "kvm":
+            raise unittest.SkipTest("This is only available for KVM")

Review Comment:
   is this method needed? the test can be done at class level as well, right? in case it is needed, do we not suppy a `tearDown(self)`?



##########
server/src/main/java/org/apache/cloudstack/storage/volume/VolumeImportUnmanageManagerImpl.java:
##########
@@ -0,0 +1,442 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.storage.volume;
+
+import com.cloud.agent.AgentManager;
+import com.cloud.agent.api.Answer;
+import com.cloud.agent.api.GetVolumesOnStorageAnswer;
+import com.cloud.agent.api.GetVolumesOnStorageCommand;
+import com.cloud.agent.api.to.StorageFilerTO;
+import com.cloud.configuration.ConfigurationManager;
+import com.cloud.configuration.Resource;
+import com.cloud.dc.dao.DataCenterDao;
+import com.cloud.event.EventTypes;
+import com.cloud.event.UsageEventUtils;
+import com.cloud.exception.PermissionDeniedException;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.host.HostVO;
+import com.cloud.host.dao.HostDao;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.offering.DiskOffering;
+import com.cloud.storage.DiskOfferingVO;
+import com.cloud.storage.ScopeType;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StoragePoolHostVO;
+import com.cloud.storage.Volume;
+import com.cloud.storage.VolumeVO;
+import com.cloud.storage.dao.DiskOfferingDao;
+import com.cloud.storage.dao.StoragePoolHostDao;
+import com.cloud.storage.dao.VMTemplatePoolDao;
+import com.cloud.storage.dao.VolumeDao;
+import com.cloud.user.Account;
+import com.cloud.user.AccountManager;
+import com.cloud.user.ResourceLimitService;
+import com.cloud.utils.Pair;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.cloud.vm.DiskProfile;
+
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.ResponseGenerator;
+import org.apache.cloudstack.api.ResponseObject;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.command.admin.volume.ImportVolumeCmd;
+import org.apache.cloudstack.api.command.admin.volume.ListVolumesForImportCmd;
+import org.apache.cloudstack.api.command.admin.volume.UnmanageVolumeCmd;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.api.response.VolumeForImportResponse;
+import org.apache.cloudstack.api.response.VolumeResponse;
+import org.apache.cloudstack.context.CallContext;
+import org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationService;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+public class VolumeImportUnmanageManagerImpl implements VolumeImportUnmanageService {
+    protected Logger logger = LogManager.getLogger(VolumeImportUnmanageManagerImpl.class);
+
+    private static final List<Hypervisor.HypervisorType> volumeImportUnmanageSupportedHypervisors =
+            Arrays.asList(Hypervisor.HypervisorType.KVM);
+
+    @Inject
+    private AccountManager accountMgr;
+    @Inject
+    private AgentManager agentManager;
+    @Inject
+    private HostDao hostDao;
+    @Inject
+    private DiskOfferingDao diskOfferingDao;
+    @Inject
+    private ResourceLimitService resourceLimitService;
+    @Inject
+    private ResponseGenerator responseGenerator;
+    @Inject
+    private VolumeDao volumeDao;
+    @Inject
+    private PrimaryDataStoreDao primaryDataStoreDao;
+    @Inject
+    private StoragePoolHostDao storagePoolHostDao;
+    @Inject
+    private ConfigurationManager configMgr;
+    @Inject
+    private DataCenterDao dcDao;
+    @Inject
+    private VolumeOrchestrationService volumeManager;
+    @Inject
+    private VMTemplatePoolDao templatePoolDao;
+
+    static final String DEFAULT_DISK_OFFERING_NAME = "Default Custom Offering for Volume Import";
+    static final String DEFAULT_DISK_OFFERING_UNIQUE_NAME = "Volume-Import";
+    static final String DISK_OFFERING_NAME_SUFFIX_LOCAL = " - Local Storage";
+    static final String DISK_OFFERING_UNIQUE_NAME_SUFFIX_LOCAL = "-Local";
+
+    private void logFailureAndThrowException(String msg) {
+        logger.error(msg);
+        throw new CloudRuntimeException(msg);
+    }
+
+    @Override
+    public List<Class<?>> getCommands() {
+        final List<Class<?>> cmdList = new ArrayList<>();
+        cmdList.add(ListVolumesForImportCmd.class);
+        cmdList.add(ImportVolumeCmd.class);
+        cmdList.add(UnmanageVolumeCmd.class);
+        return cmdList;
+    }
+
+    @Override
+    public ListResponse<VolumeForImportResponse> listVolumesForImport(ListVolumesForImportCmd cmd) {
+        Long poolId = cmd.getStorageId();
+        String path = cmd.getPath();
+        String keyword = cmd.getKeyword();
+        if (StringUtils.isNotBlank(keyword)) {
+            keyword = keyword.trim();
+        }
+
+        StoragePoolVO pool = checkIfPoolAvailable(poolId);
+        List<VolumeOnStorageTO> volumes = listVolumesForImportInternal(poolId, path, keyword);
+
+        List<VolumeForImportResponse> responses = new ArrayList<>();
+        for (VolumeOnStorageTO volume : volumes) {
+            if (checkIfVolumeManaged(pool, volume.getPath()) || checkIfVolumeForTemplate(pool, volume.getPath())) {
+                continue;
+            }
+            responses.add(createVolumeForImportResponse(volume, pool));
+        }
+        ListResponse<VolumeForImportResponse> listResponses = new ListResponse<>();
+        listResponses.setResponses(responses, responses.size());
+        return listResponses;
+    }
+
+    @Override
+    public VolumeResponse importVolume(ImportVolumeCmd cmd) {
+        // 1. verify owner
+        final Account caller = CallContext.current().getCallingAccount();
+        if (caller.getType() != Account.Type.ADMIN) {
+            throw new PermissionDeniedException(String.format("Cannot import VM as the caller account [%s] is not ROOT Admin.", caller.getUuid()));
+        }
+        Account owner = accountMgr.finalizeOwner(caller, cmd.getAccountName(), cmd.getDomainId(), cmd.getProjectId());
+        if (owner == null) {
+            logFailureAndThrowException("Cannot import volume due to unknown owner");
+        }
+
+        // 2. check if pool exists and not in maintenance
+        Long poolId = cmd.getStorageId();
+        StoragePoolVO pool = checkIfPoolAvailable(poolId);
+
+        // 3. check if the volume already exists in cloudstack by path
+        String volumePath = cmd.getPath();
+        if (StringUtils.isBlank(volumePath)) {
+            logFailureAndThrowException("Volume path is null or blank: " + volumePath);
+        }
+        if (checkIfVolumeManaged(pool, volumePath)){
+            logFailureAndThrowException("Volume is already managed by CloudStack: " + volumePath);
+        }
+        if (checkIfVolumeForTemplate(pool, volumePath)) {
+            logFailureAndThrowException("Volume is a base image of a template: " + volumePath);
+        }
+
+        // 4. send a command to hypervisor to check
+        List<VolumeOnStorageTO> volumes = listVolumesForImportInternal(poolId, volumePath, null);
+        if (CollectionUtils.isEmpty(volumes)) {
+            logFailureAndThrowException("Cannot find volume on storage pool: " + volumePath);
+        }
+
+        VolumeOnStorageTO volume = volumes.get(0);
+
+        // check if volume is locked
+        checkIfVolumeIsLocked(volume);
+        checkIfVolumeIsEncrypted(volume);
+
+        // 5. check resource limitation
+        checkResourceLimitForImportVolume(owner, volume);
+
+        // 6. get disk offering
+        DiskOfferingVO diskOffering = getOrCreateDiskOffering(owner, cmd.getDiskOfferingId(), pool.getDataCenterId(), pool.isLocal());
+
+        // 7. create records
+        String volumeName = StringUtils.isNotBlank(cmd.getName()) ? cmd.getName().trim() : volumePath;
+        VolumeVO volumeVO = importVolumeInternal(volume, diskOffering, owner, pool, volumeName);
+
+        // 8. Update resource count
+        updateResourceLimitForVolumeImport(volumeVO);
+
+        // 9. Publish event
+        publicUsageEventForVolumeImportAndUnmanage(volumeVO, true);
+
+        return responseGenerator.createVolumeResponse(ResponseObject.ResponseView.Full, volumeVO);
+    }
+
+    protected List<VolumeOnStorageTO> listVolumesForImportInternal(Long poolId, String volumePath, String keyword) {
+        StoragePoolVO pool = checkIfPoolAvailable(poolId);
+
+        Pair<HostVO, String> hostAndLocalPath = findHostAndLocalPathForVolumeImport(pool);
+        HostVO host = hostAndLocalPath.first();
+        if (!volumeImportUnmanageSupportedHypervisors.contains(host.getHypervisorType())) {
+            logFailureAndThrowException("Import VM is not supported for hypervisor: " + host.getHypervisorType());
+        }
+
+        StorageFilerTO storageTO = new StorageFilerTO(pool);
+        GetVolumesOnStorageCommand command = new GetVolumesOnStorageCommand(storageTO, volumePath, keyword);
+        Answer answer = agentManager.easySend(host.getId(), command);
+        if (answer == null || !(answer instanceof GetVolumesOnStorageAnswer)) {
+            logFailureAndThrowException("Cannot get volumes on storage pool via host " + host.getName());
+        }
+        if (!answer.getResult()) {
+            logFailureAndThrowException("Volume cannot be imported due to " + answer.getDetails());
+        }
+        return  ((GetVolumesOnStorageAnswer) answer).getVolumes();
+    }
+
+    @Override
+    public boolean unmanageVolume(long volumeId) {
+        // 1. check if volume can be unmanaged
+        VolumeVO volume = checkIfVolumeCanBeUnmanaged(volumeId);
+
+        // 2. check if pool available
+        StoragePoolVO pool = checkIfPoolAvailable(volume.getPoolId());
+
+        // 3. Update resource count
+        updateResourceLimitForVolumeUnmanage(volume);
+
+        // 4. publish events
+        publicUsageEventForVolumeImportAndUnmanage(volume, false);
+
+        // 5. update the state/removed of record
+        unmanageVolumeFromDatabase(volume);
+
+        return true;
+    }
+
+    protected StoragePoolVO checkIfPoolAvailable(Long poolId) {
+        StoragePoolVO pool = primaryDataStoreDao.findById(poolId);
+        if (pool == null) {
+            logFailureAndThrowException("Storage pool does not exist: ID = " + poolId);
+        }
+        if (pool.isInMaintenance()) {
+            logFailureAndThrowException("Storage pool is in maintenance: " + pool.getName());
+        }
+        return pool;
+    }
+
+    protected Pair<HostVO, String> findHostAndLocalPathForVolumeImport(StoragePoolVO pool) {
+        List<HostVO> hosts = new ArrayList<>();
+        if (ScopeType.HOST.equals(pool.getScope())) {
+            List<StoragePoolHostVO> storagePoolHostVOs = storagePoolHostDao.listByPoolId(pool.getId());
+            if (CollectionUtils.isNotEmpty(storagePoolHostVOs)) {
+                for (StoragePoolHostVO storagePoolHostVO : storagePoolHostVOs) {
+                    HostVO host = hostDao.findById(storagePoolHostVO.getHostId());
+                    if (host != null) {
+                        return new Pair<>(host, storagePoolHostVO.getLocalPath());
+                    }
+                }
+            }
+        } else if (ScopeType.CLUSTER.equals(pool.getScope())) {
+            hosts = hostDao.findHypervisorHostInCluster((pool.getClusterId()));
+        } else if (ScopeType.ZONE.equals(pool.getScope())) {
+            hosts = hostDao.listAllHostsUpByZoneAndHypervisor(pool.getDataCenterId(), pool.getHypervisor());
+        }

Review Comment:
   ```suggestion
           switch (pool.getScope()) {
           case HOST:
               List<StoragePoolHostVO> storagePoolHostVOs = storagePoolHostDao.listByPoolId(pool.getId());
               if (CollectionUtils.isNotEmpty(storagePoolHostVOs)) {
                   for (StoragePoolHostVO storagePoolHostVO : storagePoolHostVOs) {
                       HostVO host = hostDao.findById(storagePoolHostVO.getHostId());
                       if (host != null) {
                           return new Pair<>(host, storagePoolHostVO.getLocalPath());
                       }
                   }
               }
               break;
           case CLUSTER:
               hosts = hostDao.findHypervisorHostInCluster((pool.getClusterId()));
               break;
           case ZONE:
               hosts = hostDao.listAllHostsUpByZoneAndHypervisor(pool.getDataCenterId(), pool.getHypervisor());
               break;
           }
   ```
   just a suggestion. and maybe factor the HOST block out.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2021852251

   <b>[SF] Trillian test result (tid-9590)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 43293 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8808-t9590-kvm-centos7.zip
   Smoke tests completed. 129 look OK, 1 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_02_trigger_shutdown | `Failure` | 341.62 | test_safe_shutdown.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2026805324

   <b>[SF] Trillian test result (tid-9614)</b>
   Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 47505 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8808-t9614-kvm-centos7.zip
   Smoke tests completed. 130 look OK, 0 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2031541264

   @weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2031534013

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2031927437

   @blueorangutan test ubuntu22 kvm-ubuntu22


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2018480962

   @weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2017610005

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9024


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on code in PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#discussion_r1537526708


##########
server/src/main/java/org/apache/cloudstack/storage/volume/VolumeImportUnmanageManagerImpl.java:
##########
@@ -0,0 +1,442 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.cloudstack.storage.volume;
+
+import com.cloud.agent.AgentManager;
+import com.cloud.agent.api.Answer;
+import com.cloud.agent.api.GetVolumesOnStorageAnswer;
+import com.cloud.agent.api.GetVolumesOnStorageCommand;
+import com.cloud.agent.api.to.StorageFilerTO;
+import com.cloud.configuration.ConfigurationManager;
+import com.cloud.configuration.Resource;
+import com.cloud.dc.dao.DataCenterDao;
+import com.cloud.event.EventTypes;
+import com.cloud.event.UsageEventUtils;
+import com.cloud.exception.PermissionDeniedException;
+import com.cloud.exception.ResourceAllocationException;
+import com.cloud.host.HostVO;
+import com.cloud.host.dao.HostDao;
+import com.cloud.hypervisor.Hypervisor;
+import com.cloud.offering.DiskOffering;
+import com.cloud.storage.DiskOfferingVO;
+import com.cloud.storage.ScopeType;
+import com.cloud.storage.Storage;
+import com.cloud.storage.StoragePoolHostVO;
+import com.cloud.storage.Volume;
+import com.cloud.storage.VolumeVO;
+import com.cloud.storage.dao.DiskOfferingDao;
+import com.cloud.storage.dao.StoragePoolHostDao;
+import com.cloud.storage.dao.VMTemplatePoolDao;
+import com.cloud.storage.dao.VolumeDao;
+import com.cloud.user.Account;
+import com.cloud.user.AccountManager;
+import com.cloud.user.ResourceLimitService;
+import com.cloud.utils.Pair;
+import com.cloud.utils.exception.CloudRuntimeException;
+import com.cloud.vm.DiskProfile;
+
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.ResponseGenerator;
+import org.apache.cloudstack.api.ResponseObject;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.command.admin.volume.ImportVolumeCmd;
+import org.apache.cloudstack.api.command.admin.volume.ListVolumesForImportCmd;
+import org.apache.cloudstack.api.command.admin.volume.UnmanageVolumeCmd;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.api.response.VolumeForImportResponse;
+import org.apache.cloudstack.api.response.VolumeResponse;
+import org.apache.cloudstack.context.CallContext;
+import org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationService;
+import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import javax.inject.Inject;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+public class VolumeImportUnmanageManagerImpl implements VolumeImportUnmanageService {
+    protected Logger logger = LogManager.getLogger(VolumeImportUnmanageManagerImpl.class);
+
+    private static final List<Hypervisor.HypervisorType> volumeImportUnmanageSupportedHypervisors =
+            Arrays.asList(Hypervisor.HypervisorType.KVM);
+
+    @Inject
+    private AccountManager accountMgr;
+    @Inject
+    private AgentManager agentManager;
+    @Inject
+    private HostDao hostDao;
+    @Inject
+    private DiskOfferingDao diskOfferingDao;
+    @Inject
+    private ResourceLimitService resourceLimitService;
+    @Inject
+    private ResponseGenerator responseGenerator;
+    @Inject
+    private VolumeDao volumeDao;
+    @Inject
+    private PrimaryDataStoreDao primaryDataStoreDao;
+    @Inject
+    private StoragePoolHostDao storagePoolHostDao;
+    @Inject
+    private ConfigurationManager configMgr;
+    @Inject
+    private DataCenterDao dcDao;
+    @Inject
+    private VolumeOrchestrationService volumeManager;
+    @Inject
+    private VMTemplatePoolDao templatePoolDao;
+
+    static final String DEFAULT_DISK_OFFERING_NAME = "Default Custom Offering for Volume Import";
+    static final String DEFAULT_DISK_OFFERING_UNIQUE_NAME = "Volume-Import";
+    static final String DISK_OFFERING_NAME_SUFFIX_LOCAL = " - Local Storage";
+    static final String DISK_OFFERING_UNIQUE_NAME_SUFFIX_LOCAL = "-Local";
+
+    private void logFailureAndThrowException(String msg) {
+        logger.error(msg);
+        throw new CloudRuntimeException(msg);
+    }
+
+    @Override
+    public List<Class<?>> getCommands() {
+        final List<Class<?>> cmdList = new ArrayList<>();
+        cmdList.add(ListVolumesForImportCmd.class);
+        cmdList.add(ImportVolumeCmd.class);
+        cmdList.add(UnmanageVolumeCmd.class);
+        return cmdList;
+    }
+
+    @Override
+    public ListResponse<VolumeForImportResponse> listVolumesForImport(ListVolumesForImportCmd cmd) {
+        Long poolId = cmd.getStorageId();
+        String path = cmd.getPath();
+        String keyword = cmd.getKeyword();
+        if (StringUtils.isNotBlank(keyword)) {
+            keyword = keyword.trim();
+        }
+
+        StoragePoolVO pool = checkIfPoolAvailable(poolId);
+        List<VolumeOnStorageTO> volumes = listVolumesForImportInternal(poolId, path, keyword);
+
+        List<VolumeForImportResponse> responses = new ArrayList<>();
+        for (VolumeOnStorageTO volume : volumes) {
+            if (checkIfVolumeManaged(pool, volume.getPath()) || checkIfVolumeForTemplate(pool, volume.getPath())) {
+                continue;
+            }
+            responses.add(createVolumeForImportResponse(volume, pool));
+        }
+        ListResponse<VolumeForImportResponse> listResponses = new ListResponse<>();
+        listResponses.setResponses(responses, responses.size());
+        return listResponses;
+    }
+
+    @Override
+    public VolumeResponse importVolume(ImportVolumeCmd cmd) {
+        // 1. verify owner
+        final Account caller = CallContext.current().getCallingAccount();
+        if (caller.getType() != Account.Type.ADMIN) {
+            throw new PermissionDeniedException(String.format("Cannot import VM as the caller account [%s] is not ROOT Admin.", caller.getUuid()));
+        }
+        Account owner = accountMgr.finalizeOwner(caller, cmd.getAccountName(), cmd.getDomainId(), cmd.getProjectId());
+        if (owner == null) {
+            logFailureAndThrowException("Cannot import volume due to unknown owner");
+        }
+
+        // 2. check if pool exists and not in maintenance
+        Long poolId = cmd.getStorageId();
+        StoragePoolVO pool = checkIfPoolAvailable(poolId);
+
+        // 3. check if the volume already exists in cloudstack by path
+        String volumePath = cmd.getPath();
+        if (StringUtils.isBlank(volumePath)) {
+            logFailureAndThrowException("Volume path is null or blank: " + volumePath);
+        }
+        if (checkIfVolumeManaged(pool, volumePath)){
+            logFailureAndThrowException("Volume is already managed by CloudStack: " + volumePath);
+        }
+        if (checkIfVolumeForTemplate(pool, volumePath)) {
+            logFailureAndThrowException("Volume is a base image of a template: " + volumePath);
+        }
+
+        // 4. send a command to hypervisor to check
+        List<VolumeOnStorageTO> volumes = listVolumesForImportInternal(poolId, volumePath, null);
+        if (CollectionUtils.isEmpty(volumes)) {
+            logFailureAndThrowException("Cannot find volume on storage pool: " + volumePath);
+        }
+
+        VolumeOnStorageTO volume = volumes.get(0);
+
+        // check if volume is locked
+        checkIfVolumeIsLocked(volume);
+        checkIfVolumeIsEncrypted(volume);
+
+        // 5. check resource limitation
+        checkResourceLimitForImportVolume(owner, volume);
+
+        // 6. get disk offering
+        DiskOfferingVO diskOffering = getOrCreateDiskOffering(owner, cmd.getDiskOfferingId(), pool.getDataCenterId(), pool.isLocal());
+
+        // 7. create records
+        String volumeName = StringUtils.isNotBlank(cmd.getName()) ? cmd.getName().trim() : volumePath;
+        VolumeVO volumeVO = importVolumeInternal(volume, diskOffering, owner, pool, volumeName);
+
+        // 8. Update resource count
+        updateResourceLimitForVolumeImport(volumeVO);
+
+        // 9. Publish event
+        publicUsageEventForVolumeImportAndUnmanage(volumeVO, true);
+
+        return responseGenerator.createVolumeResponse(ResponseObject.ResponseView.Full, volumeVO);
+    }
+
+    protected List<VolumeOnStorageTO> listVolumesForImportInternal(Long poolId, String volumePath, String keyword) {
+        StoragePoolVO pool = checkIfPoolAvailable(poolId);
+
+        Pair<HostVO, String> hostAndLocalPath = findHostAndLocalPathForVolumeImport(pool);
+        HostVO host = hostAndLocalPath.first();
+        if (!volumeImportUnmanageSupportedHypervisors.contains(host.getHypervisorType())) {
+            logFailureAndThrowException("Import VM is not supported for hypervisor: " + host.getHypervisorType());
+        }
+
+        StorageFilerTO storageTO = new StorageFilerTO(pool);
+        GetVolumesOnStorageCommand command = new GetVolumesOnStorageCommand(storageTO, volumePath, keyword);
+        Answer answer = agentManager.easySend(host.getId(), command);
+        if (answer == null || !(answer instanceof GetVolumesOnStorageAnswer)) {
+            logFailureAndThrowException("Cannot get volumes on storage pool via host " + host.getName());
+        }
+        if (!answer.getResult()) {
+            logFailureAndThrowException("Volume cannot be imported due to " + answer.getDetails());
+        }
+        return  ((GetVolumesOnStorageAnswer) answer).getVolumes();
+    }
+
+    @Override
+    public boolean unmanageVolume(long volumeId) {
+        // 1. check if volume can be unmanaged
+        VolumeVO volume = checkIfVolumeCanBeUnmanaged(volumeId);
+
+        // 2. check if pool available
+        StoragePoolVO pool = checkIfPoolAvailable(volume.getPoolId());
+
+        // 3. Update resource count
+        updateResourceLimitForVolumeUnmanage(volume);
+
+        // 4. publish events
+        publicUsageEventForVolumeImportAndUnmanage(volume, false);
+
+        // 5. update the state/removed of record
+        unmanageVolumeFromDatabase(volume);
+
+        return true;
+    }
+
+    protected StoragePoolVO checkIfPoolAvailable(Long poolId) {
+        StoragePoolVO pool = primaryDataStoreDao.findById(poolId);
+        if (pool == null) {
+            logFailureAndThrowException("Storage pool does not exist: ID = " + poolId);
+        }
+        if (pool.isInMaintenance()) {
+            logFailureAndThrowException("Storage pool is in maintenance: " + pool.getName());
+        }
+        return pool;
+    }
+
+    protected Pair<HostVO, String> findHostAndLocalPathForVolumeImport(StoragePoolVO pool) {
+        List<HostVO> hosts = new ArrayList<>();
+        if (ScopeType.HOST.equals(pool.getScope())) {
+            List<StoragePoolHostVO> storagePoolHostVOs = storagePoolHostDao.listByPoolId(pool.getId());
+            if (CollectionUtils.isNotEmpty(storagePoolHostVOs)) {
+                for (StoragePoolHostVO storagePoolHostVO : storagePoolHostVOs) {
+                    HostVO host = hostDao.findById(storagePoolHostVO.getHostId());
+                    if (host != null) {
+                        return new Pair<>(host, storagePoolHostVO.getLocalPath());
+                    }
+                }
+            }
+        } else if (ScopeType.CLUSTER.equals(pool.getScope())) {
+            hosts = hostDao.findHypervisorHostInCluster((pool.getClusterId()));
+        } else if (ScopeType.ZONE.equals(pool.getScope())) {
+            hosts = hostDao.listAllHostsUpByZoneAndHypervisor(pool.getDataCenterId(), pool.getHypervisor());
+        }

Review Comment:
   thanks for the suggestion, I will refactor the block



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2018478208

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2020299108

   @weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2020622317

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9045


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2021824798

   <b>[SF] Trillian test result (tid-9588)</b>
   Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
   Total time taken: 41829 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8808-t9588-xenserver-71.zip
   Smoke tests completed. 129 look OK, 1 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   test_02_trigger_shutdown | `Failure` | 336.68 | test_safe_shutdown.py
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2022639124

   @weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2022637643

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2022774155

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9061


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [WIP] New feature: Import volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2012566112

   Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8998


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2025573468

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2037180225

   @weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2037175752

   @blueorangutan package


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Ready for QA] New feature: Import DATA volume from storage pool [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8808:
URL: https://github.com/apache/cloudstack/pull/8808#issuecomment-2042270734

   > LGTM, tested the feature manually and the feature is working fine
   > 
   > Please find the list of test cases that I performed
   > 
   > [import data volume.xlsx](https://github.com/apache/cloudstack/files/14903393/import.data.volume.xlsx)
   
   thanks a lot @kiranchavala 
   
   I will add a check on pool type (to prevent users to unmanage volumes by accident).
   If everything works, it is ready for merge I think.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org