Skip to content
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

Run the SOCI snapshotter with systemd #660

Closed
ollypom opened this issue Oct 26, 2023 · 2 comments
Closed

Run the SOCI snapshotter with systemd #660

ollypom opened this issue Oct 26, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request feature_request New Feature Request for Finch

Comments

@ollypom
Copy link
Contributor

ollypom commented Oct 26, 2023

What is the problem you're trying to solve?.
Today we are running the SOCI snapshotter as a background process. Could we switch to running the SOCI snapshotter as a systemd service? Among many other benefits, it would help centralize soci snapshotter logs into journald. The SOCI snapshotter project already provides an example systemd file.

We also are already running the stargz snapshotter with systemd in Finch (Another outstanding question here is should we be? considering we don't expose stargz in the Finch configuration file).

$ sudo systemctl status stargz-snapshotter
● stargz-snapshotter.service - stargz snapshotter
     Loaded: loaded (/usr/local/lib/systemd/system/stargz-snapshotter.service; enabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: active (running) since Thu 2023-10-26 10:30:09 UTC; 16min ago

Describe the feature you'd like
Could we switch to running the SOCI snapshotter as a systemd service?

Additional context
Add any other context or screenshots about the feature request here.

@ginglis13
Copy link
Contributor

@ollypom starting soci as a normal process on boot proved to be an issue with the Windows implementation of Finch, so we opted to pivot to starting soci as a systemd service as part of that effort.

See

# install as a systemd service
curl --retry 2 --retry-max-time 120 -OL "%s"
mv soci-snapshotter.service /usr/local/lib/systemd/system/
ln -s /usr/local/lib/systemd/system/soci-snapshotter.service /etc/systemd/system/multi-user.target.wants/
restorecon -v /usr/local/lib/systemd/system/soci-snapshotter.service
systemctl daemon-reload
sudo systemctl add-requires soci-snapshotter.service containerd.service
systemctl enable --now soci-snapshotter

which is included in #649

We can opt to either port that commit over to main ASAP, or wait for the release of Finch that includes Windows support.

@pendo324 pendo324 self-assigned this Oct 30, 2023
pendo324 added a commit that referenced this issue Oct 31, 2023
Issue #, if available: #660 and probably #661

*Description of changes:*
- Run SOCI as a systemd service
- Ported from #649, which still needs more time before we can merge it

*Testing done:*
- e2e/unit tests

- [x] I've reviewed the guidance in CONTRIBUTING.md


#### License Acceptance

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

---------

Signed-off-by: Justin Alvarez <[email protected]>
@pendo324
Copy link
Member

Fixed by #667.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature_request New Feature Request for Finch
Projects
None yet
Development

No branches or pull requests

3 participants