plathrop / puppet-module-supervisor

Puppet module for configuring the supervisor daemon tool.
BSD 3-Clause "New" or "Revised" License
6 stars 0 forks source link

Remove superfluous 'modules' in puppet file path. #12

Closed blt closed 12 years ago

blt commented 12 years ago

Exactly how puppet converts ambiguous paths into absolute paths I'm not entirely sure. I am sure, however, that the path modified that this commit resolved into:

/etc/puppet/modules/modules/files/supervisor/logrotate

where the new path resolves to

/etc/puppet/modules/modules/supervisor/files/logrotate

The later, of course, being correct.

Signed-off-by: Brian L. Troutwine brian@troutwine.us

plathrop commented 12 years ago

A couple things:

1) Please keep your pull requests on a single topic, so that it is easier for me to merge individual patches. 2) I am 100% certain that the path is, in fact, correct. I suspect you have a different configuration that is leading to the files ending up not where you expect. What version of puppet are you using, and what does the relevant section of your puppet.conf look like? (modulepath is the relevant setting)

I'm going to close this instance of the pull so you can divide it up into separate topics.

blt commented 12 years ago

1) Please keep your pull requests on a single topic, so that it is easier for me to merge individual patches.

Hmm, that's peculiar; I intended to send only the first patch. Apologies.

2) I am 100% certain that the path is, in fact, correct.

As was I. It does, in fact, work when I run puppetmasterd directly, but not when it's run in production mode, run in thin and fronted by nginx. At least, as both of those are configured.

I suspect you have a different configuration that is leading to the files ending up not where you expect. What version of puppet are you using,

2.7.9

and what does the relevant section of your puppet.conf look like? (modulepath is the relevant setting)

puppet.conf's running defaults, so

# puppet --configprint modulepath
/etc/puppet/modules:/usr/share/puppet/modules

and the relevant section of supervisord config giving my thin invocation:

[program:puppetmaster]
command=/usr/bin/thin start -e development --socket /var/run/puppet/master.%(process_num)02d.sock --user puppet --group puppet --chdir /etc/puppet -R /etc/puppet/config.ru

The path '/etc/puppet/modules/modules/files/supervisor/logrotate' was pulled directly from my nginx error log.

plathrop commented 12 years ago

Huh. That is... weird. I'm unfamiliar with running under thin, but your puppet version is one I would expect to actually complain if you neglect to include "modules" in the path - as of puppet 2.6 leaving the "modules/" prefix out became deprecated and began to cause a warning.

"Notice that the file source path includes a modules/ component. In Puppet version 0.25 and later, you must include this component in source paths in order to serve files from modules. Puppet 0.25 will still accept source paths without it, but it will warn you with a deprecation notice about “Files found in modules without specifying ‘modules’ in file path”. In versions 0.24 and earlier, source paths should not include the modules/ component."

Could be a bug, but without the ability to explore your specific configuration I can't be sure; based on the above-quoted documentation excerpt I'm inclined to not merge the change, I hope you understand.

blt commented 12 years ago

Oh, absolutely. Clearly there's something screwy going on with my end of things.

Do you have a reference to the documentation you quote, perhaps? I'm updating a rather old puppet configuration and must have missed that in my reading.

plathrop commented 12 years ago

That came from: http://docs.puppetlabs.com/guides/modules.html#example