Add foreman.target lifecycle tests (stop/start and restart)#409
Merged
evgeni merged 2 commits intotheforeman:masterfrom Mar 20, 2026
Merged
Add foreman.target lifecycle tests (stop/start and restart)#409evgeni merged 2 commits intotheforeman:masterfrom
evgeni merged 2 commits intotheforeman:masterfrom
Conversation
Contributor
Author
|
This one requires #412 to run reliably. |
Member
|
@pablomh mind rebasing this one? |
Extends foreman_target_test.py with lifecycle tests intended to run at the end of the test suite. Tests that foreman.target can be cleanly stopped and restarted, and that Foreman becomes available again afterwards via the HTTPS endpoint (same curl pattern as test_https_foreman_ping in httpd_test.py).
Member
|
Mhh, still failing |
Contributor
Author
|
I'm confident that the final fix is #413. I thought that it was the "logical" dependency, but didn't find the issue it in my testing because of timing. |
Foreman depends on Candlepin being fully initialised before it can
serve requests reliably. Without this ordering, foreman.service starts
simultaneously with candlepin.service, competing for CPU and disk I/O
during the JVM startup. This pushes Rails loading time close to the
default TimeoutStartSec (90s) and causes intermittent failures on
restart, particularly when the system is under load.
Because candlepin.service already declares:
After=redis.service postgresql.service
the transitive ordering becomes:
postgresql --+
+--> candlepin --> foreman
redis -------+
so explicit redis.service and postgresql.service dependencies on
foreman.service are not needed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
evgeni
approved these changes
Mar 20, 2026
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.
Extends
foreman_target_test.pywith lifecycle tests intended to run at the end of the test suite. Tests thatforeman.targetcan be cleanly stopped and restarted, and that Foreman becomes available again afterwards via the HTTPS endpoint (same curl pattern astest_https_foreman_pinginhttpd_test.py).