[Pkg-puppet-devel] should config.ru be a conffile?
Nigel Kersten
nigel at explanatorygap.net
Thu Sep 9 17:06:35 UTC 2010
On Thu, Sep 9, 2010 at 9:21 AM, Mathias Gug <mathiaz at ubuntu.com> wrote:
> Hi,
>
> Excerpts from Nigel Kersten's message of Tue Sep 07 21:44:33 -0400 2010:
>> On Tue, Sep 7, 2010 at 1:18 PM, Marc Fournier
>> <marc.fournier at camptocamp.com> wrote:
>> > On Tue, Sep 07, 2010 at 11:41:20AM -0700, Nigel Kersten wrote:
>> >>
>> >> I imagine we may not be the only deployment that sets up config.ru
>> >> with a --config parameter to look at a different config file for
>> >> puppetmaster, and would argue that
>> >> /usr/share/puppet/rack/puppetmasterd/config.ru should probably be a
>> >> conffile.
>> >
>> > I suppose most people manage their puppetmaster setup using puppet itself.
>> > But in this specific case, we have a sort of chicken and egg problem.
>> >
>> > So I agree with you it makes sense to avoid overwriting config.ru on
>> > package update. But it seems that in this case, the file should be moved in
>> > /etc (as specified in the policy[¹]), or at least have a symlink to it in
>> > /etc.
>>
>> I completely forgot about this bit of policy, and it does matter.
>>
>> From memory, we no longer need to preserve the 'puppetmasterd' part of
>> the path component for the config.ru file, as the name no longer
>> matters for 2.6.x, and we could easily put this into
>> /etc/puppet/rack/config.ru
>>
>> Something bothers me about putting the whole
>> /etc/puppet/rack/{public,tmp} data in /etc as it's more than just
>> config files, but in practice it isn't really a problem for
>> puppet/passenger as there's little reason to actually put data there.
>>
>
> Should rack/tmp/ be writable? If so it shouldn't go in /usr (as /usr
> could be read-only). It should go in /var/tmp/rack/puppetmaster/ for
> example.
It does need to be writable I believe. I'll do some experimenting to
work out what's feasible to solve via symlinks today.
>
>> Perhaps we should switch to the config.ru file being in /etc/puppet
>> and symlinking back to /usr/share/puppet ? That doesn't feel like an
>> awesome solution either though.
>>
>
> How about adding a configuration file in /etc/puppet/ where options
> could be set for config.ru? I don't have enough knowledge about rack and
> config.ru to know whether that's feasible. At a first view it seems that
> configuration and code are mixed in config.ru. Separating both would be
> helpful.
It looks like code, but it isn't really much of that. You generally
just set config options there and then start the relevant application.
It used to be a lot of code with 0.24.x, but not really in 0.25
I think your suggestion is feasible, but I personally think it
diverges us too much from upstream for too little gain, and the
interaction between options in the config file, config.ru and command
line have had too many edge cases upstream for me to feel really
confident.
More information about the Pkg-puppet-devel
mailing list