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

[Bug] Should the SOCI snapshotter start after containerd in the example systemd unit file? #932

Open
ollypom opened this issue Nov 10, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@ollypom
Copy link

ollypom commented Nov 10, 2023

Description

The systemd unit file in this repo starts the SOCI snapshotter before containerd.

Before=containerd.service

However if you use the containerd content store.

$  cat /etc/soci-snapshotter-grpc/config.toml 
...
[content_store]
type="containerd"
namespace="default"

And restart the server, the snapshotter fails to start

{
    "error": "cannot create content store: could not connect to containerd socket for content store access: failed to dial \"/run/containerd/containerd.sock\": context deadline exceeded: connection error: desc = \"transport: error while dialing: dial unix:///run/containerd/containerd.sock: timeout\"",
    "level": "fatal",
    "msg": "failed to configure filesystem",
    "time": "2023-11-10T11:39:48.945546470Z"
}

Steps to reproduce the bug

No response

Describe the results you expected

The soci snapshottter should start

Host information

  1. OS: AL2
  2. Snapshotter Version: 0.4.0
  3. Containerd Version: 1.6.9

Any additional context or information about the bug

No response

@ollypom ollypom added the bug Something isn't working label Nov 10, 2023
@tuananh
Copy link
Contributor

tuananh commented Nov 20, 2023

historically, stargz snapshotter doesn't have startup dependency on containerd service but since soci uses content_store from containerd by default(!?), we should change the service to be After ?

func NewStoreConfig(opts ...Option) config.ContentStoreConfig {
storeConfig := config.ContentStoreConfig{
Type: config.DefaultContentStoreType,
Namespace: namespaces.Default,
}

@github-project-automation github-project-automation bot moved this to ❓ Ungroomed in soci-snapshotter Nov 21, 2023
@Kern-- Kern-- moved this from ❓ Ungroomed to 📋 Backlog in soci-snapshotter Nov 21, 2023
@Kern--
Copy link
Contributor

Kern-- commented Apr 9, 2024

The containerd content store is not default and is still experimental.

The benefit to starting SOCI before containerd is that clients can rely on readiness of the containerd daemon to mean that the host is ready to pull images. If we switch the order, there is a risk that containerd is marked ready and an image pull is initiated before SOCI is ready.

I think we want to keep this order, but change SOCI to lazily instantiate the content store once containerd actually tries to use SOCI for an image pull. Would that work for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants