-
-
Notifications
You must be signed in to change notification settings - Fork 547
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
apache conf.d directory deleted by recipe #295
Comments
Yes since version 2.0.0 it is replaced by |
@svanzoest thanks for prompt response! it breaks apache setup for packages like may be there is a better way to work with packages which still creates .conf file under |
What platform and apache version are you seeing this on? You can use the definitions to drop the file in conf-available and enable it. |
Platform: Amazon AMI 2014-09 To get the definitions i had to stop chef client, uninstall |
The cookbook does things the apache 2.4 way and switched to using the a2enconf scripts similar to the Debian packages. You could add your own directive in conf-enabled to |
@svanzoest Indeed i am using Issue is that Issue is not about managing the conf's, its regarding missing Though having But, getting the conf file definitions for a package (e.g. icinga) is still a problem as package will never create any conf file due to missing |
I am okay with adding a backwards compatibility flag for |
I think the icinga cookbook should address this - they might want to add constraints to what versions of the apache2 cookbook are supported. But, there is already the ability to place |
Worth noting #250 for the record, as in that case, it was unclear how to migrate forward. |
This issue is still holding us back from rolling out this cookbook in production, as reported by me in #250. In a mixed Ubuntu 12.04 / 14.04 (Apache 2.2/Apache 2.4) environment, rolling out this cookbook will break 12.04 based Apache boxes with config files in conf.d (as is usually the case). A flag, or as i suggested, a "if node['apache']['version'] == '2.4'" check around the deletion of /etc/apache2/conf.d would be very welcome! |
@hrak are your The older packages writing configs to conf.d is one such scenario any others? |
@svanzoest Its mostly that scenario indeed (packages on Ubuntu 12.04 and possibly other distros that drop off config bits in conf.d/, f.e. phpmyadmin). Some of our own cookbooks drop small config changes in there as well, but we could simply fix that in our wrapper/app cookbooks by using apache_config. Migrating from conf.d to conf-available could also be a nice thing to implement. Let the cookbook check for existance of conf.d, if it is there and there are files in there, move them to conf-available and link them in conf-enabled, and then remove the conf.d dir. It would be a nice idempotent solution that does not result in data/config loss. |
@hrak I agree with your comments. My additional concern is that between apache 2.2 and apache 2.4 you can not just copy over the Of course if we are talking a cookbook only update then it would be a lot easier as it is more likely that the configuration files should continue to work. It seems like the configuration files should be managed by chef though and therefore there would be no config loss at all. The exceptions would be a default configuration dropped by a package that chef is not aware of. Maybe the best way forward to ensure we keep a history of what the configuration files are, is copy them over, but not enable them. A somewhat related issue is #279 where packages drop in configuration files that are not known by the cookbook, or the cookbook expected those to be deleted, but they would be added again when the new yum package gets installed before the next chef run that can delete them again. I am starting to lean more towards rewriting the config empty, as ugly as that is, to avoid for them to be written again. |
The cookbook upgrade scenario is the most likely to happen, and the only one I'm worried about atm. I don't think people in for example a mixed Ubuntu 12.04/14.04 environment are crazy enough to combine a major cookbook version bump with a distro upgrade :) (or upgrade a working Apache 2.2 setup to 2.4 and expect things to work flawlessly) Yum rewriting config files and resetting permissions has bitten me quite some time as well, and i never really found a good way of preventing/fixing it. I guess RPM users just have to trigger a Chef run after running updates ;) |
As we are only beginning to utilize chef, we have some conf files in conf.d that are not under chef control... and it's a bit of a pain to upgrade servers to this cookbook when I have to first backup the conf.d files, run chef-client, and then restore any missing configs. |
@dgm my suggestion to you is to not do that. Determine what files are in |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
hello!
is it intended to delete
conf.d
directory inapache2::default
? any explanation is much appreciated.The text was updated successfully, but these errors were encountered: