You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "sureshanaparti (via GitHub)" <gi...@apache.org> on 2024/08/26 08:19:38 UTC
[PR] Updated listStoragePools response - added new managed parameter [cloudstack]
sureshanaparti opened a new pull request, #9588:
URL: https://github.com/apache/cloudstack/pull/9588
### Description
This PR updates listStoragePools response - added new _managed_ parameter.
Partially addresses #8731
<!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
<!-- For new features, provide link to FS, dev ML discussion etc. -->
<!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
<!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
<!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
<!-- Fixes: # -->
<!--- ******************************************************************************* -->
<!--- 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)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
- [ ] build/CI
- [ ] test (unit or integration test code)
### Feature/Enhancement Scale or Bug Severity
#### Feature/Enhancement Scale
- [ ] Major
- [x] Minor
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [ ] Minor
- [ ] Trivial
### Screenshots (if appropriate):
### How Has This Been Tested?
Manually, tested the listStoragePools API.
<!-- 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] Updated listStoragePools response - added new managed parameter [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on PR #9588:
URL: https://github.com/apache/cloudstack/pull/9588#issuecomment-2320435083
@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] Updated listStoragePools response - added new managed parameter [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on code in PR #9588:
URL: https://github.com/apache/cloudstack/pull/9588#discussion_r1734291711
##########
server/src/main/java/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java:
##########
@@ -229,6 +231,17 @@ public StoragePoolResponse newStoragePoolForMigrationResponse(StoragePoolJoinVO
poolResponse.setDiskSizeTotal(pool.getCapacityBytes());
poolResponse.setDiskSizeAllocated(allocatedSize);
poolResponse.setCapacityIops(pool.getCapacityIops());
+
+ if (storagePool != null) {
+ poolResponse.setManaged(storagePool.isManaged());
+ if (storagePool.isManaged()) {
+ DataStore store = dataStoreMgr.getDataStore(pool.getId(), DataStoreRole.Primary);
+ PrimaryDataStoreDriver driver = (PrimaryDataStoreDriver) store.getDriver();
+ long usedIops = driver.getUsedIops(storagePool);
+ poolResponse.setAllocatedIops(usedIops);
Review Comment:
this code is sync with the response parameters set for managed pools here:
https://github.com/apache/cloudstack/blob/674129cd588e9be67923fc06d652170f405f2d07/server/src/main/java/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java#L147-L151
--
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] Updated listStoragePools response - added new managed parameter [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on PR #9588:
URL: https://github.com/apache/cloudstack/pull/9588#issuecomment-2309646598
@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] Updated listStoragePools response - added new managed parameter [cloudstack]
Posted by "rohityadavcloud (via GitHub)" <gi...@apache.org>.
rohityadavcloud merged PR #9588:
URL: https://github.com/apache/cloudstack/pull/9588
--
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] Updated listStoragePools response - added new managed parameter [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #9588:
URL: https://github.com/apache/cloudstack/pull/9588#issuecomment-2321140192
@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) 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] Updated listStoragePools response - added new managed parameter [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on PR #9588:
URL: https://github.com/apache/cloudstack/pull/9588#issuecomment-2314756554
@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] Updated listStoragePools response - added new managed parameter [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #9588:
URL: https://github.com/apache/cloudstack/pull/9588#issuecomment-2314970224
@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) 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] Updated listStoragePools response - added new managed parameter [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #9588:
URL: https://github.com/apache/cloudstack/pull/9588#issuecomment-2320439342
@sureshanaparti 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] Updated listStoragePools response - added new managed parameter [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #9588:
URL: https://github.com/apache/cloudstack/pull/9588#issuecomment-2314759249
@sureshanaparti 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] Updated listStoragePools response - added new managed parameter [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #9588:
URL: https://github.com/apache/cloudstack/pull/9588#issuecomment-2320611382
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10877
--
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] Updated listStoragePools response - added new managed parameter [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #9588:
URL: https://github.com/apache/cloudstack/pull/9588#issuecomment-2322742599
<b>[SF] Trillian test result (tid-11260)</b>
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 48865 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9588-t11260-kvm-ol8.zip
Smoke tests completed. 131 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_secure_vm_migration | `Error` | 134.38 | test_vm_life_cycle.py
test_01_secure_vm_migration | `Error` | 134.39 | test_vm_life_cycle.py
test_01_vpc_site2site_vpn_multiple_options | `Failure` | 357.73 | test_vpc_vpn.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] Updated listStoragePools response - added new managed parameter [cloudstack]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #9588:
URL: https://github.com/apache/cloudstack/pull/9588#issuecomment-2309645582
## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/9588?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.30%. Comparing base [(`0597def`)](https://app.codecov.io/gh/apache/cloudstack/commit/0597def630eb6cfaeaf2b2b0ac00a49036bab10e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`cc7d786`)](https://app.codecov.io/gh/apache/cloudstack/commit/cc7d786086ab5b24d8b5dbd6ce504f946d51758d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> :exclamation: There is a different number of reports uploaded between BASE (0597def) and HEAD (cc7d786). Click for more details.
>
> <details><summary>HEAD has 1 upload less than BASE</summary>
>
>| Flag | BASE (0597def) | HEAD (cc7d786) |
>|------|------|------|
>|unittests|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## 4.19 #9588 +/- ##
============================================
- Coverage 15.08% 4.30% -10.79%
============================================
Files 5406 366 -5040
Lines 472915 29514 -443401
Branches 60040 5162 -54878
============================================
- Hits 71345 1270 -70075
+ Misses 393626 28100 -365526
+ Partials 7944 144 -7800
```
| [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/9588/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/9588/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.30% <ø> (ø)` | |
| [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/9588/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/9588?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] Updated listStoragePools response - added new managed parameter [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #9588:
URL: https://github.com/apache/cloudstack/pull/9588#issuecomment-2314924505
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10840
--
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] Updated listStoragePools response - added new managed parameter [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on code in PR #9588:
URL: https://github.com/apache/cloudstack/pull/9588#discussion_r1734291711
##########
server/src/main/java/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java:
##########
@@ -229,6 +231,17 @@ public StoragePoolResponse newStoragePoolForMigrationResponse(StoragePoolJoinVO
poolResponse.setDiskSizeTotal(pool.getCapacityBytes());
poolResponse.setDiskSizeAllocated(allocatedSize);
poolResponse.setCapacityIops(pool.getCapacityIops());
+
+ if (storagePool != null) {
+ poolResponse.setManaged(storagePool.isManaged());
+ if (storagePool.isManaged()) {
+ DataStore store = dataStoreMgr.getDataStore(pool.getId(), DataStoreRole.Primary);
+ PrimaryDataStoreDriver driver = (PrimaryDataStoreDriver) store.getDriver();
+ long usedIops = driver.getUsedIops(storagePool);
+ poolResponse.setAllocatedIops(usedIops);
Review Comment:
this code is sync with the response parameters set for managed pools here:
https://github.com/apache/cloudstack/blob/674129cd588e9be67923fc06d652170f405f2d07/server/src/main/java/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java#L147
--
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] Updated listStoragePools response - added new managed parameter [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on PR #9588:
URL: https://github.com/apache/cloudstack/pull/9588#issuecomment-2321135594
@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] Updated listStoragePools response - added new managed parameter [cloudstack]
Posted by "sureshanaparti (via GitHub)" <gi...@apache.org>.
sureshanaparti commented on PR #9588:
URL: https://github.com/apache/cloudstack/pull/9588#issuecomment-2314966808
@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] Updated listStoragePools response - added new managed parameter [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #9588:
URL: https://github.com/apache/cloudstack/pull/9588#issuecomment-2316664535
<b>[SF] Trillian test result (tid-11217)</b>
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 59495 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9588-t11217-kvm-ol8.zip
Smoke tests completed. 128 look OK, 5 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_10_attachAndDetach_iso | `Failure` | 816.90 | test_vm_life_cycle.py
test_04_deploy_vnf_appliance | `Error` | 92.71 | test_vnf_templates.py
test_04_deploy_vnf_appliance | `Error` | 92.71 | test_vnf_templates.py
test_05_delete_vnf_template | `Error` | 1.11 | test_vnf_templates.py
ContextSuite context=TestVnfTemplates>:teardown | `Error` | 1.20 | test_vnf_templates.py
test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Error` | 367.95 | test_vpc_redundant.py
test_02_redundant_VPC_default_routes | `Error` | 360.64 | test_vpc_redundant.py
test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Error` | 243.05 | test_vpc_redundant.py
test_04_rvpc_network_garbage_collector_nics | `Error` | 198.68 | test_vpc_redundant.py
test_05_rvpc_multi_tiers | `Error` | 290.63 | test_vpc_redundant.py
test_05_rvpc_multi_tiers | `Error` | 290.64 | test_vpc_redundant.py
test_01_VPC_nics_after_destroy | `Error` | 181.78 | test_vpc_router_nics.py
test_02_VPC_default_routes | `Error` | 182.79 | test_vpc_router_nics.py
test_01_redundant_vpc_site2site_vpn | `Failure` | 424.68 | test_vpc_vpn.py
test_01_vpc_site2site_vpn_multiple_options | `Failure` | 249.94 | test_vpc_vpn.py
test_01_vpc_site2site_vpn | `Failure` | 296.31 | test_vpc_vpn.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