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
(MODULES-2756) Adding include ::apache so mkdir exec works properly #1236
Conversation
@@ -12,6 +12,7 @@ | |||
'Ratio' => 'ratio' | |||
} | |||
) { | |||
include ::apache | |||
::apache::mod { 'deflate': } |
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.
i'm confused.
shouldn't that line ^ error out, and tell you to first include apache before including any modules?
see: https://github.com/puppetlabs/puppetlabs-apache/blob/master/manifests/mod.pp#L11-L13
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.
I was confused as well. It did not error out there. The error I got is
documented in the ticket.
"Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Invalid relationship: File[deflate.conf] { require => Exec[mkdir ] },
because Exec[mkdir ] doesn't seem to be in the catalog"
Even though in my profile::apache I have "include ::apache" already, and my
"profile::apache::cfg::ontrack" uses $::apache::httpd_dir just fine and is
where I do a "include ::apache::mod::deflate".
I came to the include ::apache solution from MODULES-1491.
It seems as if puppet is not correctly resolving the catalog. The other
solution I can think of is to include ::apache in
profile::apache::cfg::ontrack and use anchors to make sure the apache class
loads before apache::mod::deflate. Seems like a lot of work for the end
user when this should just work.
Thanks,
Damon
On Thu, Oct 29, 2015 at 8:45 AM, Igor Galić notifications@github.com
wrote:
In manifests/mod/deflate.pp
#1236 (comment)
:@@ -12,6 +12,7 @@
'Ratio' => 'ratio'
}
) {
- include ::apache
::apache::mod { 'deflate': }i'm confused.
shouldn't that line ^ error out, and tell you to first include apache
before including any modules?
see:
https://github.com/puppetlabs/puppetlabs-apache/blob/master/manifests/mod.pp#L11-L13—
Reply to this email directly or view it on GitHub
https://github.com/puppetlabs/puppetlabs-apache/pull/1236/files#r43402520
.
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.
Sorry, I forgot to say that I attached the files for profile::apache and
profile::apache::cfg::ontrack to the last email.
Damon
On Thu, Oct 29, 2015 at 3:14 PM, Damon Conway vstraylight@gmail.com wrote:
I was confused as well. It did not error out there. The error I got is
documented in the ticket."Error: Could not retrieve catalog from remote server: Error 400 on
SERVER: Invalid relationship: File[deflate.conf] { require => Exec[mkdir
] }, because Exec[mkdir ] doesn't seem to be in the catalog"Even though in my profile::apache I have "include ::apache" already, and
my "profile::apache::cfg::ontrack" uses $::apache::httpd_dir just fine and
is where I do a "include ::apache::mod::deflate".I came to the include ::apache solution from MODULES-1491.
It seems as if puppet is not correctly resolving the catalog. The other
solution I can think of is to include ::apache in
profile::apache::cfg::ontrack and use anchors to make sure the apache class
loads before apache::mod::deflate. Seems like a lot of work for the end
user when this should just work.Thanks,
DamonOn Thu, Oct 29, 2015 at 8:45 AM, Igor Galić notifications@github.com
wrote:In manifests/mod/deflate.pp
#1236 (comment)
:@@ -12,6 +12,7 @@
'Ratio' => 'ratio'
}
) {
- include ::apache
::apache::mod { 'deflate': }i'm confused.
shouldn't that line ^ error out, and tell you to first include apache
before including any modules?
see:
https://github.com/puppetlabs/puppetlabs-apache/blob/master/manifests/mod.pp#L11-L13—
Reply to this email directly or view it on GitHub
https://github.com/puppetlabs/puppetlabs-apache/pull/1236/files#r43402520
.
@damonconway i don't think github copies attatchments from emails into comments… |
Ok, I'll attach them here in the web interface....or not. Github won't let me attach them. I've attached them to the ticket. Thanks, |
@damonconway I'm not sure why this is necessary. Typically when using/declaring an apache mod, the apache class is also declared, like this:
It has never been a pattern in our mods to allow them to include or instantiate an apache class. Perhaps I'm not understanding the usecase? @igalic any thoughts on the need or usecase described here? |
mod_deflate is also managed by @damonconway @igalic I'd be really grateful for revisiting this. |
In the ticket, I attached my profile classes so you can see how I'm calling I don't think it's a good plan to include apache in apache::mod::deflate, https://tickets.puppetlabs.com/browse/MODULES-2756 The require that's failing is 'require => Exec["mkdir ${::apache::mod_dir}"],'. Please see https://tickets.puppetlabs.com/browse/MODULES-1491 for another Damon On Thu, Jan 7, 2016 at 8:51 AM, David Schmitt notifications@github.com
|
I am actively looking into this. |
So this seems to be endemic throughout the mod classes. I am working on adding tests to show this, and add the appropriate fixes. Thanks for pointing this out. |
(MODULES-2756) Adding include ::apache so mkdir exec works properly
This fixes a compile error where the require on Exec["mkdir ${::apache::mod_dir}"] was failing because it couldn't resolve ${::apache::mod_dir}.