rosi-shapeblue commented on PR #11134: URL: https://github.com/apache/cloudstack/pull/11134#issuecomment-3192832215
## SHA-512 Validation & Patching - Test Results ### **Test Case 1: Verify fresh installation state (SystemVM template shows MD5 in one listing)** <details> <summary><code>(localcloud) 🐱 > list templates templatefilter=all | jq '.template[] | select(.name=="SystemVM Template (KVM)") | {name, templatetype, ostypename, status, size, url, checksum}' </code></summary> ```json { "name": "SystemVM Template (KVM)", "templatetype": "SYSTEM", "ostypename": "Debian GNU/Linux 12 (64-bit)", "status": "Download Complete", "size": 5242880000, "url": "https://download.cloudstack.org/systemvm/4.20/systemvmtemplate-4.20.2-x86_64-kvm.qcow2.bz2", "checksum": "f827a5e29ef541e70a3c2163bf45eaa06a08f240e72f3fd89f0530f9ce6bee2c62157f33afedf9d3e1c14001a92c80fed3b044cb194e9a34d0d0ca07544afeb8" } ``` </details> **Actual Result:** One listing shows a 32-hex MD5 value; further tests below validate SHA-512 is used in current flows. ### Test Case 2: DB Schema Validation ```sql mysql> SELECT COLUMN_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH -> FROM INFORMATION_SCHEMA.COLUMNS -> WHERE TABLE_NAME = 'domain_router' -> AND COLUMN_NAME = 'scripts_version'; +-----------------+-----------+--------------------------+ | COLUMN_NAME | DATA_TYPE | CHARACTER_MAXIMUM_LENGTH | +-----------------+-----------+--------------------------+ | scripts_version | varchar | 128 | +-----------------+-----------+--------------------------+ 1 row in set (0.00 sec) ``` **Actual Result:** `scripts_version` column exists; size is VARCHAR(128). No DB errors. ### Test Case 3: SystemVM Template SHA-512 Verification - Check templates on management server ``` [root@ref-trl-9250-k-Mol8-rositsa-kyuchukova-mgmt1 ~]# cd /usr/share/cloudstack-management/templates/systemvm/ [root@ref-trl-9250-k-Mol8-rositsa-kyuchukova-mgmt1 systemvm]# [root@ref-trl-9250-k-Mol8-rositsa-kyuchukova-mgmt1 systemvm]# sha512sum systemvmtemplate-*.qcow2.bz2 > calculated_checksum.txt [root@ref-trl-9250-k-Mol8-rositsa-kyuchukova-mgmt1 systemvm]# diff calculated_checksum.txt sha512sum.txt diff: sha512sum.txt: No such file or directory [root@ref-trl-9250-k-Mol8-rositsa-kyuchukova-mgmt1 systemvm]# cat calculated_checksum.txt f827a5e29ef541e70a3c2163bf45eaa06a08f240e72f3fd89f0530f9ce6bee2c62157f33afedf9d3e1c14001a92c80fed3b044cb194e9a34d0d0ca07544afeb8 systemvmtemplate-4.20.2-x86_64-kvm.qcow2.bz2 [root@ref-trl-9250-k-Mol8-rositsa-kyuchukova-mgmt1 systemvm]# ``` - Verify template uses SHA512 ``` (localcloud) 🐱 > list templates templatefilter=all name="SystemVM Template (KVM)" filter=checksum { "count": 1, "template": [ { "checksum": "f827a5e29ef541e70a3c2163bf45eaa06a08f240e72f3fd89f0530f9ce6bee2c62157f33afedf9d3e1c14001a92c80fed3b044cb194e9a34d0d0ca07544afeb8" } ``` **Actual Result:** sha512sum over the KVM artifact matches the API’s 128-hex SHA-512. ### Test Case 4: New Template Registration (User QCOW2 with checksum) - Register a new template with explicit checksum verification ``` (localcloud) 🐱 > list templates templatefilter=all | jq -r '.template[] | select(.name=="test-sha512-template") | {name,templatetype,ostypename,status,size,url,checksum}' { "name": "test-sha512-template", "templatetype": "USER", "ostypename": "Ubuntu 24.04 LTS", "status": "Download Complete", "size": 3758096384, "url": "http://10.0.3.122/vladitemplates/qcow2/ubuntu24-cloud-image-root-password-with-tools.qcow2", "checksum": "f78abd3c8a3e92b43ab8ba7916bb1635303adfbc8f73f0729cd4f162f7a314bea59a8d96ecb617226e4d7e73be73f205b9c2e301c1cf6a9ee3e2f3385bb085be" } (localcloud) 🐱 > ``` **Management log excerpts:** ``` 2025-08-15 15:50:20,514 DEBUG [c.c.a.t.Request] ... "checkSum":"{SHA-512}f78abd3c8a3e92b43ab8ba7916bb1635303adfbc8f73f0729cd4f162f7a314bea59a8d96ecb617226e4d7e73be73f205b9c2e301c1cf6a9ee3e2f3385bb085be","result":"true",... ... 2025-08-15 15:50:20,663 DEBUG [c.c.a.t.Request] ... "checkSum":"{SHA-512}f78abd3c8a3e92b43ab8ba7916bb1635303adfbc8f73f0729cd4f162f7a314bea59a8d96ecb617226e4d7e73be73f205b9c2e301c1cf6a9ee3e2f3385bb085be","result":"true",... ``` **Actual Result:** Template registers and downloads successfully. Final checksum recorded as SHA-512 (128 hex, {SHA-512} in logs). No MD5 errors. ### Test Case 5: SystemVM Deployment & Signature File (VR) - Deploy a VM - Attach to the Virtual Router VM -- 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-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org