[openstack-dev] [fuel-library] making task "apache" idempotent

Dmitry Bilunov dbilunov at mirantis.com
Fri Dec 11 11:13:46 UTC 2015


Hello.

I am trying to pick a way of making puppet
manifest fuel-library/deployment/puppet/osnailyfacter/modular/apache/apache.pp
idempotent.
During a normal execution flow, Fuel (fuel-astute, actually) would run
"apache" task before running other tasks, which create virtual host
configuration files inside /etc/apache2/sites-enabled/.
"apache" task currently purges all configuration files, not created by it -
see https://forge.puppetlabs.com/puppetlabs/apache#purge_configs; it seems
reasonable to have this option enabled.

However, fuel-astute runs all tasks in a separate "puppet apply" processes,
which do not know anything about the state of each other. So I cannot use
the intended (by puppetlabs-apache) way of regenerating the configs after
the purge.

One way to achieve it is moving the code, generating the configs, into
apache.pp, so it will be re-run after each purge. However, it is
complicated by the need of existence of various resources: services' files,
users and packages. We cannot simply declare any of *::wsgi::apache classes
inside apache.pp due to these dependencies.

Another way is simply disabling purge_configs and purging manually
everything that we don't need (like distro's apache mpm config).

Which of these ways looks better? Are there any alternatives that I am
missing?
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20151211/0a1d59d0/attachment.html>


More information about the OpenStack-dev mailing list