LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 09-24-2020, 07:14 AM   #1
Pigi_102
Member
 
Registered: Aug 2008
Posts: 186

Rep: Reputation: 22
Trouble with kernel 5.4.65 and docker. Unable to find "memory" in controller set.


Hi all,
after migration to Pi4 and upgrade the kernel, to make it possible, I started to get :

Code:
docker: Error response from daemon: unable to find "memory" in controller set: unknown.
If it happens to you, the motivation is that in kernel is set to yes the
Code:
CONFIG_MEMCG=y
but the cgroup memory is disabled in kernel code, as per
https://github.com/raspberrypi/linux...ment-156697067
The fix took me some our to find, but is rather an easy one:
add cgroup_enable=memory in /boot/cmdline.txt and reboot.

I write this here as it may helps others.

Cheers

Pigi
 
Old 09-25-2020, 02:59 AM   #2
Exaga
SARPi Maintainer
 
Registered: Nov 2012
Distribution: Slackware AArch64
Posts: 1,043

Rep: Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665Reputation: 665
Quote:
Originally Posted by Pigi_102 View Post
Hi all,
after migration to Pi4 and upgrade the kernel, to make it possible, I started to get :

Code:
docker: Error response from daemon: unable to find "memory" in controller set: unknown.
If it happens to you, the motivation is that in kernel is set to yes the
Code:
CONFIG_MEMCG=y
but the cgroup memory is disabled in kernel code, as per
https://github.com/raspberrypi/linux...ment-156697067
The fix took me some our to find, but is rather an easy one:
add cgroup_enable=memory in /boot/cmdline.txt and reboot.
Hi Pigi, I can't say I've ever come across this problem.

The 5.4.65 kernel .config CONFIG_CGROUPS and CONFIG_MEMCG settings are:
Code:
#
# Scheduler features
#
# CONFIG_UCLAMP_TASK is not set
# end of Scheduler features

CONFIG_CGROUPS=y     <<< set
CONFIG_PAGE_COUNTER=y
CONFIG_MEMCG=y     <<< set
# CONFIG_MEMCG_SWAP is not set     <<< unset
CONFIG_MEMCG_KMEM=y     <<< set
 
Old 09-25-2020, 03:35 AM   #3
Pigi_102
Member
 
Registered: Aug 2008
Posts: 186

Original Poster
Rep: Reputation: 22
Yes, Exaga, and that's fine !

The problem is that in the kernel code there is:

Code:
@@ -5388,6 +5388,7 @@ struct cgroup_subsys memory_cgrp_subsys = {
	.dfl_cftypes = memory_files,
	.legacy_cftypes = mem_cgroup_legacy_files,
	.early_init = 0,
        .disabled = 1,
};
This means that when you boot the kernel, the option is provided, so you find them in :
Code:
# cat /proc/cgroups
#subsys_name    hierarchy       num_cgroups     enabled
...
memory  0       1       0

...
Thus dockerd try to use them but fail.

There are two option to workaround this problem:
1) unset the option and rebuild the kernel ( too much time consuming and must be repeated for every kernel upgrade )

2) add the cgroup_enable=memory in the cmdline.txt and enable the presence and use of memory cgroups in the running kernel, which is what I did.

with this option enabled, now I have:

Code:
# cat /proc/cgroups
#subsys_name    hierarchy       num_cgroups     enabled
...
memory  5       4       1
...
And that's why I have created this post, and marked as SOLVED

I've searched a lot but find really few about my problem so I decided to write the post in case others have the same problem.
Not sure how much are using docker on Pi, and if someone would use "your" new kernel can have the same issue and find here the fix


Pigi
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Docker Part 4: building and publishing custom docker images LXer Syndicated Linux News 0 04-08-2016 01:30 PM
SCSI controller - Add extra controller & add a disc to the extra controller raj100 Linux - Hardware 1 11-01-2015 11:30 AM
LXer: Docker Engine 1.6 Debuts Alongside Docker Registry 2.0 and Compose 1.2.0 LXer Syndicated Linux News 0 04-17-2015 09:02 PM
LXer: Set up Two Node RDO Juno ML2&OVS&VXLAN Cluster runnig Docker Hypervisor on Controller and KVM LXer Syndicated Linux News 0 01-26-2015 12:41 PM
Help With Java Problem Please"""""""""""" suemcholan Linux - Newbie 1 04-02-2008 06:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 07:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration