future-night-11133
02/20/2023, 5:46 AMFATA[0000] unsupported restart policy "unless-stopped", supported policies are: []
Doing some investigation at nerdctl code, I found this lines at checkRestartCapabilities:
res, err := client.IntrospectionService().Plugins(ctx, []string{"id==restart"})
if err != nil {
return false, err
}
if len(res.Plugins) == 0 {
return false, fmt.Errorf("no restart plugin found")
}
restartPlugin := res.Plugins[0]
capabilities := restartPlugin.Capabilities
if len(capabilities) == 0 {
capabilities = []string{"always"}
}
if !strutil.InStringSlice(capabilities, policySlice[0]) {
return false, fmt.Errorf("unsupported restart policy %q, supported policies are: %q", policySlice[0], restartPlugin.Capabilities)
}
It seems it could’t find the policies available from containerd so it set default to “always” only, which is the only one working here.
After some research, I came across this command to list containerd plugins:
ctr plugins ls
So I tried:
❯ rdctl shell ctr plugins ls
qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory
Error: exit status 255
Is this a containerd problem, or rancher-desktop? Maybe because of M1 architecture.
@fast-garage-66093 maybe you have a clue about it.
Thanks!res, err := client.IntrospectionService().Plugins(ctx, []string{"id==restart"})
Is:
"plugins:{type:\"io.containerd.internal.v1\" id:\"restart\" requires:\"io.containerd.event.v1\" requires:\"io.containerd.service.v1\"}"
So it seems it acquired the response about the plugin “restart”, but the Capabilities where not returned. 🤔fast-garage-66093
02/20/2023, 8:30 PMfuture-night-11133
02/20/2023, 9:41 PMfast-garage-66093
02/20/2023, 9:48 PM