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 2026/03/09 11:18:38 UTC

[PR] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   ### Description
   
   This PR fixes #12763 
   
   
   <!--- 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)
   - [ ] 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
   - [ ] 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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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


##########
server/src/main/java/com/cloud/template/TemplateManagerImpl.java:
##########
@@ -2426,6 +2426,8 @@ public TemplateType validateTemplateType(BaseCmd cmd, boolean isAdmin, boolean i
                 throw new InvalidParameterValueException(String.format("Users can not register Template with template type %s.", templateType));
             } else if (cmd instanceof UpdateTemplateCmd) {
                 throw new InvalidParameterValueException(String.format("Users can not update Template to template type %s.", templateType));

Review Comment:
   ok, got it, it's update to template type, fine.



-- 
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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

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


-- 
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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   @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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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


-- 
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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   @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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   @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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   ## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/12768?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 3.70%. Comparing base ([`c3d6a8c`](https://app.codecov.io/gh/apache/cloudstack/commit/c3d6a8cff72c47412670a914e3f4d30ad06bc46f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`9dd0695`](https://app.codecov.io/gh/apache/cloudstack/commit/9dd06955799d0f1c88ba91deace019a0c620ba0d?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 (c3d6a8c) and HEAD (9dd0695). Click for more details.
   > 
   > <details><summary>HEAD has 1 upload less than BASE</summary>
   >
   >| Flag | BASE (c3d6a8c) | HEAD (9dd0695) |
   >|------|------|------|
   >|unittests|1|0|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@              Coverage Diff              @@
   ##               4.22   #12768       +/-   ##
   =============================================
   - Coverage     17.61%    3.70%   -13.91%     
   =============================================
     Files          5917      448     -5469     
     Lines        531402    38019   -493383     
     Branches      64971     7035    -57936     
   =============================================
   - Hits          93586     1409    -92177     
   + Misses       427262    36423   -390839     
   + Partials      10554      187    -10367     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/12768/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/12768/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `3.70% <ø> (ø)` | |
   | [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/12768/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/12768?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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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


##########
server/src/main/java/com/cloud/template/TemplateManagerImpl.java:
##########
@@ -2416,7 +2416,7 @@ public TemplateType validateTemplateType(BaseCmd cmd, boolean isAdmin, boolean i
             } else if ((cmd instanceof RegisterVnfTemplateCmd || cmd instanceof UpdateVnfTemplateCmd) && !TemplateType.VNF.equals(templateType)) {
                 throw new InvalidParameterValueException("The template type must be VNF for VNF templates, but the actual type is " + templateType);
             }
-        } else if (cmd instanceof RegisterTemplateCmd) {
+        } else if (cmd instanceof RegisterTemplateCmd || cmd instanceof GetUploadParamsForTemplateCmd) {
             boolean isRouting = Boolean.TRUE.equals(isRoutingType);
             templateType = (cmd instanceof RegisterVnfTemplateCmd) ? TemplateType.VNF : (isRouting ? TemplateType.ROUTING : TemplateType.USER);
         }

Review Comment:
   `validateTemplateType` now handles `GetUploadParamsForTemplateCmd` and defaults the template type to USER/ROUTING when `templateType` is omitted. There are existing unit tests for this method in `server/src/test/java/com/cloud/template/TemplateManagerImplTest.java`, but none cover the `GetUploadParamsForTemplateCmd` path; please add tests for (1) default USER when neither `templateType` nor `isrouting` is provided, (2) default ROUTING when `isrouting=true` (admin), and (3) rejection for non-admin when the resolved/explicit type is not USER/VNF.



-- 
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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   <b>[SF] Trillian test result (tid-15791)</b>
   Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
   Total time taken: 53879 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12768-t15791-kvm-ol8.zip
   Smoke tests completed. 149 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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   @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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

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


-- 
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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

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


-- 
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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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


##########
server/src/main/java/com/cloud/template/TemplateManagerImpl.java:
##########
@@ -2426,6 +2426,8 @@ public TemplateType validateTemplateType(BaseCmd cmd, boolean isAdmin, boolean i
                 throw new InvalidParameterValueException(String.format("Users can not register Template with template type %s.", templateType));
             } else if (cmd instanceof UpdateTemplateCmd) {
                 throw new InvalidParameterValueException(String.format("Users can not update Template to template type %s.", templateType));

Review Comment:
   ```suggestion
                   throw new InvalidParameterValueException(String.format("Users can not update Template with template type %s.", templateType));
   ```
   
   in sync with other msgs



-- 
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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   @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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   <b>[SF] Trillian test result (tid-15757)</b>
   Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
   Total time taken: 55178 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12768-t15757-kvm-ol8.zip
   Smoke tests completed. 146 look OK, 3 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   ContextSuite context=TestListIdsParams>:teardown | `Error` | 1.16 | test_list_ids_parameter.py
   test_01_snapshot_root_disk | `Error` | 4.08 | test_snapshots.py
   test_02_list_snapshots_with_removed_data_store | `Error` | 46.86 | test_snapshots.py
   test_02_list_snapshots_with_removed_data_store | `Error` | 46.87 | test_snapshots.py
   ContextSuite context=TestSnapshotStandaloneBackup>:teardown | `Error` | 26.84 | test_snapshots.py
   test_01_snapshot_usage | `Error` | 19.78 | test_usage.py
   test_01_vpn_usage | `Error` | 1.11 | test_usage.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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   
   @blueoranguran 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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   <b>[SF] Trillian test result (tid-15600)</b>
   Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
   Total time taken: 92391 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12768-t15600-kvm-ol8.zip
   Smoke tests completed. 131 look OK, 18 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   ContextSuite context=TestListIdsParams>:teardown | `Error` | 1.10 | test_list_ids_parameter.py
   test_CRUD_operations_userdata | `Error` | 1519.10 | test_register_userdata.py
   test_deploy_vm_with_registered_userdata | `Error` | 5.41 | test_register_userdata.py
   test_deploy_vm_with_registered_userdata_with_override_policy_allow | `Error` | 5.43 | test_register_userdata.py
   test_deploy_vm_with_registered_userdata_with_override_policy_append | `Error` | 5.39 | test_register_userdata.py
   test_deploy_vm_with_registered_userdata_with_override_policy_deny | `Error` | 5.69 | test_register_userdata.py
   test_deploy_vm_with_registered_userdata_with_params | `Error` | 5.41 | test_register_userdata.py
   test_link_and_unlink_userdata_to_template | `Error` | 5.61 | test_register_userdata.py
   test_user_userdata_crud | `Error` | 5.64 | test_register_userdata.py
   ContextSuite context=TestResetVmOnReboot>:setup | `Error` | 0.00 | test_reset_vm_on_reboot.py
   ContextSuite context=TestRAMCPUResourceAccounting>:setup | `Error` | 0.00 | test_resource_accounting.py
   test_03_register_template | `Error` | 1.08 | test_resource_names.py
   ContextSuite context=TestRestoreVM>:setup | `Error` | 0.00 | test_restore_vm.py
   ContextSuite context=TestRouterDHCPHosts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDHCPOpts>:setup | `Error` | 0.00 | test_router_dhcphosts.py
   ContextSuite context=TestRouterDns>:setup | `Error` | 0.00 | test_router_dns.py
   test_01_snapshot_usage | `Error` | 19.56 | test_usage.py
   ContextSuite context=TestRouterDnsService>:setup | `Error` | 0.00 | test_router_dnsservice.py
   ContextSuite context=TestRouterIpTablesPolicies>:setup | `Error` | 0.00 | test_routers_iptables_default_policy.py
   ContextSuite context=TestVPCIpTablesPolicies>:setup | `Error` | 0.00 | test_routers_iptables_default_policy.py
   ContextSuite context=TestIsolatedNetworks>:setup | `Error` | 0.00 | test_routers_network_ops.py
   ContextSuite context=TestRedundantIsolateNetworks>:setup | `Error` | 0.00 | test_routers_network_ops.py
   ContextSuite context=TestRouterServices>:setup | `Error` | 0.00 | test_routers.py
   ContextSuite context=TestCpuCapServiceOfferings>:setup | `Error` | 0.00 | test_service_offerings.py
   ContextSuite context=TestServiceOfferings>:setup | `Error` | 0.23 | test_service_offerings.py
   ContextSuite context=TestSetSourceNatIp>:setup | `Error` | 0.00 | test_set_sourcenat.py
   ContextSuite context=TestSnapshotRootDisk>:setup | `Error` | 0.00 | test_snapshots.py
   ContextSuite context=TestSnapshotStandaloneBackup>:setup | `Error` | 0.00 | test_snapshots.py
   ContextSuite context=TestSslOffloading>:setup | `Error` | 0.00 | test_ssl_offloading.py
   test_03_ssvm_internals | `Failure` | 2.96 | test_ssvm.py
   test_05_stop_ssvm | `Failure` | 60.60 | test_ssvm.py
   test_07_reboot_ssvm | `Failure` | 124.49 | test_ssvm.py
   test_09_reboot_ssvm_forced | `Failure` | 145.22 | 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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   
   @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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache closed pull request #12768: server: set template type to ROUTING or USER if template type is not specified when upload a template
URL: https://github.com/apache/cloudstack/pull/12768


-- 
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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   @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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   @DaanHoogland @vishesh92 @vladimirpetrov 
   do you think we should set the template type to USER in the upgrade sql ?
   
   
   ```
   UPDATE `cloud`.`vm_template` SET `type` = "USER" WHERE `type` IS NULL;
   ```


-- 
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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   
   @blueoranguran 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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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


##########
server/src/main/java/com/cloud/template/TemplateManagerImpl.java:
##########
@@ -2426,6 +2426,8 @@ public TemplateType validateTemplateType(BaseCmd cmd, boolean isAdmin, boolean i
                 throw new InvalidParameterValueException(String.format("Users can not register Template with template type %s.", templateType));
             } else if (cmd instanceof UpdateTemplateCmd) {
                 throw new InvalidParameterValueException(String.format("Users can not update Template to template type %s.", templateType));

Review Comment:
   @sureshanaparti 
   `templateType` here means the new type of the template. would it be good to use `to` ?



-- 
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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   > > @DaanHoogland @vishesh92 @vladimirpetrov
   > > do you think we should set the template type to USER in the upgrade sql ?
   > > ```
   > > UPDATE `cloud`.`vm_template` SET `type` = "USER" WHERE `type` IS NULL;
   > > ```
   > 
   > Sounds good, is type null leading to NPEs?
   
   I think it does not lead to NPEs, but template/iso are not usable as the type is NULL.
   In several places (UI and source code), cloudstack only lists templates with USER template type.
   


-- 
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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   <b>[SF] Trillian test result (tid-15584)</b>
   Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
   Total time taken: 56948 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12768-t15584-kvm-ol8.zip
   Smoke tests completed. 146 look OK, 3 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   ContextSuite context=TestListIdsParams>:teardown | `Error` | 1.13 | test_list_ids_parameter.py
   test_01_snapshot_root_disk | `Error` | 4.91 | test_snapshots.py
   test_02_list_snapshots_with_removed_data_store | `Error` | 49.76 | test_snapshots.py
   test_02_list_snapshots_with_removed_data_store | `Error` | 49.77 | test_snapshots.py
   ContextSuite context=TestSnapshotStandaloneBackup>:teardown | `Error` | 28.53 | test_snapshots.py
   test_01_snapshot_usage | `Error` | 28.91 | test_usage.py
   test_01_vpn_usage | `Error` | 1.09 | test_usage.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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   @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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   @vladimirpetrov 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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   @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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   @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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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


##########
engine/schema/src/main/resources/META-INF/db/schema-42200to42210.sql:
##########
@@ -33,3 +33,6 @@ UPDATE `cloud`.`alert` SET type = 34 WHERE name = 'ALERT.VR.PRIVATE.IFACE.MTU';
 
 -- Update configuration 'kvm.ssh.to.agent' description and is_dynamic fields
 UPDATE `cloud`.`configuration` SET description = 'True if the management server will restart the agent service via SSH into the KVM hosts after or during maintenance operations', is_dynamic = 1 WHERE name = 'kvm.ssh.to.agent';
+
+-- Set default value for vm_template.type to "USER" and update existing records with NULL type to "USER"

Review Comment:
   The comment says this migration sets a *default value* for `vm_template.type`, but the SQL only backfills existing `NULL` rows. Either (a) update the comment to only mention backfilling, or (b) also add an `ALTER TABLE` to set the column default (and possibly `NOT NULL` if that’s the intended invariant).
   ```suggestion
   -- Update existing vm_template records with NULL type to "USER"
   ```



##########
server/src/main/java/com/cloud/template/TemplateManagerImpl.java:
##########
@@ -2426,6 +2426,8 @@ public TemplateType validateTemplateType(BaseCmd cmd, boolean isAdmin, boolean i
                 throw new InvalidParameterValueException(String.format("Users can not register Template with template type %s.", templateType));
             } else if (cmd instanceof UpdateTemplateCmd) {
                 throw new InvalidParameterValueException(String.format("Users can not update Template to template type %s.", templateType));
+            } else if (cmd instanceof GetUploadParamsForTemplateCmd) {
+                throw new InvalidParameterValueException(String.format("Users can not upload Template to template type %s.", templateType));

Review Comment:
   This error is thrown for `GetUploadParamsForTemplateCmd`, but the message says the user cannot 'upload Template'. Consider wording it in terms of the actual action (e.g., 'request upload params' / 'get upload parameters') so API callers can more easily understand which request is being rejected.
   ```suggestion
                   throw new InvalidParameterValueException(String.format("Users can not request upload parameters for Template with template type %s.", templateType));
   ```



-- 
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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   > @DaanHoogland @vishesh92 @vladimirpetrov 
   > do you think we should set the template type to USER in the upgrade sql ?
   > 
   > 
   > ```
   > UPDATE `cloud`.`vm_template` SET `type` = "USER" WHERE `type` IS NULL;
   > ```
   
   Sounds good, is type null leading to NPEs? 


-- 
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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   @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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   @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] server: set template type to ROUTING or USER if template type is not specified when upload a template [cloudstack]

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

   <b>[SF] Trillian test result (tid-15617)</b>
   Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
   Total time taken: 51886 seconds
   Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12768-t15617-kvm-ol8.zip
   Smoke tests completed. 146 look OK, 3 have errors, 0 did not run
   Only failed and skipped tests results shown below:
   
   
   Test | Result | Time (s) | Test File
   --- | --- | --- | ---
   ContextSuite context=TestListIdsParams>:teardown | `Error` | 1.15 | test_list_ids_parameter.py
   test_01_snapshot_root_disk | `Error` | 4.91 | test_snapshots.py
   test_02_list_snapshots_with_removed_data_store | `Error` | 45.74 | test_snapshots.py
   test_02_list_snapshots_with_removed_data_store | `Error` | 45.74 | test_snapshots.py
   ContextSuite context=TestSnapshotStandaloneBackup>:teardown | `Error` | 27.67 | test_snapshots.py
   test_01_snapshot_usage | `Error` | 23.66 | test_usage.py
   test_01_vpn_usage | `Error` | 1.09 | test_usage.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