New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #20336 - fix template lookup on os creation #6878
Conversation
Issues: #20336 |
@@ -21,7 +21,7 @@ def assign_templates! | |||
provisioning_template_name = Setting["katello_default_#{kind.name}"] | |||
end | |||
|
|||
if (template = ProvisioningTemplate.find_by_name(provisioning_template_name)) | |||
if (template = ProvisioningTemplate.unscoped.find_by_name(provisioning_template_name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After this change, it does appear to associate the templates, which is good. :)
Do we need also do the unscoped query for any other foreman resources used by this flow? (e.g. Ptable, ...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed with testing that at least Ptable also needs to be unscoped. Others to check may be OsDefaultTemplate and TemplateKind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch on PTable, i don't think OSDefaultTemplate or TemplateKind are restricted by permissions, so I don't think they are necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
APT!
No description provided.