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

Add ::apache::vhost::custom #1271

Merged
merged 1 commit into from
Dec 15, 2015
Merged

Conversation

pabelanger
Copy link
Contributor

Here we are adding a thin wrapper to apache::custom_config but setting
default specific to the vhost apache folder.

Signed-off-by: Paul Belanger pabelanger@redhat.com

@pabelanger pabelanger force-pushed the temp/vhost_custom branch 7 times, most recently from 25d238f to 3bf69ca Compare November 23, 2015 18:01
@pabelanger pabelanger changed the title [WIP] Add ::apache::vhost::custom Add ::apache::vhost::custom Nov 23, 2015
path => "${::apache::vhost_enable_dir}/${priority}-${filename}.conf",
target => "${::apache::vhost_dir}/${priority}-${filename}.conf",
owner => 'root',
group => $::apache::params::root_group,
Copy link

Choose a reason for hiding this comment

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

This doesn't look like it supports the same root group override that the base apache class does. Is that the plan? Also what about the user for managing it? Would it always be 'root' even if overridden in ::apache?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, honestly I don't know the answer. For the most part, this is copied verbatim from apache::vhost, so I would say the issue is there too.

Moving forward, I think this code should be broken out from both apache::vhost and apache::vhost::custom into a shared class. Making bug fixes there too.

I didn't want to do that here, as to not make things more complicated.

Copy link

Choose a reason for hiding this comment

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

Good point. After some reading, it was initially included as root/root and then expanded out to support different root_groups based on distros in this commit b87ce2d
So it looks like vhost conf files are always owned by root as far as the apache module is concerned? I have no idea if that's correct as far as Apache itself is concerned or not but it seems to be working so far. So I guess par for course is the correct method to follow on this update.

@nibalizer
Copy link
Contributor

Unfortunately we weren't running apache in pcci so I don't have a baseline to compare this to. Also now that we are running it everything is failing, so that's not ideal.

@nibalizer
Copy link
Contributor

This code looks good to me +1

@nibalizer
Copy link
Contributor

I would like to see us have beaker tests for it but not critical.

@pabelanger
Copy link
Contributor Author

I can try and stab at breaker tests, but never done one before. Also, I don't have the infra to really test it.

@yrobla
Copy link

yrobla commented Nov 25, 2015

Initially looks good to me. I would like to see a common class for apache::vhost and this custom module in the future, to don't repeat logic.

group => $::apache::params::root_group,
mode => '0644',
require => Apache::Custom_config[$filename],
notify => Class['apache::service'],
Copy link
Contributor

Choose a reason for hiding this comment

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

So.. I believe in the apache::custom_config class, there is a conditional that will set the notify if $verify_config is true. Do we want to adhere to that here?

Also corollary to that... since this is merely a wrapper around apache::custom_config should the notify be omitted here? So that you don't a) trigger an unwanted refresh or b) trigger a secondary refresh. Could there be some idempotency issues with that as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure what we want to do here honestly. I can drop the notify here, this was a copy and paste from vhost.pp.

Here we are adding a thin wrapper to apache::custom_config but setting
default specific to the vhost apache folder.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
bmjen added a commit that referenced this pull request Dec 15, 2015
@bmjen bmjen merged commit 11104d6 into puppetlabs:master Dec 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants