apache2: Infinite loop from apache2_mod_auth_cas and apache2_module 'auth_cas' resources
đź‘» Brief Description
Simply using apache2_mod_auth_cas 'auth_cas' results in an infinite loop which eventually causes my chef-client run to fail. Sample logging:
* directory[/var/cache/mod_auth_cas/] action create (up to date)
* apache2_mod_auth_cas[auth_cas] action install
* file[/etc/httpd/conf.d/auth_cas.conf] action create (skipped due to only_if)
* apache2_module[auth_cas] action enable
* apache2_mod_auth_cas[default] action install
* file[/etc/httpd/conf.d/auth_cas.conf] action create (skipped due to only_if)
* apache2_module[auth_cas] action enable
* apache2_mod_auth_cas[default] action install
* file[/etc/httpd/conf.d/auth_cas.conf] action create (skipped due to only_if)
* apache2_module[auth_cas] action enable
* apache2_mod_auth_cas[default] action install
...
🥞 Cookbook version
depends 'apache2', '~> 8.9.1'
👩‍🍳 Chef-Infra Version
[~]# chef-client --version
Chef Infra Client: 15.15.1
🎩 Platform details
Latest AWS Amazon Linux 2 AMI (ami-0915bcb5fa77e4892)
Steps To Reproduce
Steps to reproduce the behavior:
- Add the
apache2_mod_auth_casresource as-is to a wrapper cookbook - Run
chef-client - Notice the infinite loop
đźš“ Expected behavior
No infinite looping and successful Chef Infra run.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 28 (13 by maintainers)
Er, my fault I forgot to delete the cached
apache2cookbook which didn’t have your recent change in it.I confirmed that I am seeing an Apache reload when the directives change.
If I don’t hear back from you within the next day, I’ll just go ahead and release this PR since I think it’s close enough.
@ramereth I was able to get around to testing your branch and confirmed I no longer run into the infinite loop and the generated config file is as expected (i.e. with the added directives).
For reference, here’s a snippet of the check in once I pointed to your branch:
Thanks again for your assistance!
Not yet @ramereth, but it’s on my TODO list this week. I will follow up as soon as I can.
@rgriffith if you could test it yourself and make sure it works for you that’d be great. Then I can merge/release it!
@rgriffith ok, I’ve made that change to the PR. Can you please move any further discussion to the PR so we can discuss better in context of code if you need to? Thanks!
@ramereth So you’ll keep those “core” couple that are there currently and allow passing in arbitrary directives? I should be able to make that work.
I’ve narrowed down the problem and will be pushing a fix soon.
I confirmed this is happening. I’m taking a look to see why this is happening.