winterhazel opened a new pull request, #8751: URL: https://github.com/apache/cloudstack/pull/8751
### Description When registering a template/ISO through an URL, the Management Servers always validate if the URL is resolvable before inserting an entry in the database, so that the SSVM downloads it afterwards. However, if the Management Servers do not have access to the Internet, and no internal DNS is used in the environment, it is not possible to register a template/ISO through an URL because this validation fails. To address this issue, this PR creates the global setting `validate.url.is.resolvable.before.registering.template`, which allows operators to disable this validation. By default, this setting is set to `true` so that the current behavior remains the same. ### 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) ### Feature/Enhancement Scale or Bug Severity #### Feature/Enhancement Scale - [ ] Major - [X] Minor ### Screenshots (if appropriate): ### How Has This Been Tested? With the setting set to `true`: 1. I tried to register a template using the URL http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-kvm.qcow2.bz2. I verified that the template was successfully registered. 2. I tried to register a template using the URL http://dl.naszsajhdashdjakshd.eu/cloudstack/macchinina/x86_64/macchinina-kvm.qcow2.bz2. I verified that the error `Unable to resolve dl.naszsajhdashdjakshd.eu.` was shown, and that the template was not registered. 3. I tried to register an ISO using the URL http://archlinux.c3sl.ufpr.br/iso/2024.03.01/archlinux-2024.03.01-x86_64.iso. I verified that the ISO was successfully registered. 4. I tried to register an ISO using the URL http://asdazxcxzc.br/iso/2024.03.01/archlinux-2024.03.01-x86_64.iso. I verified that the error `Unable to resolve asdazxcxzc.br.` was shown, and that the template was not registered. With the setting set to `false`: 1. I tried to register a template using the URL http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-kvm.qcow2.bz2. I verified that the template was successfully registered. 2. I tried to register a template using the URL http://dl.naszsajhdashdjakshd.eu/cloudstack/macchinina/x86_64/macchinina-kvm.qcow2.bz2. I verified that the template was successfully registered. 3. I tried to register an ISO using the URL http://archlinux.c3sl.ufpr.br/iso/2024.03.01/archlinux-2024.03.01-x86_64.iso. I verified that the ISO was successfully registered. 4. I tried to register an ISO using the URL http://asdazxcxzc.br/iso/2024.03.01/archlinux-2024.03.01-x86_64.iso. I verified that the ISO was successfully registered. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
