cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

api: create/register/upload template with empty template tag

Open weizhouapache opened this issue 2 weeks ago • 5 comments

Description

This PR fixes an issue when register/create/upload a template

  • set a template tag, then chean it on UI
  • the template is registered with tag "", not NULL
  • it causes the vm deployment to fail

with this PR, template tag will be NULL

Types of changes

  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] New feature (non-breaking change which adds functionality)
  • [x] 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?

How did you try to break this feature and the system with this change?

weizhouapache avatar Dec 11 '25 07:12 weizhouapache

@blueorangutan package

weizhouapache avatar Dec 11 '25 07:12 weizhouapache

@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.

blueorangutan avatar Dec 11 '25 07:12 blueorangutan

Codecov Report

:x: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 4.00%. Comparing base (4348386) to head (b950440). :warning: Report is 5 commits behind head on 4.20.

Files with missing lines Patch % Lines
...k/api/command/user/template/CreateTemplateCmd.java 0.00% 1 Missing :warning:
...d/user/template/GetUploadParamsForTemplateCmd.java 0.00% 1 Missing :warning:
...api/command/user/template/RegisterTemplateCmd.java 0.00% 1 Missing :warning:
...om/cloud/consoleproxy/ConsoleProxyManagerImpl.java 0.00% 1 Missing :warning:
Additional details and impacted files
@@              Coverage Diff              @@
##               4.20   #12234       +/-   ##
=============================================
- Coverage     16.21%    4.00%   -12.22%     
=============================================
  Files          5657      402     -5255     
  Lines        498647    32677   -465970     
  Branches      60533     5812    -54721     
=============================================
- Hits          80863     1309    -79554     
+ Misses       408771    31213   -377558     
+ Partials       9013      155     -8858     
Flag Coverage Δ
uitests 4.00% <ø> (ø)
unittests 17.07% <0.00%> (-0.01%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Dec 11 '25 07:12 codecov[bot]

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

blueorangutan avatar Dec 11 '25 09:12 blueorangutan

code lgtm, was there an issue associated with this @weizhouapache ?

I did not create a github issue.

I have faced the issue since several years ago that some vm templates have template tag as "", not NULL, which confused me. I think this fixes it.

weizhouapache avatar Dec 11 '25 10:12 weizhouapache

@blueorangutan test

RosiKyu avatar Dec 13 '25 13:12 RosiKyu

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

blueorangutan avatar Dec 13 '25 13:12 blueorangutan

[SF] Trillian Build Failed (tid-14979)

blueorangutan avatar Dec 13 '25 14:12 blueorangutan

@blueorangutan test

weizhouapache avatar Dec 15 '25 07:12 weizhouapache

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

blueorangutan avatar Dec 15 '25 07:12 blueorangutan

[SF] Trillian test result (tid-14980) Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8 Total time taken: 52235 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12234-t14980-kvm-ol8.zip Smoke tests completed. 135 look OK, 6 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_DeployVmAntiAffinityGroup_in_project Error 103.96 test_affinity_groups_projects.py
test_DeployVmAntiAffinityGroup Error 39.68 test_affinity_groups.py
test_03_deploy_and_scale_kubernetes_cluster Failure 28.74 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 0.07 test_kubernetes_clusters.py
test_01_non_strict_host_anti_affinity Failure 140.37 test_nonstrict_affinity_group.py
test_02_non_strict_host_affinity Error 91.43 test_nonstrict_affinity_group.py
ContextSuite context=TestMigrateVMStrictTags>:setup Error 0.00 test_vm_strict_host_tags.py
test_hostha_enable_ha_when_host_in_maintenance Error 305.82 test_hostha_kvm.py

blueorangutan avatar Dec 15 '25 23:12 blueorangutan

@blueorangutan test

weizhouapache avatar Dec 15 '25 23:12 weizhouapache

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

blueorangutan avatar Dec 15 '25 23:12 blueorangutan

[SF] Trillian test result (tid-14996) Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8 Total time taken: 49266 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr12234-t14996-kvm-ol8.zip Smoke tests completed. 141 look OK, 0 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File

blueorangutan avatar Dec 16 '25 13:12 blueorangutan