“ cAdvisor”不允许删除其他容器

时间:2018-07-16 09:57:47

标签: docker cadvisor

我已经安装了“ cAdvisor”来监视主机上的容器,现在每当我尝试停止并卸下任何其他容器时,cAdvisor都不允许移除其他容器。

`# docker ps -a | grep -i api
790ddf58f54a        container/container-abc         "/bin/sh -c 'sh -c..."   42 hours ago        Dead`
`# docker rm 790ddf58f54a
Error response from daemon: Unable to remove filesystem for 
790ddf58f54acf041b3e33bc040ea035d43be92315c7d970f411ad56a855e627: remove /var/lib/docker/containers/790ddf58f54acf041b3e33bc040ea035d43be92315c7d970f411ad56a855e627/shm: device or resource busy`
`# docker rm 790ddf58f54a
Error response from daemon: Unable to remove filesystem for 
790ddf58f54acf041b3e33bc040ea035d43be92315c7d970f411ad56a855e627: remove` `/var/lib/docker/containers/790ddf58f54acf041b3e33bc040ea035d43be92315c7d970f411ad56a855e627/shm: device or resource busy`

当我停止cAdvisor时,它允许我移除容器。

`# docker ps | grep -i cadvisor
b54e4acb3f36        google/cadvisor                 "/usr/bin/cadvisor..."   21 hours ago        Up 21 hours         0.0.0.0:9911->8080/tcp                                                                                           cadvisor`
`# docker stop b54e4acb3f36
b54e4acb3f36`
`# docker rm 790ddf58f54a
790ddf58f54a

我提到了这个github问题,但没有帮助https://github.com/moby/moby/issues/34198。还对此进行了进一步搜索,是否有针对此问题的永久修复程序。

1)使用以下命令生成container / container-abc。

# docker run -d --restart=on-failure:5 --name=container-abc -p 15200:15200 -p 15201:15201 container-abc-image

2)我正在使用docker-compose作为cadvisor,下面是docker的撰写内容。

services:
cadvisor:
    image: google/cadvisor
    container_name: cadvisor
    volumes:
       - /:/rootfs:ro
       - /var/run:/var/run:rw
       - /sys:/sys:ro
       - /var/lib/docker/:/var/lib/docker:ro
    ports:
       - 9911:8080
    privileged: true
    restart: always

3)下面是docker info命令。

# docker info
Containers: 38
 Running: 24
 Paused: 0
 Stopped: 14
Images: 310
Server Version: 1.13.1
Storage Driver: overlay
 Backing Filesystem: extfs
 Supports d_type: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1
runc version: 9df8b306d01f59d3a8029be411de015b7304dd8f
init version: 949e6fa
Security Options:
 apparmor
Kernel Version: 3.12.74-60.64.85-default
Operating System: SUSE Linux Enterprise Server 12 SP1
OSType: linux
Architecture: x86_64
CPUs: 32
Total Memory: 31.27 GiB
ID: BTZ2:KQZM:VGL5:DN7P:LKEB:JMDY:57N6:JUC2:LIBA:UZWA:EU3T:CHWP
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 171
 Goroutines: 132
 System Time: 2018-07-16T03:58:55.156080332-07:00
 EventsListeners: 0
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
WARNING: No kernel memory limit support
Experimental: false
Insecure Registries:
 172.24.227.60:8090
 127.0.0.0/8
Live Restore Enabled: false

谢谢。

0 个答案:

没有答案