puppetlabs apache module syntax errors

450 views
Skip to first unread message

Shantanu

unread,
Aug 24, 2012, 4:52:57 PM8/24/12
to Puppet Users

I am getting following errors with the latest puppetlabs-apache
module. I am using Puppet 2.6.16 on CentOS 6.2 OSs and with required
dependency modules firewall (v0.0.4-80-g63fd433) and stdlib (3.0.0-27-
g4e25230) installed in the modulepath.

I have included only following class to in a node template:
class{'apache': }


When the catalog is being fetched for the first time then I get
following error:
{{{
Could not retrieve catalog from remote server: Error 400 on SERVER:
Syntax error at 'apache::mod::dav'; expected ']' at /etc/puppet/
modules/apache/manifests/mod/dav_fs.pp:2

}}}

After restarting the concerned Puppet client I see a different error:
{{{
Could not retrieve catalog from remote server: Error 400 on SERVER:
Could not find class apache::mod::dav_fs in namespaces
apache::mod::default at /etc/puppet/modules/apache/manifests/mod/
default.pp:22
}}}

Am I missing any dependencies or do I need to configure any parameters
before using this module? Appreciate all the help.

--
Thanks,
Shantanu

Ryan Coleman

unread,
Aug 24, 2012, 7:24:00 PM8/24/12
to puppet...@googlegroups.com
Hi Shantanu,

On Fri, Aug 24, 2012 at 1:52 PM, Shantanu <knowsh...@gmail.com> wrote:
>
> I am getting following errors with the latest puppetlabs-apache
> module. I am using Puppet 2.6.16 on CentOS 6.2 OSs and with required
> dependency modules firewall (v0.0.4-80-g63fd433) and stdlib (3.0.0-27-
> g4e25230) installed in the modulepath.

I'm sorry that you're hitting a problem with this module. Are you
using the module from the Forge or are you using the code in
development from GitHub?

>
> I have included only following class to in a node template:
> class{'apache': }
>
>
> When the catalog is being fetched for the first time then I get
> following error:
> {{{
> Could not retrieve catalog from remote server: Error 400 on SERVER:
> Syntax error at 'apache::mod::dav'; expected ']' at /etc/puppet/
> modules/apache/manifests/mod/dav_fs.pp:2
>
> }}}
>

FWIW, I don't receive a parse failure like this when I apply just the
apache class on a centos 6 machine using Puppet 2.6.16. Is it possible
that the copy of the module you have has been modified in some way?
Could you reply with the contents of
/etc/puppet/modules/apache/manifests/mod/dav_fs.pp ?

Shantanu

unread,
Aug 26, 2012, 9:22:27 PM8/26/12
to Puppet Users


On Aug 24, 6:24 pm, Ryan Coleman <r...@puppetlabs.com> wrote:
> Hi Shantanu,
>
Thanks for the reply Ryan. I haven't made any changes after cloning
this module (commit 66d5ce9ae). Following are contents of dav_fs
manifest file:

$ cat /etc/puppet/modules/apache/manifests/mod/dav_fs.pp
class apache::mod::dav_fs {
Class[apache::mod::dav] -> Class[apache::mod::dav_fs]
apache::mod { 'dav_fs': }
}

Let me know if you need any additional details.

--
Shantanu

Ryan Coleman

unread,
Aug 27, 2012, 2:48:40 PM8/27/12
to puppet...@googlegroups.com
On Sun, Aug 26, 2012 at 6:22 PM, Shantanu <knowsh...@gmail.com> wrote:
> Thanks for the reply Ryan. I haven't made any changes after cloning
> this module (commit 66d5ce9ae). Following are contents of dav_fs
> manifest file:
>
> $ cat /etc/puppet/modules/apache/manifests/mod/dav_fs.pp
> class apache::mod::dav_fs {
> Class[apache::mod::dav] -> Class[apache::mod::dav_fs]
> apache::mod { 'dav_fs': }
> }

Hi Shantanu,

I did manage to replicate this. I apologize for the inconvenience!
While this syntax works fine Puppet 2.7, we seem to have missed that
it breaks in 2.6. Thankfully, it's a quick fix. Just enclose the class
names in single quotes. We'll get this resolved for future users of
the apache module.

To fix, take this line:
Class[apache::mod::dav] -> Class[apache::mod::dav_fs]

Replace it with this:
Class['apache::mod::dav'] -> Class['apache::mod::dav_fs']

Again, I'm sorry for the inconvenience! Thanks for letting us know about this.

Shantanu

unread,
Sep 11, 2012, 11:11:56 AM9/11/12
to puppet...@googlegroups.com
Thank you for looking into the issue Ryan. 

Sorry for the late reply.

The syntax error got fixed by putting single quotes around class name while including the class. But, then I got following error:
{{{
Failed to apply catalog: Parameter name failed: Could not find resource type 'a2mod' at /etc/puppet/modules/apache/manifests/init.pp:65
}}}

I do have create_resources module installed on the server system. As a temporary workaround, I have removed mod_dir variable definition from params class to avoid a2mod resource call. I have verified that this error doesn't occur with Puppet 2.7 version. I am planning to use Puppet 2.7 for future tests. 

Also, I am not sure why a2mod is being called on a CentOS system. Isn't a2mod typically used by Debian variants?

--
Thanks,
Shantanu

Reply all
Reply to author
Forward
0 new messages