Repository navigation
Make targets fail again - #16542
Merged
Merged
Make targets fail again#16542
Conversation
The CI occasionally fail in test-path with a timeout. test-path loads units from the filesystem, and this conceivably might take more than the default limit of 3 s. Increase the timeout substantially to see if this helps.
This reverts commit c7220ca. The removal was done as a reaction to the messages from systemd: initrd-root-fs.target: Requested dependency OnFailure=emergency.target ignored (target units cannot fail). initrd.target: Requested dependency OnFailure=emergency.target ignored (target units cannot fail). initrd-root-device.target: Requested dependency OnFailure=emergency.target ignored (target units cannot fail). initrd-fs.target: Requested dependency OnFailure=emergency.target ignored (target units cannot fail). local-fs.target: Requested dependency OnFailure=emergency.target ignored (target units cannot fail). ... But it seems that the messages themselves are wrong, and the units were OK.
Fixes systemd#16401. c80a9a3 introduced the .can_fail field, but didn't set it on .targets. Targets can fail through dependencies. This leaves .slice and .device units as the types that cannot fail. $ systemctl cat bad.service bad.target bad-fallback.service [Service] Type=oneshot ExecStart=false [Unit] OnFailure=bad-fallback.service [Service] Type=oneshot ExecStart=echo Fixing everythign! $ sudo systemctl start bad.target systemd[1]: Starting bad.service... systemd[1]: bad.service: Main process exited, code=exited, status=1/FAILURE systemd[1]: bad.service: Failed with result 'exit-code'. systemd[1]: Failed to start bad.service. systemd[1]: Dependency failed for bad.target. systemd[1]: bad.target: Job bad.target/start failed with result 'dependency'. systemd[1]: bad.target: Triggering OnFailure= dependencies. systemd[1]: Starting bad-fallback.service... echo[46901]: Fixing everythign! systemd[1]: bad-fallback.service: Succeeded. systemd[1]: Finished bad-fallback.service.
Member
|
Yupp, this is correct. And I was an idiot... |
poettering
approved these changes
Jul 22, 2020
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.
No description provided.