Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1964591: Remove AI Agent image in case of service failure
This PR adds a handler for a failure scenario of `agent.service` which removes the `assisted-installer-agent` container image. This is a workaround for an issue where symlinks in `/var/lib/containers/` are corrupted. Deleting an image in `ExecStartPre` means that every time agent.service starts we make sure the image is available. If it's the very first attempt to start `agent.service`, then the the image will be pulled as it would be in any other scenario. Any consecutive attempt to start `agent.service` will first check if the image is present and in case of errors will remove it so that it can be pulled again. We are not using the `OnFailure` directive because the unit defined there would only be started once all the restarts attempts are exhausted which is not a desired workflow in this scenario here. Closes: OCPBUGSM-29583
- Loading branch information