gpordeus opened a new pull request, #8698: URL: https://github.com/apache/cloudstack/pull/8698
### Description This PR fixes a problem when trying to boot up a XenServer VM with a template through an ISO. Steps to reproduce: - Enable `enable.additional.vm.configuration` and add `HVM-boot-params:order` to `allow.additional.vm.configuration.list.xen`. - Create a XenServer VM with a template. - Attach an ISO to it. - Call `updateVirtualMachine` with parameter `extraconfig=HVM-boot-params:order%3Ddcn` - Start up the VM. It will not finish, with the following log message: ``` INFO [c.c.h.x.r.XenServer650Resource] (DirectAgent-71:[ctx-6c7bfe3d]) (logid:faabbafa) Appending user extra configuration settings to VM ERROR [o.a.c.h.x.ExtraConfigurationUtility] (DirectAgent-71:[ctx-6c7bfe3d]) (logid:faabbafa) Exception caught while setting VM configuration. exception: null ``` After fixing the exception message, we get: ``` ERROR [o.a.c.h.x.ExtraConfigurationUtility] (DirectAgent-25:ctx-0d31d123) (logid:aa40d07d) Exception caught while setting VM configuration: [You tried to add a key-value pair to a map, but that key is already there.] ``` This PR fixes the exception message and changes the Xen API method called from `addTo` to `set` with `get`, letting Java substitute any duplicates in the HashMap. ### 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 ### Feature/Enhancement Scale or Bug Severity #### Bug Severity - [ ] BLOCKER - [ ] Critical - [X] Major - [ ] Minor - [ ] Trivial ### Screenshots (if appropriate): ### How Has This Been Tested? I repeated the steps to reproduce the error and verified the VM with template started up sucessfully, booting the ISO. -- 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]
