{"action":"closed","issue":{"url":"https://api.github.com/repos/docker/docker/issues/31826","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/31826/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/31826/comments","events_url":"https://api.github.com/repos/docker/docker/issues/31826/events","html_url":"https://github.com/docker/docker/issues/31826","id":214172685,"number":31826,"title":"Cannot run container with --device-read-bps on Mac","user":{"login":"johnflavin","id":1417503,"avatar_url":"https://avatars3.githubusercontent.com/u/1417503?v=3","gravatar_id":"","url":"https://api.github.com/users/johnflavin","html_url":"https://github.com/johnflavin","followers_url":"https://api.github.com/users/johnflavin/followers","following_url":"https://api.github.com/users/johnflavin/following{/other_user}","gists_url":"https://api.github.com/users/johnflavin/gists{/gist_id}","starred_url":"https://api.github.com/users/johnflavin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnflavin/subscriptions","organizations_url":"https://api.github.com/users/johnflavin/orgs","repos_url":"https://api.github.com/users/johnflavin/repos","events_url":"https://api.github.com/users/johnflavin/events{/privacy}","received_events_url":"https://api.github.com/users/johnflavin/received_events","type":"User","site_admin":false},"labels":[{"id":73641990,"url":"https://api.github.com/repos/docker/docker/labels/area/runtime","name":"area/runtime","color":"fbca04","default":false},{"id":381838255,"url":"https://api.github.com/repos/docker/docker/labels/platform/desktop","name":"platform/desktop","color":"F6FBFF","default":false},{"id":555642114,"url":"https://api.github.com/repos/docker/docker/labels/version/17.03","name":"version/17.03","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-03-14T18:55:15Z","updated_at":"2017-03-15T21:30:35Z","closed_at":"2017-03-15T21:30:35Z","body":"<!--\r\nIf you are reporting a new issue, make sure that we do not have any duplicates\r\nalready open. You can ensure this by searching the issue list for this\r\nrepository. If there is a duplicate, please close your issue and add a comment\r\nto the existing issue instead.\r\n\r\nIf you suspect your issue is a bug, please edit your issue description to\r\ninclude the BUG REPORT INFORMATION shown below. If you fail to provide this\r\ninformation within 7 days, we cannot debug your issue and will close it. We\r\nwill, however, reopen it if you later provide the information.\r\n\r\nFor more information about reporting issues, see\r\nhttps://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues\r\n\r\n---------------------------------------------------\r\nGENERAL SUPPORT INFORMATION\r\n---------------------------------------------------\r\n\r\nThe GitHub issue tracker is for bug reports and feature requests.\r\nGeneral support can be found at the following locations:\r\n\r\n- Docker Support Forums - https://forums.docker.com\r\n- IRC - irc.freenode.net #docker channel\r\n- Post a question on StackOverflow, using the Docker tag\r\n\r\n---------------------------------------------------\r\nBUG REPORT INFORMATION\r\n---------------------------------------------------\r\nUse the commands below to provide key information from your environment:\r\nYou do NOT have to include this information if this is a FEATURE REQUEST\r\n-->\r\n\r\n**Description**\r\n\r\n<!--\r\nBriefly describe the problem you are having in a few paragraphs.\r\n-->\r\nUsing Docker for Mac 17.03.0-ce-mac2 (15657), I cannot start a container with a `BlkioDeviceReadBps` limit. There are errors in the docker log when the container is created, but they do not cause the creation of the container to fail. However, starting the container does fail.\r\n\r\n**Steps to reproduce the issue:**\r\n1. Create a container with a `BlkioDeviceReadBps` limit like so:\r\n```\r\n$ containerId=$(docker create --device-read-bps /dev/random:1024 busybox:latest) && echo $containerId\r\n958e7fd82a66162e2de9c72d985a7a7cad2d85b7d7bb1c034e261aff6d35526c\r\n```\r\n2. Start the container\r\n```\r\n$ docker start $containerId\r\nError response from daemon: oci runtime error: container_linux.go:247: starting container process caused \"process_linux.go:291: setting cgroup config for ready process caused \\\"failed to write 1:8 1024 to blkio.throttle.read_bps_device: write /sys/fs/cgroup/blkio/docker/958e7fd82a66162e2de9c72d985a7a7cad2d85b7d7bb1c034e261aff6d35526c/blkio.throttle.read_bps_device: no such device\\\"\"\r\nError: failed to start containers: 958e7fd82a66162e2de9c72d985a7a7cad2d85b7d7bb1c034e261aff6d35526c\r\n```\r\n\r\n**Describe the results you received:**\r\nContainer does not start. An error is returned. (See above.)\r\n\r\n**Describe the results you expected:**\r\nThe container is started with no errors.\r\n\r\n**Additional information you deem important (e.g. issue happens only occasionally):**\r\nThere are additional errors logged when the container is created. Here is the contents of `/var/log/docker.log` on my Moby VM that gets produced when I create the container with the command above:\r\n```\r\nMar 14 18:42:24 moby root: time=\"2017-03-14T18:42:24.669063831Z\" level=debug msg=\"Calling GET /_ping\"\r\nMar 14 18:42:24 moby root: time=\"2017-03-14T18:42:24.675838413Z\" level=debug msg=\"Calling POST /v1.26/containers/create\"\r\nMar 14 18:42:24 moby root: time=\"2017-03-14T18:42:24.677120577Z\" level=debug msg=\"form data: {\\\"AttachStderr\\\":true,\\\"AttachStdin\\\":false,\\\"AttachStdout\\\":true,\\\"Cmd\\\":null,\\\"Domainname\\\":\\\"\\\",\\\"Entrypoint\\\":null,\\\"Env\\\":[\\\"no_proxy=*.local, 169.254/16\\\"],\\\"HostConfig\\\":{\\\"AutoRemove\\\":false,\\\"Binds\\\":null,\\\"BlkioDeviceReadBps\\\":[{\\\"Path\\\":\\\"/dev/random\\\",\\\"Rate\\\":1024}],\\\"BlkioDeviceReadIOps\\\":null,\\\"BlkioDeviceWriteBps\\\":null,\\\"BlkioDeviceWriteIOps\\\":null,\\\"BlkioWeight\\\":0,\\\"BlkioWeightDevice\\\":null,\\\"CapAdd\\\":null,\\\"CapDrop\\\":null,\\\"Cgroup\\\":\\\"\\\",\\\"CgroupParent\\\":\\\"\\\",\\\"ConsoleSize\\\":[0,0],\\\"ContainerIDFile\\\":\\\"\\\",\\\"CpuCount\\\":0,\\\"CpuPercent\\\":0,\\\"CpuPeriod\\\":0,\\\"CpuQuota\\\":0,\\\"CpuRealtimePeriod\\\":0,\\\"CpuRealtimeRuntime\\\":0,\\\"CpuShares\\\":0,\\\"CpusetCpus\\\":\\\"\\\",\\\"CpusetMems\\\":\\\"\\\",\\\"Devices\\\":[],\\\"DiskQuota\\\":0,\\\"Dns\\\":[],\\\"DnsOptions\\\":[],\\\"DnsSearch\\\":[],\\\"ExtraHosts\\\":null,\\\"GroupAdd\\\":null,\\\"IOMaximumBandwidth\\\":0,\\\"IOMaximumIOps\\\":0,\\\"IpcMode\\\":\\\"\\\",\\\"Isolation\\\":\\\"\\\",\\\"KernelMemory\\\":0,\\\"Links\\\":null\r\nMar 14 18:42:24 moby root: },\\\"Type\\\":\\\"\\\"},\\\"Memory\\\":0,\\\"MemoryReservation\\\":0,\\\"MemorySwap\\\":0,\\\"MemorySwappiness\\\":-1,\\\"NanoCpus\\\":0,\\\"NetworkMode\\\":\\\"default\\\",\\\"OomKillDisable\\\":false,\\\"OomScoreAdj\\\":0,\\\"PidMode\\\":\\\"\\\",\\\"PidsLimit\\\":0,\\\"PortBindings\\\":{},\\\"Privileged\\\":false,\\\"PublishAllPorts\\\":false,\\\"ReadonlyRootfs\\\":false,\\\"RestartPolicy\\\":{\\\"MaximumRetryCount\\\":0,\\\"Name\\\":\\\"no\\\"},\\\"SecurityOpt\\\":null,\\\"ShmSize\\\":0,\\\"UTSMode\\\":\\\"\\\",\\\"Ulimits\\\":null,\\\"UsernsMode\\\":\\\"\\\",\\\"VolumeDriver\\\":\\\"\\\",\\\"VolumesFrom\\\":null},\\\"Hostname\\\":\\\"\\\",\\\"Image\\\":\\\"busybox:latest\\\",\\\"Labels\\\":{},\\\"NetworkingConfig\\\":{\\\"EndpointsConfig\\\":{}},\\\"OnBuild\\\":null,\\\"OpenStdin\\\":false,\\\"StdinOnce\\\":false,\\\"Tty\\\":false,\\\"User\\\":\\\"\\\",\\\"Volumes\\\":{},\\\"WorkingDir\\\":\\\"\\\"}\"\r\nMar 14 18:42:24 moby root: time=\"2017-03-14T18:42:24.679251624Z\" level=warning msg=\"Couldn't run auplink before unmount /var/lib/docker/aufs/mnt/4bce79374f28ca2301f14e23163adbcbab8c732cd4347d35004ee0a53314a358-init: exec: \\\"auplink\\\": executable file not found in $PATH\"\r\nMar 14 18:42:24 moby root: time=\"2017-03-14T18:42:24.784090806Z\" level=debug msg=\"container mounted via layerStore: /var/lib/docker/aufs/mnt/4bce79374f28ca2301f14e23163adbcbab8c732cd4347d35004ee0a53314a358\"\r\nMar 14 18:42:24 moby root: time=\"2017-03-14T18:42:24.784353092Z\" level=warning msg=\"Couldn't run auplink before unmount /var/lib/docker/aufs/mnt/4bce79374f28ca2301f14e23163adbcbab8c732cd4347d35004ee0a53314a358: exec: \\\"auplink\\\": executable file not found in $PATH\"\r\n```\r\n\r\nWhen I try to start the container, the error (pasted above) says there is `\"no such device\"` at `/sys/fs/cgroup/blkio/docker/{containerId}/blkio.throttle.read_bps_device`. So, after creating the container, I can verify that by checking the contents of `/sys/fs/cgroup/blkio/docker/` on my VM:\r\n```\r\n# ls /sys/fs/cgroup/blkio/docker/\r\nblkio.io_merged                   blkio.sectors_recursive\r\nblkio.io_merged_recursive         blkio.throttle.io_service_bytes\r\nblkio.io_queued                   blkio.throttle.io_serviced\r\nblkio.io_queued_recursive         blkio.throttle.read_bps_device\r\nblkio.io_service_bytes            blkio.throttle.read_iops_device\r\nblkio.io_service_bytes_recursive  blkio.throttle.write_bps_device\r\nblkio.io_service_time             blkio.throttle.write_iops_device\r\nblkio.io_service_time_recursive   blkio.time\r\nblkio.io_serviced                 blkio.time_recursive\r\nblkio.io_serviced_recursive       blkio.weight\r\nblkio.io_wait_time                blkio.weight_device\r\nblkio.io_wait_time_recursive      cgroup.clone_children\r\nblkio.leaf_weight                 cgroup.procs\r\nblkio.leaf_weight_device          notify_on_release\r\nblkio.reset_stats                 tasks\r\nblkio.sectors\r\n```\r\n\r\nNo directory with the container ID.\r\n\r\nThen, for completeness, here is the contents of `docker.log` when I try to start the container. (Note that the container ID is different from before. I'm compiling these logs all out of order.):\r\n```\r\nMar 14 18:49:53 moby root: time=\"2017-03-14T18:49:53.085181420Z\" level=debug msg=\"Calling GET /_ping\"\r\nMar 14 18:49:53 moby root: time=\"2017-03-14T18:49:53.086391270Z\" level=debug msg=\"Calling GET /containers/d429999d48f00a56b0a34921b523a11bcacf47cfafe48a4a12df79465c7ca33b/json\"\r\nMar 14 18:49:53 moby root: time=\"2017-03-14T18:49:53.088101022Z\" level=debug msg=\"Calling POST /v1.26/containers/d429999d48f00a56b0a34921b523a11bcacf47cfafe48a4a12df79465c7ca33b/start\"\r\nMar 14 18:49:53 moby root: time=\"2017-03-14T18:49:53.089237160Z\" level=debug msg=\"container mounted via layerStore: /var/lib/docker/aufs/mnt/91570b41bfd1353069abe7f3ceb4b7b31bbc4150fd8053d5700d333606b29bf3\"\r\nMar 14 18:49:53 moby root: time=\"2017-03-14T18:49:53.089775016Z\" level=debug msg=\"Assigning addresses for endpoint silly_dijkstra's interface on network bridge\"\r\nMar 14 18:49:53 moby root: time=\"2017-03-14T18:49:53.089868104Z\" level=debug msg=\"RequestAddress(LocalDefault/172.17.0.0/16, <nil>, map[])\"\r\nMar 14 18:49:53 moby root: time=\"2017-03-14T18:49:53.103647494Z\" level=debug msg=\"Assigning addresses for endpoint silly_dijkstra's interface on network bridge\"\r\nMar 14 18:49:53 moby root: time=\"2017-03-14T18:49:53.156083666Z\" level=debug msg=\"Programming external connectivity on endpoint silly_dijkstra (4ed2221391c99051589f6fae9b436d3403070b789e6eacc5bece6434ff9adcc9)\"\r\nMar 14 18:49:53 moby root: time=\"2017-03-14T18:49:53.348807246Z\" level=debug msg=\"sandbox set key processing took 107.934375ms for container d429999d48f00a56b0a34921b523a11bcacf47cfafe48a4a12df79465c7ca33b\"\r\nMar 14 18:49:53 moby root: time=\"2017-03-14T18:49:53.559021869Z\" level=error msg=\"containerd: start container\" error=\"oci runtime error: container_linux.go:247: starting container process caused \\\"process_linux.go:291: setting cgroup config for ready process caused \\\\\\\"failed to write 1:8 1024 to blkio.throttle.read_bps_device: write /sys/fs/cgroup/blkio/docker/d429999d48f00a56b0a34921b523a11bcacf47cfafe48a4a12df79465c7ca33b/blkio.throttle.read_bps_device: no such device\\\\\\\"\\\"\\n\" id=d429999d48f00a56b0a34921b523a11bcacf47cfafe48a4a12df79465c7ca33b\r\nMar 14 18:49:53 moby root: time=\"2017-03-14T18:49:53.560903514Z\" level=error msg=\"Create container failed with error: oci runtime error: container_linux.go:247: starting container process caused \\\"process_linux.go:291: setting cgroup config for ready process caused \\\\\\\"failed to write 1:8 1024 to blkio.throttle.read_bps_device: write /sys/fs/cgroup/blkio/docker/d429999d48f00a56b0a34921b523a11bcacf47cfafe48a4a12df79465c7ca33b/blkio.throttle.read_bps_device: no such device\\\\\\\"\\\"\\n\"\r\nMar 14 18:49:53 moby root: time=\"2017-03-14T18:49:53.587358716Z\" level=debug msg=\"Revoking external connectivity on endpoint silly_dijkstra (4ed2221391c99051589f6fae9b436d3403070b789e6eacc5bece6434ff9adcc9)\"\r\nMar 14 18:49:53 moby root: time=\"2017-03-14T18:49:53.839423295Z\" level=debug msg=\"Releasing addresses for endpoint silly_dijkstra's interface on network bridge\"\r\nMar 14 18:49:53 moby root: time=\"2017-03-14T18:49:53.839482524Z\" level=debug msg=\"ReleaseAddress(LocalDefault/172.17.0.0/16, 172.17.0.2)\"\r\nMar 14 18:49:53 moby root: time=\"2017-03-14T18:49:53.966944500Z\" level=warning msg=\"Couldn't run auplink before unmount /var/lib/docker/aufs/mnt/91570b41bfd1353069abe7f3ceb4b7b31bbc4150fd8053d5700d333606b29bf3: exec: \\\"auplink\\\": executable file not found in $PATH\"\r\nMar 14 18:49:54 moby root: time=\"2017-03-14T18:49:54.051689659Z\" level=error msg=\"Handler for POST /v1.26/containers/d429999d48f00a56b0a34921b523a11bcacf47cfafe48a4a12df79465c7ca33b/start returned error: oci runtime error: container_linux.go:247: starting container process caused \\\"process_linux.go:291: setting cgroup config for ready process caused \\\\\\\"failed to write 1:8 1024 to blkio.throttle.read_bps_device: write /sys/fs/cgroup/blkio/docker/d429999d48f00a56b0a34921b523a11bcacf47cfafe48a4a12df79465c7ca33b/blkio.throttle.read_bps_device: no such device\\\\\\\"\\\"\\n\"\r\n```\r\n\r\n**Output of `docker version`:**\r\n\r\n```\r\nClient:\r\n Version:      17.03.0-ce\r\n API version:  1.26\r\n Go version:   go1.7.5\r\n Git commit:   60ccb22\r\n Built:        Thu Feb 23 10:40:59 2017\r\n OS/Arch:      darwin/amd64\r\n\r\nServer:\r\n Version:      17.03.0-ce\r\n API version:  1.26 (minimum version 1.12)\r\n Go version:   go1.7.5\r\n Git commit:   3a232c8\r\n Built:        Tue Feb 28 07:52:04 2017\r\n OS/Arch:      linux/amd64\r\n Experimental: true\r\n```\r\n\r\n**Output of `docker info`:**\r\n\r\n```\r\nContainers: 5\r\n Running: 0\r\n Paused: 0\r\n Stopped: 5\r\nImages: 23\r\nServer Version: 17.03.0-ce\r\nStorage Driver: aufs\r\n Root Dir: /var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 44\r\n Dirperm1 Supported: true\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins: \r\n Volume: local\r\n Network: bridge host ipvlan macvlan null overlay\r\nSwarm: active\r\n NodeID: 2n2g46cvu27nk0yuoowhe1t8b\r\n Is Manager: true\r\n ClusterID: 3j26e6low77hibavv55u87hvp\r\n Managers: 1\r\n Nodes: 1\r\n Orchestration:\r\n  Task History Retention Limit: 5\r\n Raft:\r\n  Snapshot Interval: 10000\r\n  Number of Old Snapshots to Retain: 0\r\n  Heartbeat Tick: 1\r\n  Election Tick: 3\r\n Dispatcher:\r\n  Heartbeat Period: 5 seconds\r\n CA Configuration:\r\n  Expiry Duration: 3 months\r\n Node Address: 192.168.65.2\r\n Manager Addresses:\r\n  192.168.65.2:2377\r\nRuntimes: runc\r\nDefault Runtime: runc\r\nInit Binary: docker-init\r\ncontainerd version: 977c511eda0925a723debdc94d09459af49d082a\r\nrunc version: a01dafd48bc1c7cc12bdb01206f9fea7dd6feb70\r\ninit version: 949e6fa\r\nSecurity Options:\r\n seccomp\r\n  Profile: default\r\nKernel Version: 4.9.12-moby\r\nOperating System: Alpine Linux v3.5\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 4\r\nTotal Memory: 1.952 GiB\r\nName: moby\r\nID: 3NXV:6OUU:O7VQ:BPBV:XDC2:ZPMT:IRSG:VJ3I:SL2H:ZWC2:ECT6:7X4R\r\nDocker Root Dir: /var/lib/docker\r\nDebug Mode (client): false\r\nDebug Mode (server): true\r\n File Descriptors: 33\r\n Goroutines: 131\r\n System Time: 2017-03-14T18:51:37.13220192Z\r\n EventsListeners: 1\r\nNo Proxy: *.local, 169.254/16\r\nUsername: xnat\r\nRegistry: https://index.docker.io/v1/\r\nExperimental: true\r\nInsecure Registries:\r\n 127.0.0.0/8\r\nLive Restore Enabled: false\r\n```\r\n"}}
{"actor":{"display_login":"justincormack"}}