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 #30716: Ensure /pub on foreman proxy can be browsed by default #277

Merged
merged 1 commit into from
Aug 27, 2020

Conversation

ehelms
Copy link
Member

@ehelms ehelms commented Aug 26, 2020

No description provided.

@@ -267,7 +271,9 @@
require => Class['certs::apache'],
}

include foreman_proxy_content::pub_dir
class { 'foreman_proxy_content::pub_dir':
pub_dir_options => $pub_dir_options,
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

I always like it when a commit explains why this is a problem. That makes life easier for reviewers. Especially when someone already has done the research. Quoting myself:

Either way, this looks to be introduced by f6790c4. The template is used in pub_dir.pp (for the Satellite) and init.pp (for the Capsule). In the former the pub_dir_options variable is set, but in the latter it isn't.

This does require some updates for users - AFAIK we've told users that they can change the options via hiera and after this change they no longer can. In fact, it'll actually revert their changes.

I'd also like to see a test that the content is actually there. Alternatively we can switch the template to EPP and enforce content via a data type. I've been considering replacing ERB with EPP for that reason, but been hesitant on it.

@ehelms
Copy link
Member Author

ehelms commented Aug 27, 2020

Is there a simple option (to fix the immediate bug) that hiera still remains the way without me having to expose this as a parameter in init.pp ?

@ekohl
Copy link
Member

ekohl commented Aug 27, 2020

Just define a variable in the body, ideally very close to where the template is actually used so you see the correlation.

@ehelms
Copy link
Member Author

ehelms commented Aug 27, 2020

Switched to a single variable

@ekohl
Copy link
Member

ekohl commented Aug 27, 2020

Would you mind including that f6790c4 introduced this regression in the commit message? That's always a good thing to have. Other than that the actual code looks good.

@ehelms
Copy link
Member Author

ehelms commented Aug 27, 2020

Updated

@ekohl ekohl merged commit 8cfa178 into theforeman:master Aug 27, 2020
@wbclark wbclark added the Bug label Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants