Support #18047
openWrong template type resolved on first host creation
Description
I've been experiencing this issue for some releases now, regretfully I don't recall exactly which release it first started occurring in, and I'm unsure whether it is misconfiguration on my behalf or a bug.
When I'm creating a new host using the OpenStack provider, with everything correctly configured on each tab. If I hit the resolve button on the operating system page, I receive the message:
Sorry but no templates were configured.
Then, on the first submit to create the host will fail with:
Unable to save
No finish templates were found for this host, make sure you define at least one in your FreeBSD-11.0 11.0 settings
On the Operating System tab once the page is loaded, I can now click the "Resolve" button next to Provisioning templates and it will correctly detect the user_data template I have configured for FreeBSD.
I may be way off with this assumption, but it seems like on the initial create, it looks for the wrong type of template (finish), but something gets updated against the hosts configuration which ensures on the next create it will look for the correct type of template (user_data). Another point of note is that if I clone an existing host, this will succeed first time and be able to resolve the user_data template.
I have 2 OpenStack compute resources, and this occurs for both of them. It happens on all the operating systems I use, which all use user_data templates for provisioning.
Files