You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "abh1sar (via GitHub)" <gi...@apache.org> on 2025/10/03 08:48:29 UTC
[PR] Delete template from storage pool instantly if no volume is using it [cloudstack]
abh1sar opened a new pull request, #11782:
URL: https://github.com/apache/cloudstack/pull/11782
### Description
This PR fixes #10688
<!--- 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?
| # | Scenario | Action | Observed Result |
|---|---------------------------------------------------------------------------|-------------------------------------------------------------------------|---------------------------------------------------------------------------------|
| 1 | `template.delete.from.primary.storage` setting toggle | Delete template with setting **true** vs **false** | Template file deleted only if setting is **true** |
| 2 | Instance created from template, then template deleted with **force=true** | Delete template (force) without deleting the instance | Template file **not** deleted from Primary Storage |
| 3 | Template installed on 2 zones, VMs created and expunged everywhere | Delete template **without** specifying `zoneId` | Template files deleted from **all Primary Storages** |
| 4 | Template installed on 2 zones, VMs created and expunged everywhere | Delete template specifying only `zoneId=zoneA` | Template file deleted only on Primary Storages belonging to **zoneA** |
<!-- 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] Delete template from storage pool instantly if no volume is using it [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on code in PR #11782:
URL: https://github.com/apache/cloudstack/pull/11782#discussion_r2404869461
##########
engine/components-api/src/main/java/com/cloud/template/TemplateManager.java:
##########
@@ -56,6 +56,13 @@ public interface TemplateManager {
+ "will validate if the provided URL is resolvable during the register of templates/ISOs before persisting them in the database.",
true);
+ ConfigKey<Boolean> TemplateDeleteFromPrimaryStorage = new ConfigKey<Boolean>("Advanced",
Review Comment:
@harikrishna-patnala I added it as a failsafe or in case someone doesn't care about how faster the space is reclaimed, but doesn't want to risk any kind of data loss. Also in case someone wants to use the setting `storage.template.cleanup.enabled=false` or `storage.cleanup.enabled=false` where the deleted template is never cleaned up.
--
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] Delete template from storage pool instantly if no volume is using it [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11782:
URL: https://github.com/apache/cloudstack/pull/11782#issuecomment-3365392515
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15276
--
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] Delete template from storage pool instantly if no volume is using it [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #11782:
URL: https://github.com/apache/cloudstack/pull/11782#issuecomment-3365510558
@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] Delete template from storage pool instantly if no volume is using it [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #11782:
URL: https://github.com/apache/cloudstack/pull/11782#issuecomment-3365199432
@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] Delete template from storage pool instantly if no volume is using it [cloudstack]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #11782:
URL: https://github.com/apache/cloudstack/pull/11782#issuecomment-3364853204
## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/11782?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 4.00%. Comparing base ([`c631d6a`](https://app.codecov.io/gh/apache/cloudstack/commit/c631d6a480dfc89475c14bead84ae309c78d3d81?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`a7ed2a8`](https://app.codecov.io/gh/apache/cloudstack/commit/a7ed2a8e4fed7e6e236aebe424fdbb7a4eb510a1?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 1 commits behind head on 4.20.
> :exclamation: There is a different number of reports uploaded between BASE (c631d6a) and HEAD (a7ed2a8). Click for more details.
>
> <details><summary>HEAD has 1 upload less than BASE</summary>
>
>| Flag | BASE (c631d6a) | HEAD (a7ed2a8) |
>|------|------|------|
>|unittests|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## 4.20 #11782 +/- ##
=============================================
- Coverage 16.17% 4.00% -12.17%
=============================================
Files 5656 402 -5254
Lines 498242 32661 -465581
Branches 60458 5807 -54651
=============================================
- Hits 80584 1309 -79275
+ Misses 408686 31199 -377487
+ Partials 8972 153 -8819
```
| [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/11782/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/11782/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.00% <ø> (ø)` | |
| [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/11782/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/11782?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).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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] Delete template from storage pool instantly if no volume is using it [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on PR #11782:
URL: https://github.com/apache/cloudstack/pull/11782#issuecomment-3364927818
@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] Delete template from storage pool instantly if no volume is using it [cloudstack]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #11782:
URL: https://github.com/apache/cloudstack/pull/11782#discussion_r2410519544
##########
engine/schema/src/main/java/com/cloud/storage/dao/VMTemplatePoolDaoImpl.java:
##########
@@ -150,6 +150,16 @@ public VMTemplateStoragePoolVO findByPoolTemplate(long poolId, long templateId,
return findOneIncludingRemovedBy(sc);
}
+ @Override
+ public List<VMTemplateStoragePoolVO> listByPoolIdsAndTemplate(List<Long> poolIds, Long templateId) {
+ SearchCriteria<VMTemplateStoragePoolVO> sc = PoolTemplateSearch.create();
+ if (CollectionUtils.isNotEmpty(poolIds)) {
+ sc.setParameters("pool_id", poolIds.toArray());
+ }
Review Comment:
When poolIds is empty, the search criteria will not filter by pool_id, which could return all template-pool relationships for the given templateId instead of an empty result. Consider adding an early return for empty poolIds list to avoid unintended behavior.
```suggestion
if (CollectionUtils.isEmpty(poolIds)) {
return Collections.emptyList();
}
SearchCriteria<VMTemplateStoragePoolVO> sc = PoolTemplateSearch.create();
sc.setParameters("pool_id", poolIds.toArray());
```
--
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] Delete template from storage pool instantly if no volume is using it [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11782:
URL: https://github.com/apache/cloudstack/pull/11782#issuecomment-3365513252
@weizhouapache 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] Delete template from storage pool instantly if no volume is using it [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on code in PR #11782:
URL: https://github.com/apache/cloudstack/pull/11782#discussion_r2415681113
##########
engine/components-api/src/main/java/com/cloud/template/TemplateManager.java:
##########
@@ -56,6 +56,13 @@ public interface TemplateManager {
+ "will validate if the provided URL is resolvable during the register of templates/ISOs before persisting them in the database.",
true);
+ ConfigKey<Boolean> TemplateDeleteFromPrimaryStorage = new ConfigKey<Boolean>("Advanced",
Review Comment:
@harikrishna-patnala
does it look ok to you ?
--
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] Delete template from storage pool instantly if no volume is using it [cloudstack]
Posted by "harikrishna-patnala (via GitHub)" <gi...@apache.org>.
harikrishna-patnala commented on code in PR #11782:
URL: https://github.com/apache/cloudstack/pull/11782#discussion_r2415855603
##########
engine/components-api/src/main/java/com/cloud/template/TemplateManager.java:
##########
@@ -56,6 +56,13 @@ public interface TemplateManager {
+ "will validate if the provided URL is resolvable during the register of templates/ISOs before persisting them in the database.",
true);
+ ConfigKey<Boolean> TemplateDeleteFromPrimaryStorage = new ConfigKey<Boolean>("Advanced",
Review Comment:
okay @weizhouapache and thanks @abh1sar
--
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] Delete template from storage pool instantly if no volume is using it [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on code in PR #11782:
URL: https://github.com/apache/cloudstack/pull/11782#discussion_r2401426748
##########
server/src/main/java/com/cloud/template/TemplateManagerImpl.java:
##########
@@ -1024,33 +1024,53 @@ public boolean delete(long userId, long templateId, Long zoneId) {
return adapter.delete(new TemplateProfile(userId, template, zoneId));
}
+ private Boolean templateIsUnusedInPool(VMTemplateStoragePoolVO templatePoolVO) {
+ VMTemplateVO template = _tmpltDao.findByIdIncludingRemoved(templatePoolVO.getTemplateId());
+
+ // If this is a routing template, consider it in use
+ if (template.getTemplateType() == TemplateType.SYSTEM) {
+ return false;
+ }
+
+ // If the template is not yet downloaded to the pool, consider it in use
+ if (templatePoolVO.getDownloadState() != Status.DOWNLOADED) {
+ return false;
+ }
+
+ if (template.getFormat() == ImageFormat.ISO || _volumeDao.isAnyVolumeActivelyUsingTemplateOnPool(template.getId(), templatePoolVO.getPoolId())) {
+ return false;
+ }
+ return true;
+ }
+
@Override
public List<VMTemplateStoragePoolVO> getUnusedTemplatesInPool(StoragePoolVO pool) {
List<VMTemplateStoragePoolVO> unusedTemplatesInPool = new ArrayList<VMTemplateStoragePoolVO>();
List<VMTemplateStoragePoolVO> allTemplatesInPool = _tmpltPoolDao.listByPoolId(pool.getId());
for (VMTemplateStoragePoolVO templatePoolVO : allTemplatesInPool) {
- VMTemplateVO template = _tmpltDao.findByIdIncludingRemoved(templatePoolVO.getTemplateId());
-
- // If this is a routing template, consider it in use
- if (template.getTemplateType() == TemplateType.SYSTEM) {
- continue;
- }
-
- // If the template is not yet downloaded to the pool, consider it in
- // use
- if (templatePoolVO.getDownloadState() != Status.DOWNLOADED) {
- continue;
- }
-
- if (template.getFormat() != ImageFormat.ISO && !_volumeDao.isAnyVolumeActivelyUsingTemplateOnPool(template.getId(), pool.getId())) {
+ if (templateIsUnusedInPool(templatePoolVO)) {
unusedTemplatesInPool.add(templatePoolVO);
}
}
-
return unusedTemplatesInPool;
}
+ @Override
+ public void evictTemplateFromStoragePoolsForZones(Long templateId, List<Long> zoneIds) {
+ List<Long> poolIds = new ArrayList<>();
+ if (zoneIds != null && !zoneIds.isEmpty()) {
Review Comment:
CollectionUtils.isNotEmpty ?
--
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] Delete template from storage pool instantly if no volume is using it [cloudstack]
Posted by "harikrishna-patnala (via GitHub)" <gi...@apache.org>.
harikrishna-patnala commented on code in PR #11782:
URL: https://github.com/apache/cloudstack/pull/11782#discussion_r2404414649
##########
engine/components-api/src/main/java/com/cloud/template/TemplateManager.java:
##########
@@ -56,6 +56,13 @@ public interface TemplateManager {
+ "will validate if the provided URL is resolvable during the register of templates/ISOs before persisting them in the database.",
true);
+ ConfigKey<Boolean> TemplateDeleteFromPrimaryStorage = new ConfigKey<Boolean>("Advanced",
Review Comment:
@abh1sar do we really need a global setting for this usecase, I think we can directly delete the template if there is no usage found.
--
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] Delete template from storage pool instantly if no volume is using it [cloudstack]
Posted by "abh1sar (via GitHub)" <gi...@apache.org>.
abh1sar commented on code in PR #11782:
URL: https://github.com/apache/cloudstack/pull/11782#discussion_r2410712861
##########
engine/schema/src/main/java/com/cloud/storage/dao/VMTemplatePoolDaoImpl.java:
##########
@@ -150,6 +150,16 @@ public VMTemplateStoragePoolVO findByPoolTemplate(long poolId, long templateId,
return findOneIncludingRemovedBy(sc);
}
+ @Override
+ public List<VMTemplateStoragePoolVO> listByPoolIdsAndTemplate(List<Long> poolIds, Long templateId) {
+ SearchCriteria<VMTemplateStoragePoolVO> sc = PoolTemplateSearch.create();
+ if (CollectionUtils.isNotEmpty(poolIds)) {
+ sc.setParameters("pool_id", poolIds.toArray());
+ }
Review Comment:
@weizhouapache no, the method is supposed to return all template_spool_refs if poolIds is empty.
--
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] Delete template from storage pool instantly if no volume is using it [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11782:
URL: https://github.com/apache/cloudstack/pull/11782#issuecomment-3367902007
<b>[SF] Trillian test result (tid-14517)</b>
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 55925 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11782-t14517-kvm-ol8.zip
Smoke tests completed. 140 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_13_retrieve_vr_default_files | `Error` | 1.14 | test_diagnostics.py
test_14_retrieve_vr_one_file | `Error` | 1.14 | test_diagnostics.py
test_15_retrieve_ssvm_default_files | `Error` | 1.14 | test_diagnostics.py
test_16_retrieve_ssvm_single_file | `Error` | 1.14 | test_diagnostics.py
test_17_retrieve_cpvm_default_files | `Error` | 0.11 | test_diagnostics.py
test_18_retrieve_cpvm_single_file | `Error` | 1.13 | test_diagnostics.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] Delete template from storage pool instantly if no volume is using it [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland merged PR #11782:
URL: https://github.com/apache/cloudstack/pull/11782
--
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] Delete template from storage pool instantly if no volume is using it [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on code in PR #11782:
URL: https://github.com/apache/cloudstack/pull/11782#discussion_r2410590787
##########
engine/schema/src/main/java/com/cloud/storage/dao/VMTemplatePoolDaoImpl.java:
##########
@@ -150,6 +150,16 @@ public VMTemplateStoragePoolVO findByPoolTemplate(long poolId, long templateId,
return findOneIncludingRemovedBy(sc);
}
+ @Override
+ public List<VMTemplateStoragePoolVO> listByPoolIdsAndTemplate(List<Long> poolIds, Long templateId) {
+ SearchCriteria<VMTemplateStoragePoolVO> sc = PoolTemplateSearch.create();
+ if (CollectionUtils.isNotEmpty(poolIds)) {
+ sc.setParameters("pool_id", poolIds.toArray());
+ }
Review Comment:
@abh1sar
does Copilot's suggestion look good to you ?
--
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] Delete template from storage pool instantly if no volume is using it [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11782:
URL: https://github.com/apache/cloudstack/pull/11782#issuecomment-3364933287
@abh1sar 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] Delete template from storage pool instantly if no volume is using it [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11782:
URL: https://github.com/apache/cloudstack/pull/11782#issuecomment-3365204161
@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] Delete template from storage pool instantly if no volume is using it [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on code in PR #11782:
URL: https://github.com/apache/cloudstack/pull/11782#discussion_r2410810932
##########
engine/schema/src/main/java/com/cloud/storage/dao/VMTemplatePoolDaoImpl.java:
##########
@@ -150,6 +150,16 @@ public VMTemplateStoragePoolVO findByPoolTemplate(long poolId, long templateId,
return findOneIncludingRemovedBy(sc);
}
+ @Override
+ public List<VMTemplateStoragePoolVO> listByPoolIdsAndTemplate(List<Long> poolIds, Long templateId) {
+ SearchCriteria<VMTemplateStoragePoolVO> sc = PoolTemplateSearch.create();
+ if (CollectionUtils.isNotEmpty(poolIds)) {
+ sc.setParameters("pool_id", poolIds.toArray());
+ }
Review Comment:
got it, 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] Delete template from storage pool instantly if no volume is using it [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #11782:
URL: https://github.com/apache/cloudstack/pull/11782#issuecomment-3365253237
Packaging result [SF]: ✔️ debian. SL-JID 15274
--
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