{"action":"created","comment":{"url":"https://api.github.com/repos/storaged-project/blivet/pulls/comments/172538898","pull_request_review_id":101571194,"id":172538898,"diff_hunk":"@@ -873,7 +873,11 @@ def clearPartitions(self):\n             if should_clear:\n                 self.recursiveRemove(disk)\n \n-            if zerombr or should_clear:\n+            if disk.readonly:\n+                raise ProtectedDiskError(\"cannot clear '%s': disk is read only\" % disk.name)","path":"blivet/__init__.py","position":15,"original_position":15,"commit_id":"d8a41bd99339a721e116e8f5e3793acebb7351c5","original_commit_id":"d8a41bd99339a721e116e8f5e3793acebb7351c5","user":{"login":"dwlehman","id":6605451,"avatar_url":"https://avatars3.githubusercontent.com/u/6605451?v=4","gravatar_id":"","url":"https://api.github.com/users/dwlehman","html_url":"https://github.com/dwlehman","followers_url":"https://api.github.com/users/dwlehman/followers","following_url":"https://api.github.com/users/dwlehman/following{/other_user}","gists_url":"https://api.github.com/users/dwlehman/gists{/gist_id}","starred_url":"https://api.github.com/users/dwlehman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwlehman/subscriptions","organizations_url":"https://api.github.com/users/dwlehman/orgs","repos_url":"https://api.github.com/users/dwlehman/repos","events_url":"https://api.github.com/users/dwlehman/events{/privacy}","received_events_url":"https://api.github.com/users/dwlehman/received_events","type":"User","site_admin":false},"body":"We shouldn't raise an exception here in the general case. Consider the following kickstart:\r\n\r\n```zerombr\r\nclearpart --initlabel --all\r\nautopart\r\n```\r\n\r\nIf there are several disks and only one of them is read-only, we should just not use the read-only disk. We already do this for `clearpart`, but not `zerombr`. I think the most you should do in these cases is log a warning and continue without initializing the disk. Also, I'm pretty sure that `disk.readonly` implies `disk.protected`, so you wouldn't need to check both of them.","created_at":"2018-03-06T14:48:12Z","updated_at":"2018-03-06T14:48:19Z","html_url":"https://github.com/storaged-project/blivet/pull/664#discussion_r172538898","pull_request_url":"https://api.github.com/repos/storaged-project/blivet/pulls/664","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/storaged-project/blivet/pulls/comments/172538898"},"html":{"href":"https://github.com/storaged-project/blivet/pull/664#discussion_r172538898"},"pull_request":{"href":"https://api.github.com/repos/storaged-project/blivet/pulls/664"}}},"pull_request":{"url":"https://api.github.com/repos/storaged-project/blivet/pulls/664","id":173143339,"html_url":"https://github.com/storaged-project/blivet/pull/664","diff_url":"https://github.com/storaged-project/blivet/pull/664.diff","patch_url":"https://github.com/storaged-project/blivet/pull/664.patch","issue_url":"https://api.github.com/repos/storaged-project/blivet/issues/664","number":664,"state":"open","locked":false,"title":"Fixed KS forcing zerombr onto RO disk (#1544425)","user":{"login":"japokorn","id":14925901,"avatar_url":"https://avatars2.githubusercontent.com/u/14925901?v=4","gravatar_id":"","url":"https://api.github.com/users/japokorn","html_url":"https://github.com/japokorn","followers_url":"https://api.github.com/users/japokorn/followers","following_url":"https://api.github.com/users/japokorn/following{/other_user}","gists_url":"https://api.github.com/users/japokorn/gists{/gist_id}","starred_url":"https://api.github.com/users/japokorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/japokorn/subscriptions","organizations_url":"https://api.github.com/users/japokorn/orgs","repos_url":"https://api.github.com/users/japokorn/repos","events_url":"https://api.github.com/users/japokorn/events{/privacy}","received_events_url":"https://api.github.com/users/japokorn/received_events","type":"User","site_admin":false},"body":"Improved handling of an exception caused by using anaconda kickstart\r\nwith zerombr and --only-use read-only disk\r\n\r\nAdded tests for this behavior\r\n\r\nResolves: rhbz#1544425","created_at":"2018-03-06T12:27:29Z","updated_at":"2018-03-06T14:48:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d5479f9bacf74368e2c456ed87e2920d471087ab","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/storaged-project/blivet/pulls/664/commits","review_comments_url":"https://api.github.com/repos/storaged-project/blivet/pulls/664/comments","review_comment_url":"https://api.github.com/repos/storaged-project/blivet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/storaged-project/blivet/issues/664/comments","statuses_url":"https://api.github.com/repos/storaged-project/blivet/statuses/d8a41bd99339a721e116e8f5e3793acebb7351c5","head":{"label":"japokorn:rhel7-branch-ro_disk_fail","ref":"rhel7-branch-ro_disk_fail","sha":"d8a41bd99339a721e116e8f5e3793acebb7351c5","user":{"login":"japokorn","id":14925901,"avatar_url":"https://avatars2.githubusercontent.com/u/14925901?v=4","gravatar_id":"","url":"https://api.github.com/users/japokorn","html_url":"https://github.com/japokorn","followers_url":"https://api.github.com/users/japokorn/followers","following_url":"https://api.github.com/users/japokorn/following{/other_user}","gists_url":"https://api.github.com/users/japokorn/gists{/gist_id}","starred_url":"https://api.github.com/users/japokorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/japokorn/subscriptions","organizations_url":"https://api.github.com/users/japokorn/orgs","repos_url":"https://api.github.com/users/japokorn/repos","events_url":"https://api.github.com/users/japokorn/events{/privacy}","received_events_url":"https://api.github.com/users/japokorn/received_events","type":"User","site_admin":false},"repo":{"id":44744434,"name":"blivet","full_name":"japokorn/blivet","owner":{"login":"japokorn","id":14925901,"avatar_url":"https://avatars2.githubusercontent.com/u/14925901?v=4","gravatar_id":"","url":"https://api.github.com/users/japokorn","html_url":"https://github.com/japokorn","followers_url":"https://api.github.com/users/japokorn/followers","following_url":"https://api.github.com/users/japokorn/following{/other_user}","gists_url":"https://api.github.com/users/japokorn/gists{/gist_id}","starred_url":"https://api.github.com/users/japokorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/japokorn/subscriptions","organizations_url":"https://api.github.com/users/japokorn/orgs","repos_url":"https://api.github.com/users/japokorn/repos","events_url":"https://api.github.com/users/japokorn/events{/privacy}","received_events_url":"https://api.github.com/users/japokorn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/japokorn/blivet","description":"A python module for configuration of block devices","fork":true,"url":"https://api.github.com/repos/japokorn/blivet","forks_url":"https://api.github.com/repos/japokorn/blivet/forks","keys_url":"https://api.github.com/repos/japokorn/blivet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/japokorn/blivet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/japokorn/blivet/teams","hooks_url":"https://api.github.com/repos/japokorn/blivet/hooks","issue_events_url":"https://api.github.com/repos/japokorn/blivet/issues/events{/number}","events_url":"https://api.github.com/repos/japokorn/blivet/events","assignees_url":"https://api.github.com/repos/japokorn/blivet/assignees{/user}","branches_url":"https://api.github.com/repos/japokorn/blivet/branches{/branch}","tags_url":"https://api.github.com/repos/japokorn/blivet/tags","blobs_url":"https://api.github.com/repos/japokorn/blivet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/japokorn/blivet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/japokorn/blivet/git/refs{/sha}","trees_url":"https://api.github.com/repos/japokorn/blivet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/japokorn/blivet/statuses/{sha}","languages_url":"https://api.github.com/repos/japokorn/blivet/languages","stargazers_url":"https://api.github.com/repos/japokorn/blivet/stargazers","contributors_url":"https://api.github.com/repos/japokorn/blivet/contributors","subscribers_url":"https://api.github.com/repos/japokorn/blivet/subscribers","subscription_url":"https://api.github.com/repos/japokorn/blivet/subscription","commits_url":"https://api.github.com/repos/japokorn/blivet/commits{/sha}","git_commits_url":"https://api.github.com/repos/japokorn/blivet/git/commits{/sha}","comments_url":"https://api.github.com/repos/japokorn/blivet/comments{/number}","issue_comment_url":"https://api.github.com/repos/japokorn/blivet/issues/comments{/number}","contents_url":"https://api.github.com/repos/japokorn/blivet/contents/{+path}","compare_url":"https://api.github.com/repos/japokorn/blivet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/japokorn/blivet/merges","archive_url":"https://api.github.com/repos/japokorn/blivet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/japokorn/blivet/downloads","issues_url":"https://api.github.com/repos/japokorn/blivet/issues{/number}","pulls_url":"https://api.github.com/repos/japokorn/blivet/pulls{/number}","milestones_url":"https://api.github.com/repos/japokorn/blivet/milestones{/number}","notifications_url":"https://api.github.com/repos/japokorn/blivet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/japokorn/blivet/labels{/name}","releases_url":"https://api.github.com/repos/japokorn/blivet/releases{/id}","deployments_url":"https://api.github.com/repos/japokorn/blivet/deployments","created_at":"2015-10-22T12:44:04Z","updated_at":"2016-04-07T09:25:25Z","pushed_at":"2018-03-06T13:08:33Z","git_url":"git://github.com/japokorn/blivet.git","ssh_url":"git@github.com:japokorn/blivet.git","clone_url":"https://github.com/japokorn/blivet.git","svn_url":"https://github.com/japokorn/blivet","homepage":null,"size":10821,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"storaged-project:rhel7-branch","ref":"rhel7-branch","sha":"5bd832657181acc41deeaafea2c9f0e3e775f24a","user":{"login":"storaged-project","id":11505466,"avatar_url":"https://avatars1.githubusercontent.com/u/11505466?v=4","gravatar_id":"","url":"https://api.github.com/users/storaged-project","html_url":"https://github.com/storaged-project","followers_url":"https://api.github.com/users/storaged-project/followers","following_url":"https://api.github.com/users/storaged-project/following{/other_user}","gists_url":"https://api.github.com/users/storaged-project/gists{/gist_id}","starred_url":"https://api.github.com/users/storaged-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/storaged-project/subscriptions","organizations_url":"https://api.github.com/users/storaged-project/orgs","repos_url":"https://api.github.com/users/storaged-project/repos","events_url":"https://api.github.com/users/storaged-project/events{/privacy}","received_events_url":"https://api.github.com/users/storaged-project/received_events","type":"Organization","site_admin":false},"repo":{"id":16584540,"name":"blivet","full_name":"storaged-project/blivet","owner":{"login":"storaged-project","id":11505466,"avatar_url":"https://avatars1.githubusercontent.com/u/11505466?v=4","gravatar_id":"","url":"https://api.github.com/users/storaged-project","html_url":"https://github.com/storaged-project","followers_url":"https://api.github.com/users/storaged-project/followers","following_url":"https://api.github.com/users/storaged-project/following{/other_user}","gists_url":"https://api.github.com/users/storaged-project/gists{/gist_id}","starred_url":"https://api.github.com/users/storaged-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/storaged-project/subscriptions","organizations_url":"https://api.github.com/users/storaged-project/orgs","repos_url":"https://api.github.com/users/storaged-project/repos","events_url":"https://api.github.com/users/storaged-project/events{/privacy}","received_events_url":"https://api.github.com/users/storaged-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/storaged-project/blivet","description":"A python module for configuration of block devices","fork":false,"url":"https://api.github.com/repos/storaged-project/blivet","forks_url":"https://api.github.com/repos/storaged-project/blivet/forks","keys_url":"https://api.github.com/repos/storaged-project/blivet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/storaged-project/blivet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/storaged-project/blivet/teams","hooks_url":"https://api.github.com/repos/storaged-project/blivet/hooks","issue_events_url":"https://api.github.com/repos/storaged-project/blivet/issues/events{/number}","events_url":"https://api.github.com/repos/storaged-project/blivet/events","assignees_url":"https://api.github.com/repos/storaged-project/blivet/assignees{/user}","branches_url":"https://api.github.com/repos/storaged-project/blivet/branches{/branch}","tags_url":"https://api.github.com/repos/storaged-project/blivet/tags","blobs_url":"https://api.github.com/repos/storaged-project/blivet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/storaged-project/blivet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/storaged-project/blivet/git/refs{/sha}","trees_url":"https://api.github.com/repos/storaged-project/blivet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/storaged-project/blivet/statuses/{sha}","languages_url":"https://api.github.com/repos/storaged-project/blivet/languages","stargazers_url":"https://api.github.com/repos/storaged-project/blivet/stargazers","contributors_url":"https://api.github.com/repos/storaged-project/blivet/contributors","subscribers_url":"https://api.github.com/repos/storaged-project/blivet/subscribers","subscription_url":"https://api.github.com/repos/storaged-project/blivet/subscription","commits_url":"https://api.github.com/repos/storaged-project/blivet/commits{/sha}","git_commits_url":"https://api.github.com/repos/storaged-project/blivet/git/commits{/sha}","comments_url":"https://api.github.com/repos/storaged-project/blivet/comments{/number}","issue_comment_url":"https://api.github.com/repos/storaged-project/blivet/issues/comments{/number}","contents_url":"https://api.github.com/repos/storaged-project/blivet/contents/{+path}","compare_url":"https://api.github.com/repos/storaged-project/blivet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/storaged-project/blivet/merges","archive_url":"https://api.github.com/repos/storaged-project/blivet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/storaged-project/blivet/downloads","issues_url":"https://api.github.com/repos/storaged-project/blivet/issues{/number}","pulls_url":"https://api.github.com/repos/storaged-project/blivet/pulls{/number}","milestones_url":"https://api.github.com/repos/storaged-project/blivet/milestones{/number}","notifications_url":"https://api.github.com/repos/storaged-project/blivet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/storaged-project/blivet/labels{/name}","releases_url":"https://api.github.com/repos/storaged-project/blivet/releases{/id}","deployments_url":"https://api.github.com/repos/storaged-project/blivet/deployments","created_at":"2014-02-06T16:02:44Z","updated_at":"2018-02-01T17:39:07Z","pushed_at":"2018-03-06T14:46:54Z","git_url":"git://github.com/storaged-project/blivet.git","ssh_url":"git@github.com:storaged-project/blivet.git","clone_url":"https://github.com/storaged-project/blivet.git","svn_url":"https://github.com/storaged-project/blivet","homepage":null,"size":11869,"stargazers_count":43,"watchers_count":43,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":56,"mirror_url":null,"archived":false,"open_issues_count":36,"license":{"key":"lgpl-2.1","name":"GNU Lesser General Public License v2.1","spdx_id":"LGPL-2.1","url":"https://api.github.com/licenses/lgpl-2.1"},"forks":56,"open_issues":36,"watchers":43,"default_branch":"2.1-devel"}},"_links":{"self":{"href":"https://api.github.com/repos/storaged-project/blivet/pulls/664"},"html":{"href":"https://github.com/storaged-project/blivet/pull/664"},"issue":{"href":"https://api.github.com/repos/storaged-project/blivet/issues/664"},"comments":{"href":"https://api.github.com/repos/storaged-project/blivet/issues/664/comments"},"review_comments":{"href":"https://api.github.com/repos/storaged-project/blivet/pulls/664/comments"},"review_comment":{"href":"https://api.github.com/repos/storaged-project/blivet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/storaged-project/blivet/pulls/664/commits"},"statuses":{"href":"https://api.github.com/repos/storaged-project/blivet/statuses/d8a41bd99339a721e116e8f5e3793acebb7351c5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dwlehman"}}