-
Notifications
You must be signed in to change notification settings - Fork 282
fix(apache.service.running): prevent recursive requisite #388
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
base: master
Are you sure you want to change the base?
Conversation
|
Had this problem and these changes actually made it work properly. |
|
Had the problem as well, this fixed it mostly. I only had to add the following change to remove the "Recursive requisite found" message for the configure modules: diff --git a/formulas/apache/config/modules/install.sls b/formulas/apache/config/modules/install.sls
index 5bab8295..c7f4fecf 100644
--- a/formulas/apache/config/modules/install.sls
+++ b/formulas/apache/config/modules/install.sls
@@ -40,8 +40,6 @@ apache-config-modules-{{ module }}-enable:
{%- endif %}
- order: 225
- - require:
- - sls: {{ sls_config_file }}
- watch_in:
- module: apache-service-running-restart
- require_in: |
|
Small update to my previous comment. The state in diff --git a/apache/config/modules/install.sls b/apache/config/modules/install.sls
index 9cc5273..b85c80c 100644
--- a/apache/config/modules/install.sls
+++ b/apache/config/modules/install.sls
@@ -41,7 +41,7 @@ apache-config-modules-{{ module }}-enable:
{%- endif %}
- order: 225
- require:
- - sls: {{ sls_config_file }}
+ - file: apache-config-file-directory-moddir
- watch_in:
- module: apache-service-running-restart
- require_in: |
|
danny-smit's April 18 comment did not on its own fix this for me. The patch here plus: diff --git a/apache/config/file.sls b/apache/config/file.sls
index 9cc5c93..9db036a 100644
--- a/apache/config/file.sls
+++ b/apache/config/file.sls
@@ -97,6 +97,8 @@ apache-config-file-managed:
- sls: {{ sls_package_install }}
- context:
apache: {{ apache | json }}
+ - watch_in:
+ - service: apache-service-running
{%- if grains.os_family in ('Debian', 'FreeBSD') %}
diff --git a/apache/config/modules/install.sls b/apache/config/modules/install.sls
index 9cc5273..b85c80c 100644
--- a/apache/config/modules/install.sls
+++ b/apache/config/modules/install.sls
@@ -41,7 +41,7 @@ apache-config-modules-{{ module }}-enable:
{%- endif %}
- order: 225
- require:
- - sls: {{ sls_config_file }}
+ - file: apache-config-file-directory-moddir
- watch_in:
- module: apache-service-running-restart
- require_in:did fix it. (I didn't try it with just the PR.) Reading the PR:
Anyway, I think the PR plus the patch above in this comment seems good and should get merged. |
This is a follow-on to PR saltstack-formulas#388: - When the main Apache config file changes, reload Apache - Installing modules only needs the module dir to exist, it doesn't need the entire config. Tightening up this requisite avoids potential circular dependencies.
PR progress checklist (to be filled in by reviewers)
What type of PR is this?
Primary type
[build]Changes related to the build system[chore]Changes to the build process or auxiliary tools and libraries such as documentation generation[ci]Changes to the continuous integration configuration[feat]A new feature[fix]A bug fix[perf]A code change that improves performance[refactor]A code change that neither fixes a bug nor adds a feature[revert]A change used to revert a previous commit[style]Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)Secondary type
[docs]Documentation changes[test]Adding missing or correcting existing testsDoes this PR introduce a
BREAKING CHANGE?No.
Related issues and/or pull requests
–
Describe the changes you're proposing
I made this error go away: :-)
Pillar / config required to test the proposed changes
–
Debug log showing how the proposed changes work
Documentation checklist
README(e.g.Available states).pillar.example.Testing checklist
state_top).Additional context