Validate version when writing systemVM's checksum in metadata.ini#6037
Closed
GutoVeronezi wants to merge 1 commit into
Closed
Validate version when writing systemVM's checksum in metadata.ini#6037GutoVeronezi wants to merge 1 commit into
GutoVeronezi wants to merge 1 commit into
Conversation
Contributor
|
@blueorangutan package |
Contributor
|
@GutoVeronezi could you please share with which version did you face this issue, as it was addressed and the following: https://github.com/apache/cloudstack/blob/main/engine/schema/templateConfig.sh#L64 should handle it. |
Contributor
Author
|
Hi @Pearl1594, I faced this issue in 4.16, however, I didn't noticed that #5863 solved it. I'll close this PR. Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When building ACS, module
engine-schemadownloads the system VMs' checksums from https://download.cloudstack.org/systemvm/X/ throughtemplateConfig.shand puts them intometadata.ini. The method that gets the checksums only validates the hypervisor name, which works fine when we have only the major version; however, when we also have minor versions, it ends up adding all checksums of a hypervisor intometadata.ini:lab@management:~$ cat /usr/share/cloudstack-management/templates/systemvm/metadata.ini [ovm3] templatename = systemvm-ovm3-4.16.0 checksum = 38f84087c5d96548c50a2b52a2856fef d889b6e490018360f93e54240d74bf93 downloadurl = https://download.cloudstack.org/systemvm/4.16/systemvmtemplate-4.16.0-ovm.raw.bz2 filename = systemvmtemplate-4.16.0-ovm.raw.bz2 [xenserver] templatename = systemvm-xenserver-4.16.0 checksum = 6015c93583c7388e6b3e0e7bc6e3517c 3ccf327c1b0a9c96c506547bf1a6869a downloadurl = https://download.cloudstack.org/systemvm/4.16/systemvmtemplate-4.16.0-xen.vhd.bz2 filename = systemvmtemplate-4.16.0-xen.vhd.bz2 [vmware] templatename = systemvm-vmware-4.16.0 checksum = 606db78c5d138e96d53b4699e77789b2 f55d3b858b708f3103660d83021cb702 downloadurl = https://download.cloudstack.org/systemvm/4.16/systemvmtemplate-4.16.0-vmware.ova filename = systemvmtemplate-4.16.0-vmware.ova [hyperv] templatename = systemvm-hyperv-4.16.0 checksum = 88fe0da9ebaa27d710af708131b9bf32 2d21855fe179a7ce214ffc46c77fac8d downloadurl = https://download.cloudstack.org/systemvm/4.16/systemvmtemplate-4.16.0-hyperv.vhd.zip filename = systemvmtemplate-4.16.0-hyperv.vhd.zip [lxc] templatename = systemvm-lxc-4.16.0 checksum = 2f3747a597396d4ee6a2605648808d1a 5108eeb0547912a41cb2bc508985f89f downloadurl = https://download.cloudstack.org/systemvm/4.16/systemvmtemplate-4.16.0-kvm.qcow2.bz2 filename = systemvmtemplate-4.16.0-kvm.qcow2.bz2 [kvm] templatename = systemvm-kvm-4.16.0 checksum = 2f3747a597396d4ee6a2605648808d1a 5108eeb0547912a41cb2bc508985f89f downloadurl = https://download.cloudstack.org/systemvm/4.16/systemvmtemplate-4.16.0-kvm.qcow2.bz2 filename = systemvmtemplate-4.16.0-kvm.qcow2.bz2When we run the management-server, this behavior causes an error that blocks ACS bootstrap:
This PR intends to validate also the version when getting the system VMs' checksums.
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
How Has This Been Tested?
I built the packages, installed into a local lab, verified the file
metadata.ini(which must have only the checksum of the version being built) and started the management-server.