Fixes #560 - Add systemctl wants to foreman.target for httpd#561
Open
qcjames53 wants to merge 1 commit into
Open
Fixes #560 - Add systemctl wants to foreman.target for httpd#561qcjames53 wants to merge 1 commit into
qcjames53 wants to merge 1 commit into
Conversation
ehelms
reviewed
Jun 11, 2026
a17696e to
eb9b28a
Compare
ehelms
reviewed
Jun 11, 2026
| certificate_checks_certificate: "{{ server_certificate }}" | ||
| certificate_checks_key: "{{ server_key }}" | ||
| certificate_checks_ca: "{{ server_ca_certificate }}" | ||
| - role: systemd_target |
Contributor
Author
There was a problem hiding this comment.
The foreman.target needed to be created before the httpd task used it for my previous add-wants approach. I just moved it back in the newest push.
ehelms
approved these changes
Jun 12, 2026
ehelms
reviewed
Jun 12, 2026
| assert drop_in.is_file | ||
| assert drop_in.contains("PartOf=foreman.target") | ||
| assert drop_in.contains("WantedBy=foreman.target") | ||
| assert not drop_in.contains("WantedBy=foreman.target") |
Member
There was a problem hiding this comment.
Err sorry, this is kind of a weird assertion. I think if we are going to test anything, then we should test that the httpd.service has what we expect.
Contributor
Author
There was a problem hiding this comment.
Agreed. Asked Claude to fix the unit test but missed that it changed this line to something weird. It should assert on the actual string now.
ianballou
approved these changes
Jun 15, 2026
ianballou
left a comment
There was a problem hiding this comment.
Working nicely for me:
[root@katello-production ~]# systemctl list-dependencies foreman.target
foreman.target
● ├─candlepin.service
● ├─dynflow-sidekiq@orchestrator.service
● ├─dynflow-sidekiq@worker-hosts-queue.service
● ├─dynflow-sidekiq@worker.service
● ├─foreman-proxy.service
× ├─foreman-recurring@daily.service
● ├─foreman-recurring@daily.timer
× ├─foreman-recurring@hourly.service
● ├─foreman-recurring@hourly.timer
○ ├─foreman-recurring@monthly.service
● ├─foreman-recurring@monthly.timer
× ├─foreman-recurring@weekly.service
● ├─foreman-recurring@weekly.timer
● ├─foreman.service
● ├─httpd.service
● ├─postgresql.service
● ├─pulp-api.service
● ├─pulp-content.service
● ├─pulp-worker@1.service
● ├─pulp-worker@2.service
● ├─pulp-worker@3.service
● ├─pulp-worker@4.service
● ├─redis.service
● └─pulp-worker.target
● ├─pulp-worker@1.service
● ├─pulp-worker@2.service
● ├─pulp-worker@3.service
● └─pulp-worker@4.service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are you introducing these changes? (Problem description, related links)
When running systemctl start foreman.target, Apache (httpd) does not start on it's own. I attempted to include this as a part of the fix in #536 but biffed the implementation.
What are the changes introduced in this pull request?
foreman.target's wants to properly include httpd. The old add-wants block was skipped by systemctl due to httpd being in themulti-user.target(higher prio). This was fine unless the user manually wanted to runsystemctl stop foreman.targetandsystemctl start foreman.target, which might sometimes be the case.How to test this pull request
Steps to reproduce:
vagrant ssh quadletafter VM boot.systemctl list-dependencies foreman.targetto verify httpd made the list.systemctl stop foreman.targetandsystemctl status httpdto ensure it stopped.systemctl start foreman.targetandsystemctl status httpdto ensure it is running.Checklist