Project

General

Profile

« Previous | Next » 

Revision e1017cf5

Added by Daniel Lobato Garcia over 6 years ago

Fixes #20098 - Resolve template_used for image provisioning

At the moment, the method Hostext::OperatingSystem#template_kinds is
unable to handle image-based provisioning. If there is an image, it will
not be able to find it as 'self.compute_attributes' does not exist for
new hosts.

Creating the host always worked well, and the templates can be found
after clicking the 'submit' button. However, when you click on
'Resolve', you get an error 'undefined method []' as compute_attributes
does not exist.

This is fixed by ensuring the controller includes compute_attributes in
the 'temporary' host created to check the templates this.

To reproduce:

- Click on Hosts > New host
- Select a Compute Resource
- Select an OS, choose 'Image based' as provisioning method
- Select an image
- Click on 'Resolve' - you will see "No templates were configured"
- After applying the patch, you should see the finish/userdata template
  • added
  • modified
  • copied
  • renamed
  • deleted