-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support systemd socket activation #1378
Conversation
9db5fdf
to
fbd8126
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to add an integration test to this? My understanding is that this doesn't change anything in the integration tests so maybe a quick one using socket activation. (Though actually, alpine doesn't support systemd, so maybe not something very feasible?)
fbd8126
to
aa45f75
Compare
This change adds 2 features: 1) the --address flag of the soci snapshotter supports a network prefix 2) The soci snapshotter can listen on a file descriptor passed by systemd socket activation. If the user tells soci to listen on a file descriptor, but doesn't use systemd socket activation to launch the process, the snapshotter will fall back to the default address as a unix socket. The example systemd service file is updated to use systemd activation if possible. There is an example systemd socket file, but no strict dependency from the service file so that users who are always starting SOCI on boot won't get a warning from systemd. Signed-off-by: Kern Walster <[email protected]>
This change consolidates snapshotter startup tests into a single file instead of putting it in pull_test.go Signed-off-by: Kern Walster <[email protected]>
aa45f75
to
abd0e3b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it. Thanks for the added tests.
Issue #, if available:
Closes #1088
Description of changes:
This change adds 2 features:
systemd socket activation.
If the user tells soci to listen on a file descriptor, but doesn't use systemd socket activation to launch the process, the snapshotter will fall back to the default address as a unix socket.
The example systemd service file is updated to use systemd activation if possible. There is an example systemd socket file, but no strict dependency from the service file so that users who are always starting SOCI on boot won't get a warning from systemd.
Testing performed:
Tested manually and verified that:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.