kubevirt: Devicemapper: Can't set cookie dm_task_set_cookie failed

Hello,

I have this error with docker version 17.06.0-ce : docker -v Docker version 17.06.0-ce, build 02c1d87

devmapper: Error activating devmapper device for '6bf91878789809febd403ed5e87f715f4c9a2d3b7f257e90fbe3d34dd0f8e816-init': devicemapper: Can't set cookie dm_task_set_cookie failed

When i try to restart docker, with service docker restart

i have this error :

use \"--data-root\" instead"
Jul 17 14:11:50 dockerd[46867]: time="2017-07-17T14:11:50.919640600+02:00" level=info msg="libcontainerd: new containerd process, pi
d: 46875"
Jul 17 14:11:51 dockerd[46867]: time="2017-07-17T14:11:51.922847500+02:00" level=warning msg="failed to rename /mnt/block_drive/dock
er/tmp for background deletion: rename /mnt/block_drive/docker/tmp /mnt/block_drive/docker/tmp-old: file exists. Deleting synchronously"
Jul 17 14:11:52 dockerd[46867]: time="2017-07-17T14:11:52.123141700+02:00" level=warning msg="devmapper: Usage of loopback devices i
s strongly discouraged for production use. Please use `--storage-opt dm.thinpooldev` or use `man docker` to refer to dm.thinpooldev section."
Jul 17 14:11:52 dockerd[46867]: Error starting daemon: error initializing graphdriver: devmapper: Base Device UUID and Filesystem ve
rification failed: devicemapper: Can't set cookie dm_task_set_cookie failed
Jul 17 14:11:52 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Jul 17 14:11:52 systemd[1]: Failed to start Docker Application Container Engine.

For solving i restart the VM and restart docker

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 25 (3 by maintainers)

Commits related to this issue

Most upvoted comments

Hi @sylvainmouquet,

Thanks for reporting this! Are you using our Vagrant setup, or do you run your own infrastructure? We have seen this in our CentOS based Vagrant setup (https://github.com/kubevirt/kubevirt/issues/241), but it should be fixed in CentOS already.

Running

echo 'y' | sudo dmsetup udevcomplete_all

on affected nodes should be sufficient, instead of restarting docker.

Hello, I have the same type of error:

08:04:46 docker: Error response from daemon: devmapper: Error activating devmapper device for ‘4380222828fc9f0e3e8dfd832611a519e62c78df67f2ff47c9cd26e6127d63f9-init’: devicemapper: Can’t set cookie dm_task_set_cookie failed.

On Ubuntu 14.04 AWS

I have the problem this morning on the same machine. I have tried your solution :

echo 'y' | sudo dmsetup udevcomplete_all
This operation will destroy all semaphores with keys that have a prefix 3405 (0xd4d).
Do you really want to continue? [y/n]: 128 semaphores with keys prefixed by 3405 (0xd4d) destroyed. 0 skipped.

I have restart the docker build and it works

Suggested permanent fix?

I fixed this issue by simply upgrading my Linux kernel from 3.10.0 to 4.4.83 (Current LT).

Background info:

  • I faced this very issue when I upgraded from Docker version 1.13.1-cs4, build e46aec0 to Docker version 17.06.1-ce, build 874a737
  • Unmounting all docker volumes and then restarting the daemon provided a short lived fix
  • It worked for one run of docker-compose and then broke on the second
  • Running the following command provided a temporary fix as well, I needed to run it before each docker_compose build.
$ echo 'y' | sudo dmsetup udevcomplete_all
  • I initially upgraded the kernel from 3.10.0 to 3.10.107. This did not fix the issue.