Skip to content
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

Merged
merged 1 commit into from Jul 19, 2017

Conversation

jlsherrill
Copy link
Member

No description provided.

@theforeman-bot
Copy link

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))
Copy link
Member

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, ...)

Copy link
Member

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.

Copy link
Member Author

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated!

Copy link
Member

@bbuckingham bbuckingham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APT!

@jlsherrill jlsherrill merged commit e7817e4 into Katello:master Jul 19, 2017
@jlsherrill jlsherrill deleted the 20336 branch July 19, 2017 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants