The following cgroup subsystems are not mounted: devices, memory

0

everybody, my system uses cgroup2. Greengrass only use CGroup. What should I do to make Greengrass run on my system? In other words, Greengrass only supports CGroup, not cgroup2?

My raspberry4B version:

pi@raspberrypi:/greengrass/ggc $ uname -a
Linux raspberrypi 5.10.92-v8+ #1514 SMP PREEMPT Mon Jan 17 17:39:38 GMT 2022 aarch64 GNU/Linux

My cgroup like this:

pi@raspberrypi:/greengrass/ggc $ mount | grep cgroup
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)

greeengrass error starting:

pi@raspberrypi:/greengrass/ggc/core $ sudo ./greengrassd start
Waiting
Stopped greengrass daemon, exiting with success
Setting up greengrass daemon
Validating hardlink/softlink protection
Waiting for up to 1m10s for Daemon to start
Greengrass daemon running with PID: 1191. Some system components failed to start. Check 'runtime.log' for errors

check with tool[greengrass-dependency-checker-GGCv1.11.x]:

Missing required dependencies:
1. It looks like the cgroups directory is not mounted on the device.
Refer to the official Greengrass documentation to fix this.
已提问 2 年前2124 查看次数
2 回答
2

Please see: https://github.com/aws-samples/aws-greengrass-samples/issues/41#issuecomment-974845635

You must explicitly disable cgroup v2 as Greengrass lambda supports only cgroup v1. You may also choose to not use Lambda or to use lambda in process mode rather than container mode.

AWS
专家
已回答 2 年前
0

Hey there, I'm reinitiating this thread. I'm having issues deploying a Lambda function with Greengrass container in my Raspberry Pi 4.

The issue effectively points out that the cgroups subsystems are not mounting devices and memory.

I already modified the /boot/cmdline.txt file, by adding the following: cgroup_memory=1 cgroup_enable=devices systemd.unified_cgroup_hierarchy=0 as per instructed here in https://github.com/aws-samples/aws-greengrass-samples/issues/41 and also in https://docs.aws.amazon.com/greengrass/v1/developerguide/setup-filter.rpi.html

console=tty1 console=serial0,115200 root=PARTUUID=bab074d2-02 rootfstype=ext4 fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles cgroup_enable=memory cgroup_memory=1 cgroup_enable=devices
systemd.unified_cgroup_hierarchy=0

However, when I'm trying to deploy the component, it still fails with the same issue:

2023-10-28T06:24:57.665Z [INFO] (pool-2-thread-42) signal_processing_greengrass_lambda: Setting up overlay tmpfs mounts. {serviceInstance=0, serviceName=signal_processing_greengrass_lambda, currentS
tate=STARTING}
2023-10-28T06:24:57.665Z [WARN] (Copier) signal_processing_greengrass_lambda: stderr. 2023/10/28 08:24:57 unable to setup worker process factories: The following cgroup subsystems are not mounted: d
evices, memory. {scriptName=services.signal_processing_greengrass_lambda.lifecycle.startup.script, serviceInstance=0, serviceName=signal_processing_greengrass_lambda, currentState=STARTING}
2023-10-28T06:24:57.666Z [INFO] (pool-2-thread-42) signal_processing_greengrass_lambda: Finding mounted cgroups.. {serviceInstance=0, serviceName=signal_processing_greengrass_lambda, currentState=ST
ARTING}
2023-10-28T06:24:57.724Z [INFO] (Copier) signal_processing_greengrass_lambda: Startup script exited. {exitCode=1, serviceInstance=0, serviceName=signal_processing_greengrass_lambda, currentState=STA
RTING}

This is the output of my cgroups configuration in the kernel

#subsys_name  hierarchy  num_cgroups  enabled
cpuset        0          97           1
cpu           0          97           1
cpuacct       0          97           1
blkio         0          97           1
memory        0          97           1
devices       0          97           1
freezer       0          97           1
net_cls       0          97           1
perf_event    0          97           1
net_prio      0          97           1
pids          0          97           1

Hope you're able to help me since I've facing this issue for some days now 🙏

Ed
已回答 6 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则