TIP quarkus-systemd-notify when deploy to systemd #31097
Merged
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.
I've been following a tutorial to deploy container image based application as a service on Linux using Podman and Systemd.
I am a Java developer, not much of a sysadmin. The tutorial was easy to follow and everything seemed to be working as expected, except when configuring a systemd service the Quarkus app was started again as normal (I could interact with the app) but the systemd status was always dangling to "Starting" / initialising, despite the log from the Quarkus app showed it was fully started for long.
I've then been following a "rabbit hole" only to figure out:
podman run --sdnotify=container ...
unless I know for certain the container image do support the NOTIFY_SOCKET, which is not always so trivial to figure out. I've learned from:--sdnotify default value from the "podman create" man page is "container" but "conmon" is used when running "podman generate systemd ..." containers/podman#15029 (comment)
Integrate Linux systemd-notify with Quarkus #29107 (comment)
This was a great learning opportunity, but at the same time if only I had this TIP inside of the quarkus guide (this PR) I guess it would have saved me quite some time 😅 , so I hope this addendum is merged in the hope of being a very relevant suggestion to the next one reading after me :)
Thanks!