k8s applying cgroup configuration for process caused: Cannot set property TasksAccounting, or unknow

29 篇文章 0 订阅

docker daemon.json 新增
“exec-opts”: [“native.cgroupdriver=systemd”],重启docker 私有仓库服务报RT错误

[root@k8s k8s]#cat daemon.json
{
        "exec-opts": ["native.cgroupdriver=systemd"],
        "insecure-registries": ["k8s.node.master.01:5000"]
}
[root@k8s k8s]# docker ps -a
CONTAINER ID   IMAGE             COMMAND                  CREATED          STATUS                     PORTS                                       NAMES
ede2561282af   registry:latest   "/entrypoint.sh /etc…"   31 minutes ago   Exited (2) 9 minutes ago   0.0.0.0:5000->5000/tcp, :::5000->5000/tcp   registry
[root@k8s k8s]# docker start ed
Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:385: applying cgroup configuration for process caused: Cannot set property TasksAccounting, or unknown property.: unknown
Error: failed to start containers: ed

[root@k8s k8s]# journalctl -fu docker
-- Logs begin at Tue 2021-12-14 19:07:19 CST. --
...
Dec 14 19:50:00 k8s.node.master.01 dockerd[17671]: time="2021-12-14T19:50:00.814179231+08:00" level=error msg="Handler for POST /v1.41/containers/ed/start returned error: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:385: applying cgroup configuration for process caused: Cannot set property TasksAccounting, or unknown property.: unknown"
^C
[root@k8s k8s]#


更新 systemd

###

[root@k8s module]# ll
total 18048004
-rw-r--r--. 1 root root  8280604672 Dec 14 16:01 CentOS-7-x86_64-Everything-1611.iso
-rw-r--r--. 1 root root 10200547328 Dec 14 19:51 CentOS-7-x86_64-Everything-2009.iso
drwxr-xr-x. 2 root root        4096 Dec 14 18:53 docker
drwxr-xr-x. 2 root root           6 Dec 14 18:54 images
drwxr-xr-x. 4 root root          56 Dec 14 19:37 k8s
drwxr-xr-x. 2 root root         177 Dec 14 16:21 rpm
[root@k8s module]# mount -o loop CentOS-7-x86_64-Everything-2009.iso /var/www/html/centos7/
mount: /dev/loop0 is write-protected, mounting read-only
[root@k8s module]# yum clean all
[root@k8s module]# yum makecache

### 更新前 ###

[root@k8s module]# yum info systemd
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Installed Packages
Name        : systemd
Arch        : x86_64
Version     : 219
Release     : 30.el7
Size        : 21 M
Repo        : installed
From repo   : anaconda
Summary     : A System and Service Manager
URL         : http://www.freedesktop.org/wiki/Software/systemd
License     : LGPLv2+ and MIT and GPLv2+
Description : systemd is a system and service manager for Linux, compatible with
            : SysV and LSB init scripts. systemd provides aggressive parallelization
            : capabilities, uses socket and D-Bus activation for starting services,
            : offers on-demand starting of daemons, keeps track of processes using
            : Linux cgroups, supports snapshotting and restoring of the system
            : state, maintains mount and automount points and implements an
            : elaborate transactional dependency-based service control logic. It can
            : work as a drop-in replacement for sysvinit.

Available Packages
Name        : systemd
Arch        : x86_64
Version     : 219
Release     : 78.el7
Size        : 5.1 M
Repo        : base
Summary     : A System and Service Manager
URL         : http://www.freedesktop.org/wiki/Software/systemd
License     : LGPLv2+ and MIT and GPLv2+
Description : systemd is a system and service manager for Linux, compatible with
            : SysV and LSB init scripts. systemd provides aggressive parallelization
            : capabilities, uses socket and D-Bus activation for starting services,
            : offers on-demand starting of daemons, keeps track of processes using
            : Linux cgroups, supports snapshotting and restoring of the system
            : state, maintains mount and automount points and implements an
            : elaborate transactional dependency-based service control logic. It can
            : work as a drop-in replacement for sysvinit.

[root@k8s module]#

### 更新后 ###
[root@k8s module]# yum update systemd
[root@k8s module]# yum info systemd
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Installed Packages
Name        : systemd
Arch        : x86_64
Version     : 219
Release     : 78.el7
Size        : 23 M
Repo        : installed
From repo   : base
Summary     : A System and Service Manager
URL         : http://www.freedesktop.org/wiki/Software/systemd
License     : LGPLv2+ and MIT and GPLv2+
Description : systemd is a system and service manager for Linux, compatible with
            : SysV and LSB init scripts. systemd provides aggressive parallelization
            : capabilities, uses socket and D-Bus activation for starting services,
            : offers on-demand starting of daemons, keeps track of processes using
            : Linux cgroups, supports snapshotting and restoring of the system
            : state, maintains mount and automount points and implements an
            : elaborate transactional dependency-based service control logic. It can
            : work as a drop-in replacement for sysvinit.


[root@k8s module]# docker start ed
ed
[root@k8s module]# docker ps -a
CONTAINER ID   IMAGE             COMMAND                  CREATED          STATUS         PORTS                                       NAMES
ede2561282af   registry:latest   "/entrypoint.sh /etc…"   36 minutes ago   Up 7 seconds   0.0.0.0:5000->5000/tcp, :::5000->5000/tcp   registry
[root@k8s module]#
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值