{"action":"created","comment":{"url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/pulls/comments/50808567","id":50808567,"diff_hunk":"@@ -43,6 +43,123 @@\n \n # pylint: disable=interruptible-system-call\n \n+class LVMStorage(object):\n+    def __init__(self, addon):\n+        self.addon = addon\n+\n+    @property\n+    def dm_fs(self):\n+        \"\"\" Return the docker dm.fs value \"\"\"\n+        if not self.addon:\n+            return \"\"\n+        return \"dm.fs=%s\" % self.addon.fstype\n+\n+    @property\n+    def pool_name(self):\n+        \"\"\" Return the docker dm.thinpool value \"\"\"\n+        if not self.addon:\n+            return \"\"\n+        return \"dm.thinpooldev=/dev/mapper/%s-docker--pool\" % self.addon.vgname\n+\n+    @property\n+    def addon_str(self):\n+        \"\"\" Return the addon string and storage driver options \"\"\"\n+        return '%%addon %s --vgname=\"%s\" --fstype=\"%s\"' % (self.addon.name, self.addon.vgname, self.addon.fstype)\n+\n+    def check_setup(self, storage, ksdata, instClass):\n+        \"\"\" Check storage to make sure the selected VG has a thinpool and it is named docker-pool\n+\n+        :param storage: Blivet storage object\n+        :param ksdata: Kickstart data object\n+        :param instClass: Anaconda installclass object\n+\n+        If there is an error, raise the appropriate Kickstart error.\n+        \"\"\"\n+        if self.addon.vgname not in (vg.name for vg in storage.vgs):\n+            raise KickstartValueError(formatErrorMsg(0, msg=_(\"%%addon com_redhat_docker is missing VG named %s\")) % self.addon.vgname)\n+\n+        # Make sure the VG has a docker-pool LV\n+        if self.addon.vgname+\"-docker-pool\" not in (lv.name for lv in storage.lvs):\n+            raise KickstartValueError(formatErrorMsg(0, msg=_(\"%%addon com_redhat_docker is missing a LV named docker-pool\")))","path":"com_redhat_docker/ks/docker.py","position":41,"original_position":41,"commit_id":"3ae28743c5d84e32f500f53681f05d3ddbcb82f0","original_commit_id":"3ae28743c5d84e32f500f53681f05d3ddbcb82f0","user":{"login":"vpodzime","id":1044278,"avatar_url":"https://avatars.githubusercontent.com/u/1044278?v=3","gravatar_id":"","url":"https://api.github.com/users/vpodzime","html_url":"https://github.com/vpodzime","followers_url":"https://api.github.com/users/vpodzime/followers","following_url":"https://api.github.com/users/vpodzime/following{/other_user}","gists_url":"https://api.github.com/users/vpodzime/gists{/gist_id}","starred_url":"https://api.github.com/users/vpodzime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpodzime/subscriptions","organizations_url":"https://api.github.com/users/vpodzime/orgs","repos_url":"https://api.github.com/users/vpodzime/repos","events_url":"https://api.github.com/users/vpodzime/events{/privacy}","received_events_url":"https://api.github.com/users/vpodzime/received_events","type":"User","site_admin":false},"body":"Quoting @clumens on then anaconda-patches list:\r\n> An upcoming pykickstart will no longer raise KickstartValueError...","created_at":"2016-01-26T09:00:57Z","updated_at":"2016-01-26T09:00:57Z","html_url":"https://github.com/rhinstaller/docker-anaconda-addon/pull/2#discussion_r50808567","pull_request_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/pulls/comments/50808567"},"html":{"href":"https://github.com/rhinstaller/docker-anaconda-addon/pull/2#discussion_r50808567"},"pull_request":{"href":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/pulls/2","id":57160956,"html_url":"https://github.com/rhinstaller/docker-anaconda-addon/pull/2","diff_url":"https://github.com/rhinstaller/docker-anaconda-addon/pull/2.diff","patch_url":"https://github.com/rhinstaller/docker-anaconda-addon/pull/2.patch","issue_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/issues/2","number":2,"state":"open","locked":false,"title":"Add support for overlayfs and cleanup code for future storage drivers","user":{"login":"bcl","id":212092,"avatar_url":"https://avatars.githubusercontent.com/u/212092?v=3","gravatar_id":"","url":"https://api.github.com/users/bcl","html_url":"https://github.com/bcl","followers_url":"https://api.github.com/users/bcl/followers","following_url":"https://api.github.com/users/bcl/following{/other_user}","gists_url":"https://api.github.com/users/bcl/gists{/gist_id}","starred_url":"https://api.github.com/users/bcl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcl/subscriptions","organizations_url":"https://api.github.com/users/bcl/orgs","repos_url":"https://api.github.com/users/bcl/repos","events_url":"https://api.github.com/users/bcl/events{/privacy}","received_events_url":"https://api.github.com/users/bcl/received_events","type":"User","site_admin":false},"body":"This cleans up the code a bit so that storage driver specific details\r\nand actions are self-contained in their own classes.\r\n\r\nIt adds support for --overlay to use the overlayfs driver. A quirk of\r\nthis is that selinux isn't supported inside the container when using\r\noverlayfs. The OPTION flag will be edited to remove --selinux-enabled if\r\nit is present.","created_at":"2016-01-26T02:08:30Z","updated_at":"2016-01-26T09:00:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7a12210abbed51f5ff540eebefafb71c8af62bbc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/pulls/2/commits","review_comments_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/pulls/2/comments","review_comment_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/issues/2/comments","statuses_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/statuses/3ae28743c5d84e32f500f53681f05d3ddbcb82f0","head":{"label":"bcl:master-overlayfs","ref":"master-overlayfs","sha":"3ae28743c5d84e32f500f53681f05d3ddbcb82f0","user":{"login":"bcl","id":212092,"avatar_url":"https://avatars.githubusercontent.com/u/212092?v=3","gravatar_id":"","url":"https://api.github.com/users/bcl","html_url":"https://github.com/bcl","followers_url":"https://api.github.com/users/bcl/followers","following_url":"https://api.github.com/users/bcl/following{/other_user}","gists_url":"https://api.github.com/users/bcl/gists{/gist_id}","starred_url":"https://api.github.com/users/bcl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcl/subscriptions","organizations_url":"https://api.github.com/users/bcl/orgs","repos_url":"https://api.github.com/users/bcl/repos","events_url":"https://api.github.com/users/bcl/events{/privacy}","received_events_url":"https://api.github.com/users/bcl/received_events","type":"User","site_admin":false},"repo":{"id":50056867,"name":"docker-anaconda-addon","full_name":"bcl/docker-anaconda-addon","owner":{"login":"bcl","id":212092,"avatar_url":"https://avatars.githubusercontent.com/u/212092?v=3","gravatar_id":"","url":"https://api.github.com/users/bcl","html_url":"https://github.com/bcl","followers_url":"https://api.github.com/users/bcl/followers","following_url":"https://api.github.com/users/bcl/following{/other_user}","gists_url":"https://api.github.com/users/bcl/gists{/gist_id}","starred_url":"https://api.github.com/users/bcl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcl/subscriptions","organizations_url":"https://api.github.com/users/bcl/orgs","repos_url":"https://api.github.com/users/bcl/repos","events_url":"https://api.github.com/users/bcl/events{/privacy}","received_events_url":"https://api.github.com/users/bcl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bcl/docker-anaconda-addon","description":"Add a kickstart addon section to Anaconda to run Docker during the installation process.","fork":true,"url":"https://api.github.com/repos/bcl/docker-anaconda-addon","forks_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/forks","keys_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/teams","hooks_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/hooks","issue_events_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/issues/events{/number}","events_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/events","assignees_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/assignees{/user}","branches_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/branches{/branch}","tags_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/tags","blobs_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/git/refs{/sha}","trees_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/statuses/{sha}","languages_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/languages","stargazers_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/stargazers","contributors_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/contributors","subscribers_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/subscribers","subscription_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/subscription","commits_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/commits{/sha}","git_commits_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/git/commits{/sha}","comments_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/comments{/number}","issue_comment_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/issues/comments{/number}","contents_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/contents/{+path}","compare_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/merges","archive_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/downloads","issues_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/issues{/number}","pulls_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/pulls{/number}","milestones_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/milestones{/number}","notifications_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/labels{/name}","releases_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/releases{/id}","deployments_url":"https://api.github.com/repos/bcl/docker-anaconda-addon/deployments","created_at":"2016-01-20T20:06:12Z","updated_at":"2016-01-20T20:06:13Z","pushed_at":"2016-01-26T02:08:16Z","git_url":"git://github.com/bcl/docker-anaconda-addon.git","ssh_url":"git@github.com:bcl/docker-anaconda-addon.git","clone_url":"https://github.com/bcl/docker-anaconda-addon.git","svn_url":"https://github.com/bcl/docker-anaconda-addon","homepage":null,"size":1718,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rhinstaller:master","ref":"master","sha":"014098d74a3ce039f5b4b07892a2ff6dd8eee4af","user":{"login":"rhinstaller","id":10549274,"avatar_url":"https://avatars.githubusercontent.com/u/10549274?v=3","gravatar_id":"","url":"https://api.github.com/users/rhinstaller","html_url":"https://github.com/rhinstaller","followers_url":"https://api.github.com/users/rhinstaller/followers","following_url":"https://api.github.com/users/rhinstaller/following{/other_user}","gists_url":"https://api.github.com/users/rhinstaller/gists{/gist_id}","starred_url":"https://api.github.com/users/rhinstaller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhinstaller/subscriptions","organizations_url":"https://api.github.com/users/rhinstaller/orgs","repos_url":"https://api.github.com/users/rhinstaller/repos","events_url":"https://api.github.com/users/rhinstaller/events{/privacy}","received_events_url":"https://api.github.com/users/rhinstaller/received_events","type":"Organization","site_admin":false},"repo":{"id":50055231,"name":"docker-anaconda-addon","full_name":"rhinstaller/docker-anaconda-addon","owner":{"login":"rhinstaller","id":10549274,"avatar_url":"https://avatars.githubusercontent.com/u/10549274?v=3","gravatar_id":"","url":"https://api.github.com/users/rhinstaller","html_url":"https://github.com/rhinstaller","followers_url":"https://api.github.com/users/rhinstaller/followers","following_url":"https://api.github.com/users/rhinstaller/following{/other_user}","gists_url":"https://api.github.com/users/rhinstaller/gists{/gist_id}","starred_url":"https://api.github.com/users/rhinstaller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhinstaller/subscriptions","organizations_url":"https://api.github.com/users/rhinstaller/orgs","repos_url":"https://api.github.com/users/rhinstaller/repos","events_url":"https://api.github.com/users/rhinstaller/events{/privacy}","received_events_url":"https://api.github.com/users/rhinstaller/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rhinstaller/docker-anaconda-addon","description":"Add a kickstart addon section to Anaconda to run Docker during the installation process.","fork":false,"url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon","forks_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/forks","keys_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/teams","hooks_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/hooks","issue_events_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/issues/events{/number}","events_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/events","assignees_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/assignees{/user}","branches_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/branches{/branch}","tags_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/tags","blobs_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/git/refs{/sha}","trees_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/statuses/{sha}","languages_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/languages","stargazers_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/stargazers","contributors_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/contributors","subscribers_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/subscribers","subscription_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/subscription","commits_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/commits{/sha}","git_commits_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/git/commits{/sha}","comments_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/comments{/number}","issue_comment_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/issues/comments{/number}","contents_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/contents/{+path}","compare_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/merges","archive_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/downloads","issues_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/issues{/number}","pulls_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/pulls{/number}","milestones_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/milestones{/number}","notifications_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/labels{/name}","releases_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/releases{/id}","deployments_url":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/deployments","created_at":"2016-01-20T19:38:44Z","updated_at":"2016-01-20T20:05:01Z","pushed_at":"2016-01-26T02:08:31Z","git_url":"git://github.com/rhinstaller/docker-anaconda-addon.git","ssh_url":"git@github.com:rhinstaller/docker-anaconda-addon.git","clone_url":"https://github.com/rhinstaller/docker-anaconda-addon.git","svn_url":"https://github.com/rhinstaller/docker-anaconda-addon","homepage":null,"size":1717,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/pulls/2"},"html":{"href":"https://github.com/rhinstaller/docker-anaconda-addon/pull/2"},"issue":{"href":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/issues/2"},"comments":{"href":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/rhinstaller/docker-anaconda-addon/statuses/3ae28743c5d84e32f500f53681f05d3ddbcb82f0"}}}}