Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
description of repo status
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
15
Star
11
Fork
109
src-openEuler
/
systemd
Closed
Code
Issues
9
Pull Requests
2
Wiki
Insights
Pipelines
Service
JavaDoc
PHPDoc
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
DevLens
Don’t show this again
Update failed. Please try again later!
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
cgroup v2模式下,systemd的cpuset配置无法持久化生效
Canceled
#ICKON5
Bug
wanglong1
Opened this issue
2025-07-08 10:54
**【缺陷描述】:请补充详细的缺陷问题现象描述** cgroup v2模式下,systemd的cpuset配置无法持久化生效 **一、缺陷信息** **【缺陷所属的os版本】 openEuler-22.03-LTS-SP1 **【内核版本】 4.19 **【缺陷所属软件及版本号】 [root@localhost ~]# systemctl --version systemd 249 :v249-97 +PAM +AUDIT +SELINUX -APPARMOR +IMA -SMACK +SECCOMP +GCRYPT +GNUTLS -OPENSSL +ACL +BLKID -CURL -ELFUTILS -FIDO2 +IDN2 -IDN -IPTC +KMOD -LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB -ZSTD +XKBCOMMON +UTMP +SYSVINIT default-hierarchy=legacy **【环境信息】** 硬件信息 VMware x86-64 虚拟机,4核,4g内存 - 虚拟机场景:宿主机:win 11 软件信息 systemd 249 :v249-97 网络信息 无 **【问题复现步骤】:请描述具体的操作步骤** 0、设置相关服务开机自启 systemctl enable containerd 1、配置持久启用 +cpuset 的自定义 systemd unit(例如 containerd) 通过创建一个 drop-in 文件: mkdir -p /etc/systemd/system/containerd.service.d cat <<EOF > /etc/systemd/system/containerd.service.d/10-cpuset.conf [Service] Delegate=cpu cpuset io memory pids EOF 其中,Delegate=xxx可自定义 2、应用上述更改后需要执行以下命令后生效: systemctl daemon-reload systemctl restart containerd 3、 echo +cpuset > /sys/fs/cgroup/cgroup.subtree_control echo +cpuset > /sys/fs/cgroup/system.slice/cgroup.subtree_control cat /sys/fs/cgroup/cgroup.subtree_control cat /sys/fs/cgroup/system.slice/cgroup.subtree_control 4、重启系统,执行如下命令 cat /sys/fs/cgroup/cgroup.subtree_control cat /sys/fs/cgroup/system.slice/cgroup.subtree_control **【实际结果】**,如下所示: [root@localhost ~]# cat /sys/fs/cgroup/cgroup.subtree_control cat /sys/fs/cgroup/system.slice/cgroup.subtree_control cpu io memory pids cpu io memory pids **【期望结果】**,如下所示: [root@localhost ~]# cat /sys/fs/cgroup/cgroup.subtree_control cat /sys/fs/cgroup/system.slice/cgroup.subtree_control cpuset cpu io memory pids cpuset cpu io memory pids **【其他相关附件信息】** [root@localhost ~]# systemctl status containerd ● containerd.service - containerd container runtime Loaded: loaded (/usr/lib/systemd/system/containerd.service; enabled; vendor preset: disabled) Drop-In: /etc/systemd/system/containerd.service.d └─10-cpuset.conf Active: active (running) since Sat 2025-07-05 04:24:58 CST; 45min ago Docs: https://containerd.io Process: 1037 ExecStartPre=/sbin/modprobe overlay (code=exited, status=0/SUCCESS) Main PID: 1053 (containerd) Tasks: 20 Memory: 74.8M CPU: 4.671s CGroup: /system.slice/containerd.service └─ 1053 /usr/bin/containerd Jul 05 04:24:58 localhost containerd[1053]: time="2025-07-05T04:24:58.733563041+08:00" level=info msg="Start subscribing cont> Jul 05 04:24:58 localhost containerd[1053]: time="2025-07-05T04:24:58.734448649+08:00" level=info msg="Start recovering state" Jul 05 04:24:58 localhost containerd[1053]: time="2025-07-05T04:24:58.734732066+08:00" level=info msg="Start event monitor" Jul 05 04:24:58 localhost containerd[1053]: time="2025-07-05T04:24:58.735119416+08:00" level=info msg="Start snapshots syncer" Jul 05 04:24:58 localhost containerd[1053]: time="2025-07-05T04:24:58.735148420+08:00" level=info msg="Start cni network conf> Jul 05 04:24:58 localhost containerd[1053]: time="2025-07-05T04:24:58.735188198+08:00" level=info msg="Start streaming server" Jul 05 04:24:58 localhost containerd[1053]: time="2025-07-05T04:24:58.735465174+08:00" level=info msg=serving... address=/run> Jul 05 04:24:58 localhost containerd[1053]: time="2025-07-05T04:24:58.735547451+08:00" level=info msg=serving... address=/run> Jul 05 04:24:58 localhost containerd[1053]: time="2025-07-05T04:24:58.736152497+08:00" level=info msg="containerd successfull> Jul 05 04:24:58 localhost systemd[1]: Started containerd container runtime **【缺陷详情及分析指导参考链接】** **二、缺陷分析结构反馈** 影响性分析说明: 缺陷严重等级:(Critical/High/Moderate/Low) 缺陷根因说明: 受影响版本排查(受影响/不受影响): openEuler-20.03-LTS-SP4 openEuler-22.03-LTS-SP3 openEuler-22.03-LTS-SP4 openEuler-24.03-LTS openEuler-24.03-LTS-SP1 修复是否涉及abi变化(是/否): openEuler-20.03-LTS-SP4 openEuler-22.03-LTS-SP3 openEuler-22.03-LTS-SP4 openEuler-24.03-LTS openEuler-24.03-LTS-SP1
**【缺陷描述】:请补充详细的缺陷问题现象描述** cgroup v2模式下,systemd的cpuset配置无法持久化生效 **一、缺陷信息** **【缺陷所属的os版本】 openEuler-22.03-LTS-SP1 **【内核版本】 4.19 **【缺陷所属软件及版本号】 [root@localhost ~]# systemctl --version systemd 249 :v249-97 +PAM +AUDIT +SELINUX -APPARMOR +IMA -SMACK +SECCOMP +GCRYPT +GNUTLS -OPENSSL +ACL +BLKID -CURL -ELFUTILS -FIDO2 +IDN2 -IDN -IPTC +KMOD -LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY +P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB -ZSTD +XKBCOMMON +UTMP +SYSVINIT default-hierarchy=legacy **【环境信息】** 硬件信息 VMware x86-64 虚拟机,4核,4g内存 - 虚拟机场景:宿主机:win 11 软件信息 systemd 249 :v249-97 网络信息 无 **【问题复现步骤】:请描述具体的操作步骤** 0、设置相关服务开机自启 systemctl enable containerd 1、配置持久启用 +cpuset 的自定义 systemd unit(例如 containerd) 通过创建一个 drop-in 文件: mkdir -p /etc/systemd/system/containerd.service.d cat <<EOF > /etc/systemd/system/containerd.service.d/10-cpuset.conf [Service] Delegate=cpu cpuset io memory pids EOF 其中,Delegate=xxx可自定义 2、应用上述更改后需要执行以下命令后生效: systemctl daemon-reload systemctl restart containerd 3、 echo +cpuset > /sys/fs/cgroup/cgroup.subtree_control echo +cpuset > /sys/fs/cgroup/system.slice/cgroup.subtree_control cat /sys/fs/cgroup/cgroup.subtree_control cat /sys/fs/cgroup/system.slice/cgroup.subtree_control 4、重启系统,执行如下命令 cat /sys/fs/cgroup/cgroup.subtree_control cat /sys/fs/cgroup/system.slice/cgroup.subtree_control **【实际结果】**,如下所示: [root@localhost ~]# cat /sys/fs/cgroup/cgroup.subtree_control cat /sys/fs/cgroup/system.slice/cgroup.subtree_control cpu io memory pids cpu io memory pids **【期望结果】**,如下所示: [root@localhost ~]# cat /sys/fs/cgroup/cgroup.subtree_control cat /sys/fs/cgroup/system.slice/cgroup.subtree_control cpuset cpu io memory pids cpuset cpu io memory pids **【其他相关附件信息】** [root@localhost ~]# systemctl status containerd ● containerd.service - containerd container runtime Loaded: loaded (/usr/lib/systemd/system/containerd.service; enabled; vendor preset: disabled) Drop-In: /etc/systemd/system/containerd.service.d └─10-cpuset.conf Active: active (running) since Sat 2025-07-05 04:24:58 CST; 45min ago Docs: https://containerd.io Process: 1037 ExecStartPre=/sbin/modprobe overlay (code=exited, status=0/SUCCESS) Main PID: 1053 (containerd) Tasks: 20 Memory: 74.8M CPU: 4.671s CGroup: /system.slice/containerd.service └─ 1053 /usr/bin/containerd Jul 05 04:24:58 localhost containerd[1053]: time="2025-07-05T04:24:58.733563041+08:00" level=info msg="Start subscribing cont> Jul 05 04:24:58 localhost containerd[1053]: time="2025-07-05T04:24:58.734448649+08:00" level=info msg="Start recovering state" Jul 05 04:24:58 localhost containerd[1053]: time="2025-07-05T04:24:58.734732066+08:00" level=info msg="Start event monitor" Jul 05 04:24:58 localhost containerd[1053]: time="2025-07-05T04:24:58.735119416+08:00" level=info msg="Start snapshots syncer" Jul 05 04:24:58 localhost containerd[1053]: time="2025-07-05T04:24:58.735148420+08:00" level=info msg="Start cni network conf> Jul 05 04:24:58 localhost containerd[1053]: time="2025-07-05T04:24:58.735188198+08:00" level=info msg="Start streaming server" Jul 05 04:24:58 localhost containerd[1053]: time="2025-07-05T04:24:58.735465174+08:00" level=info msg=serving... address=/run> Jul 05 04:24:58 localhost containerd[1053]: time="2025-07-05T04:24:58.735547451+08:00" level=info msg=serving... address=/run> Jul 05 04:24:58 localhost containerd[1053]: time="2025-07-05T04:24:58.736152497+08:00" level=info msg="containerd successfull> Jul 05 04:24:58 localhost systemd[1]: Started containerd container runtime **【缺陷详情及分析指导参考链接】** **二、缺陷分析结构反馈** 影响性分析说明: 缺陷严重等级:(Critical/High/Moderate/Low) 缺陷根因说明: 受影响版本排查(受影响/不受影响): openEuler-20.03-LTS-SP4 openEuler-22.03-LTS-SP3 openEuler-22.03-LTS-SP4 openEuler-24.03-LTS openEuler-24.03-LTS-SP1 修复是否涉及abi变化(是/否): openEuler-20.03-LTS-SP4 openEuler-22.03-LTS-SP3 openEuler-22.03-LTS-SP4 openEuler-24.03-LTS openEuler-24.03-LTS-SP1
Comments (
8
)
Sign in
to comment
Status
Canceled
Backlog
已挂起
Fixing
Confirmed
Done
Accepted
Canceled
Assignees
Not set
chenjiayi
jiayi0118
Assignee
Collaborator
+Assign
+Mention
Labels
sig/Base-service
Not set
Projects
Unprojected
Unprojected
Milestones
No related milestones
No related milestones
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
Branches (
-
)
Tags (
-
)
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
Duration
(hours)
参与者(4)
1
https://gitee.com/src-openeuler/systemd.git
git@gitee.com:src-openeuler/systemd.git
src-openeuler
systemd
systemd
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register