[meta-virtualization]: dunfell docker run issues


Marek Belisko
 

Hi,

I'm trying to run docker containers on orangepi and use
meta-virtualization layer to add docker. I've installed the docker-ce
package and everything seems to be fine.

But docker service seems fails to start with:
Feb 04 15:00:01 orange-pi-zero dockerd[495]: failed to start daemon:
Devices cgroup isn't mounted

I was trying to add various options to kernel command line like
described here: https://github.com/docker/cli/issues/2104

but it doesn't work. My command-line looks like:
...systemd.unified_cgroup_hierarchy=0 cgroup_enable=memory
cgroup_memory=1 swapaccount=1 cgroup_no_v1=all

Any other ideas what to check? Thanks a lot.

BR,

marek

--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com


Nicolas Jeker
 

On Thu, 2021-02-04 at 16:03 +0100, Marek Belisko wrote:
Hi,
I'm trying to run docker containers on orangepi and use
meta-virtualization layer to add docker. I've installed the docker-ce
package and everything seems to be fine.

But docker service seems fails to start with:
Feb 04 15:00:01 orange-pi-zero dockerd[495]: failed to start daemon:
Devices cgroup isn't mounted
Is your kernel actually configured with cgroups support?

You need CONFIG_CGROUPS and many of the child configs. From your error
message I suspect you're missing CONFIG_CGROUP_DEVICE, but that's just
an educated guess.

Maybe take a look at the Gentoo wiki to see which CONFIG's need to be
set (just disregard the Gentoo specifics):
https://wiki.gentoo.org/wiki/Docker#Kernel

These are the CGROUP-related configs:

Menuconfig:
General setup --->
[*] POSIX Message Queues
-*- Control Group support --->
[*] Memory controller
[*] Swap controller
[*] Swap controller enabled by default
[*] IO controller
[ ] IO controller debugging
[*] CPU controller --->
[*] Group scheduling for SCHED_OTHER
[*] CPU bandwidth provisioning for FAIR_GROUP_SCHED
[*] Group scheduling for SCHED_RR/FIFO
[*] PIDs controller
[*] Freezer controller
[*] HugeTLB controller
[*] Cpuset controller
[*] Include legacy /proc/<pid>/cpuset file
[*] Device controller
[*] Simple CPU accounting controller
[*] Perf controller
[ ] Example controller

I was trying to add various options to kernel command line like
described here: https://github.com/docker/cli/issues/2104

but it doesn't work. My command-line looks like:
...systemd.unified_cgroup_hierarchy=0 cgroup_enable=memory
cgroup_memory=1 swapaccount=1 cgroup_no_v1=all

Any other ideas what to check? Thanks a lot.

BR,

marek


Robert Berger
 

Hi,

On 04/02/2021 17:03, Marek Belisko wrote:
Hi,
I'm trying to run docker containers on orangepi and use
meta-virtualization layer to add docker. I've installed the docker-ce
package and everything seems to be fine.
But docker service seems fails to start with:
Feb 04 15:00:01 orange-pi-zero dockerd[495]: failed to start daemon:
Devices cgroup isn't mounted
Can you please tell us which version of yocto this is?

Also which kernel and especially which kernel config.

I use something pretty recent (master kind of) and I am able to start docker and podman with a custom kernel, but networking is very wrong.

e.g.
1) if I run a web service in a container and open port 8080 to the outside world it is not accessible.

2) it's also not possible with docker-compose/podman-compose to communicate between containers

... unless I put everything on the host network.

Once you reconfigure your kernel and get it up and running could you please also test the issues I mention here?

BTW will dunfell it seems to work, I need to retest, but I have some boards running with it, I believe.

If you manage to get an upstream kernel to run on your orangepi zero I guess I could even give you my layers to give it a try. You will need another device tree and boot loader, but the rest should work.

Regards,

Robert


Leon Woestenberg
 

Marek,

This might indeed indicate a configuration mismatch. Lots of stuff
comes up on Google that you might want to check.

One is a change in systemd that affects this. Sorry I don't have a
link ready anymore.

Regards,

Leon.




--
Leon Woestenberg
leon@sidebranch.com
T: +31 40 711 42 76
M: +31 6 472 30 372

Sidebranch Embedded Systems
Eindhoven, The Netherlands
http://www.sidebranch.com

On Thu, Feb 4, 2021 at 4:04 PM Marek Belisko <marek.belisko@gmail.com> wrote:

Hi,

I'm trying to run docker containers on orangepi and use
meta-virtualization layer to add docker. I've installed the docker-ce
package and everything seems to be fine.

But docker service seems fails to start with:
Feb 04 15:00:01 orange-pi-zero dockerd[495]: failed to start daemon:
Devices cgroup isn't mounted

I was trying to add various options to kernel command line like
described here: https://github.com/docker/cli/issues/2104

but it doesn't work. My command-line looks like:
...systemd.unified_cgroup_hierarchy=0 cgroup_enable=memory
cgroup_memory=1 swapaccount=1 cgroup_no_v1=all

Any other ideas what to check? Thanks a lot.

BR,

marek

--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com