{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/14109","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/14109/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/14109/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/14109/events","html_url":"https://github.com/kubernetes/kubernetes/pull/14109","id":106987967,"number":14109,"title":"Fix to detect unformatted volumes in CoreOS","user":{"login":"BugRoger","id":147369,"avatar_url":"https://avatars.githubusercontent.com/u/147369?v=3","gravatar_id":"","url":"https://api.github.com/users/BugRoger","html_url":"https://github.com/BugRoger","followers_url":"https://api.github.com/users/BugRoger/followers","following_url":"https://api.github.com/users/BugRoger/following{/other_user}","gists_url":"https://api.github.com/users/BugRoger/gists{/gist_id}","starred_url":"https://api.github.com/users/BugRoger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BugRoger/subscriptions","organizations_url":"https://api.github.com/users/BugRoger/orgs","repos_url":"https://api.github.com/users/BugRoger/repos","events_url":"https://api.github.com/users/BugRoger/events{/privacy}","received_events_url":"https://api.github.com/users/BugRoger/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cla:%20yes","name":"cla: yes","color":"bfe5bf"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/lgtm","name":"lgtm","color":"15dd18"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/ok-to-merge","name":"ok-to-merge","color":"fbca04"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/S","name":"size/S","color":"77bb00"}],"state":"closed","locked":false,"assignee":{"login":"saad-ali","id":10052848,"avatar_url":"https://avatars.githubusercontent.com/u/10052848?v=3","gravatar_id":"","url":"https://api.github.com/users/saad-ali","html_url":"https://github.com/saad-ali","followers_url":"https://api.github.com/users/saad-ali/followers","following_url":"https://api.github.com/users/saad-ali/following{/other_user}","gists_url":"https://api.github.com/users/saad-ali/gists{/gist_id}","starred_url":"https://api.github.com/users/saad-ali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saad-ali/subscriptions","organizations_url":"https://api.github.com/users/saad-ali/orgs","repos_url":"https://api.github.com/users/saad-ali/repos","events_url":"https://api.github.com/users/saad-ali/events{/privacy}","received_events_url":"https://api.github.com/users/saad-ali/received_events","type":"User","site_admin":false},"milestone":null,"comments":12,"created_at":"2015-09-17T13:42:19Z","updated_at":"2015-09-18T06:39:50Z","closed_at":"2015-09-18T06:39:50Z","pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14109","html_url":"https://github.com/kubernetes/kubernetes/pull/14109","diff_url":"https://github.com/kubernetes/kubernetes/pull/14109.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/14109.patch"},"body":"The `file` command used here to check whether a device is formatted is not available in CoreOS. The effect is that the mounter skips the formatting step and tries to mount an unformatted volume which fails. This makes it quite tedious to use persistent volumes in CoreOS.\r\n\r\nThis patch replaces the `file` command with `lsblk` which is available in CoreOS. I checked that it's also available on Fedora, CentOS, RHEL, Debian, Ubuntu and SLES. \r\n\r\nAdditionally, I checked the most recent version of the above OS that `lsblk` actually behaves the same. The output is literally consistent for the following tests:\r\n\r\n  1. Check for unknown device\r\n  2. Check new unformatted device\r\n  3. Format device\r\n  4. Check formatted device\r\n\r\nHere is the console log of my tests:\r\n\r\nCoreOS 766.3.0 Stable\r\n```\r\n$ source /etc/os-release; echo $PRETTY_NAME\r\nCoreOS 766.3.0+2015-09-16-1354\r\n$ lsblk -nd -o FSTYPE /dev/foo\r\nlsblk: /dev/foo: not a block device\r\n$ lsblk -nd -o FSTYPE /dev/sdf\r\n\r\n$ mkfs.ext4 /dev/sdf\r\n$ lsblk -nd -o FSTYPE /dev/sdf\r\next4\r\n```\r\n\r\nRedHat Enterprise Linux 7\r\n```\r\n$ source /etc/os-release; echo $PRETTY_NAME\r\nRed Hat Enterprise Linux Server 7.1 (Maipo)\r\n$ lsblk -nd -o FSTYPE /dev/foo\r\nlsblk: /dev/foo: not a block device\r\n$ lsblk -nd -o FSTYPE /dev/sdf\r\n\r\n$ mkfs.ext4 /dev/sdf\r\n$ lsblk -nd -o FSTYPE /dev/sdf\r\next4\r\n```\r\n\r\nUbuntu 14.04\r\n```\r\n$ source /etc/os-release; echo $PRETTY_NAME\r\nUbuntu 14.04.2 LTS\r\n$ lsblk -nd -o FSTYPE /dev/foo\r\nlsblk: /dev/foo: not a block device\r\n$ lsblk -nd -o FSTYPE /dev/sdf\r\n\r\n$ mkfs.ext4 /dev/sdf\r\n$ lsblk -nd -o FSTYPE /dev/sdf\r\next4\r\n```\r\n\r\nUbuntu 12.04\r\n```\r\n$ source /etc/os-release; echo $PRETTY_NAME\r\nUbuntu precise (12.04.5 LTS)\r\n$ lsblk -nd -o FSTYPE /dev/foo\r\nlsblk: /dev/foo: not a block device\r\n$ lsblk -nd -o FSTYPE /dev/sdf\r\n\r\n$ mkfs.ext4 /dev/sdf\r\n$ lsblk -nd -o FSTYPE /dev/sdf\r\next4\r\n```\r\n\r\nDebian 7\r\n```\r\n$ source /etc/os-release; echo $PRETTY_NAME\r\nDebian GNU/Linux 7 (wheezy)\r\n$ lsblk -nd -o FSTYPE /dev/foo\r\nlsblk: /dev/foo: not a block device\r\n$ lsblk -nd -o FSTYPE /dev/sdf\r\n\r\n$ mkfs.ext4 /dev/sdf\r\n$ lsblk -nd -o FSTYPE /dev/sdf\r\next4\r\n```"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/141358644","html_url":"https://github.com/kubernetes/kubernetes/pull/14109#issuecomment-141358644","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/14109","id":141358644,"user":{"login":"k8s-merge-robot","id":13653959,"avatar_url":"https://avatars.githubusercontent.com/u/13653959?v=3","gravatar_id":"","url":"https://api.github.com/users/k8s-merge-robot","html_url":"https://github.com/k8s-merge-robot","followers_url":"https://api.github.com/users/k8s-merge-robot/followers","following_url":"https://api.github.com/users/k8s-merge-robot/following{/other_user}","gists_url":"https://api.github.com/users/k8s-merge-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/k8s-merge-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k8s-merge-robot/subscriptions","organizations_url":"https://api.github.com/users/k8s-merge-robot/orgs","repos_url":"https://api.github.com/users/k8s-merge-robot/repos","events_url":"https://api.github.com/users/k8s-merge-robot/events{/privacy}","received_events_url":"https://api.github.com/users/k8s-merge-robot/received_events","type":"User","site_admin":false},"created_at":"2015-09-18T06:39:50Z","updated_at":"2015-09-18T06:39:50Z","body":"Automatic merge from submit-queue"}}