Skip to content

Container remains Stopped after container-management service restart #191

@stoyan-zoubev

Description

@stoyan-zoubev

I have a container that wants to communitate with Kanto CM over gRPC. That's why my container is created with moun point like
--mp="/run/container-management/container-management.sock:/run/container-management/container-management.sock".

It is all fine, container is created and started successfully through the kanto-cm CLI.

However, the problem occurs when Kanto container-management service is restarted. Then my container remains stopped and not starting automatically.

The following message is seen in the kanto-cm log file.
level=error msg="[container-management][ctrd_client.go:255][pkg:github][func:com/eclipse-kanto/container-management/containerm/ctr] error creating task for container ID = 1eb42aec-8bb9-4da7-833e-fa3030a245a5 \n\t Error: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting \"/run/container-management/container-management.sock\" to rootfs at \"/run/container-management/container-management.sock\": stat /run/container-management/container-management.sock: no such file or directory: unknown "

I guess the loading and restarting of previously available containers is performed before the starting of Kanto-CM gPRC server, that's why the container-management.sock file does not yet exist and mounting fails.

But could it make a container restart attempt later? What about container's restart policy, it seems to be ignored in this case...

A workaround is to use a mount point only to --mp="/run/container-management:/run/container-management".

Metadata

Metadata

Assignees

Labels

taskSingle unit of work

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions