{"action":"created","comment":{"url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/comments/117013289","pull_request_review_id":38680816,"id":117013289,"diff_hunk":"@@ -75,6 +75,14 @@ def call(env)\n             root_disk.destroy if root_disk\n           end\n \n+          # Remove NFS exports that are no longer valid following destroy\n+          uuid = env[:machine].id\n+          uuids = env[:machine].provider.driver.connection.servers.all.map(&:id)\n+          uuids.delete(uuid)\n+          env[:host].capability(\n+            :nfs_prune, env[:machine].ui, uuids\n+          )\n+","path":"lib/vagrant-libvirt/action/destroy_domain.rb","position":11,"original_position":11,"commit_id":"5556b3e0a4ba783ca43a5b1d5dab5c305205bd57","original_commit_id":"5556b3e0a4ba783ca43a5b1d5dab5c305205bd57","user":{"login":"electrofelix","id":912324,"avatar_url":"https://avatars2.githubusercontent.com/u/912324?v=3","gravatar_id":"","url":"https://api.github.com/users/electrofelix","html_url":"https://github.com/electrofelix","followers_url":"https://api.github.com/users/electrofelix/followers","following_url":"https://api.github.com/users/electrofelix/following{/other_user}","gists_url":"https://api.github.com/users/electrofelix/gists{/gist_id}","starred_url":"https://api.github.com/users/electrofelix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electrofelix/subscriptions","organizations_url":"https://api.github.com/users/electrofelix/orgs","repos_url":"https://api.github.com/users/electrofelix/repos","events_url":"https://api.github.com/users/electrofelix/events{/privacy}","received_events_url":"https://api.github.com/users/electrofelix/received_events","type":"User","site_admin":false},"body":"This seems like we should simply be adding back in the action PruneNFSExports to the self.action_destroy method in lib/vagrant-libvirt/action.rb.","created_at":"2017-05-17T14:16:37Z","updated_at":"2017-05-17T14:18:49Z","html_url":"https://github.com/vagrant-libvirt/vagrant-libvirt/pull/781#discussion_r117013289","pull_request_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/781","_links":{"self":{"href":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/comments/117013289"},"html":{"href":"https://github.com/vagrant-libvirt/vagrant-libvirt/pull/781#discussion_r117013289"},"pull_request":{"href":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/781"}}},"pull_request":{"url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/781","id":120803333,"html_url":"https://github.com/vagrant-libvirt/vagrant-libvirt/pull/781","diff_url":"https://github.com/vagrant-libvirt/vagrant-libvirt/pull/781.diff","patch_url":"https://github.com/vagrant-libvirt/vagrant-libvirt/pull/781.patch","issue_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/issues/781","number":781,"state":"open","locked":false,"title":"Remove NFS exports on domain destroy","user":{"login":"omahn","id":210725,"avatar_url":"https://avatars3.githubusercontent.com/u/210725?v=3","gravatar_id":"","url":"https://api.github.com/users/omahn","html_url":"https://github.com/omahn","followers_url":"https://api.github.com/users/omahn/followers","following_url":"https://api.github.com/users/omahn/following{/other_user}","gists_url":"https://api.github.com/users/omahn/gists{/gist_id}","starred_url":"https://api.github.com/users/omahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omahn/subscriptions","organizations_url":"https://api.github.com/users/omahn/orgs","repos_url":"https://api.github.com/users/omahn/repos","events_url":"https://api.github.com/users/omahn/events{/privacy}","received_events_url":"https://api.github.com/users/omahn/received_events","type":"User","site_admin":false},"body":"When using vagrant with the default virtualbox provider, NFS exports are removed as guests are destroyed. With the libvirt provider, NFS exports are left in `/etc/exports` following a destroy. They are only removed if a `vagrant up` operation subsequently takes place using the libvirt provider.\r\n\r\nThis leaves the host machine exporting the local filesystem to the IP(s) used previously by the libvirt domains. I think this behaviour is undesirable and potentially a security risk as those IP(s) may now be used for other purposes.\r\n\r\nThis PR duplicates the existing code used during NFS pruning on a `vagrant up` and places it in the `DestroyDomain` class. NFS exports will therefore be removed as domains are destroyed. I suggest we also leave the existing NFS pruning code in-place to catch any situations where vagrant/libvirt fails during the destroy steps.","created_at":"2017-05-16T11:22:46Z","updated_at":"2017-05-17T14:18:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf631874787847eb0b7f970879f1480a2ad0bc72","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/781/commits","review_comments_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/781/comments","review_comment_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/issues/781/comments","statuses_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/statuses/5556b3e0a4ba783ca43a5b1d5dab5c305205bd57","head":{"label":"omahn:nfs_cleanup_on_destroy","ref":"nfs_cleanup_on_destroy","sha":"5556b3e0a4ba783ca43a5b1d5dab5c305205bd57","user":{"login":"omahn","id":210725,"avatar_url":"https://avatars3.githubusercontent.com/u/210725?v=3","gravatar_id":"","url":"https://api.github.com/users/omahn","html_url":"https://github.com/omahn","followers_url":"https://api.github.com/users/omahn/followers","following_url":"https://api.github.com/users/omahn/following{/other_user}","gists_url":"https://api.github.com/users/omahn/gists{/gist_id}","starred_url":"https://api.github.com/users/omahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omahn/subscriptions","organizations_url":"https://api.github.com/users/omahn/orgs","repos_url":"https://api.github.com/users/omahn/repos","events_url":"https://api.github.com/users/omahn/events{/privacy}","received_events_url":"https://api.github.com/users/omahn/received_events","type":"User","site_admin":false},"repo":{"id":91448729,"name":"vagrant-libvirt","full_name":"omahn/vagrant-libvirt","owner":{"login":"omahn","id":210725,"avatar_url":"https://avatars3.githubusercontent.com/u/210725?v=3","gravatar_id":"","url":"https://api.github.com/users/omahn","html_url":"https://github.com/omahn","followers_url":"https://api.github.com/users/omahn/followers","following_url":"https://api.github.com/users/omahn/following{/other_user}","gists_url":"https://api.github.com/users/omahn/gists{/gist_id}","starred_url":"https://api.github.com/users/omahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omahn/subscriptions","organizations_url":"https://api.github.com/users/omahn/orgs","repos_url":"https://api.github.com/users/omahn/repos","events_url":"https://api.github.com/users/omahn/events{/privacy}","received_events_url":"https://api.github.com/users/omahn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/omahn/vagrant-libvirt","description":"Vagrant provider for libvirt.","fork":true,"url":"https://api.github.com/repos/omahn/vagrant-libvirt","forks_url":"https://api.github.com/repos/omahn/vagrant-libvirt/forks","keys_url":"https://api.github.com/repos/omahn/vagrant-libvirt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/omahn/vagrant-libvirt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/omahn/vagrant-libvirt/teams","hooks_url":"https://api.github.com/repos/omahn/vagrant-libvirt/hooks","issue_events_url":"https://api.github.com/repos/omahn/vagrant-libvirt/issues/events{/number}","events_url":"https://api.github.com/repos/omahn/vagrant-libvirt/events","assignees_url":"https://api.github.com/repos/omahn/vagrant-libvirt/assignees{/user}","branches_url":"https://api.github.com/repos/omahn/vagrant-libvirt/branches{/branch}","tags_url":"https://api.github.com/repos/omahn/vagrant-libvirt/tags","blobs_url":"https://api.github.com/repos/omahn/vagrant-libvirt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/omahn/vagrant-libvirt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/omahn/vagrant-libvirt/git/refs{/sha}","trees_url":"https://api.github.com/repos/omahn/vagrant-libvirt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/omahn/vagrant-libvirt/statuses/{sha}","languages_url":"https://api.github.com/repos/omahn/vagrant-libvirt/languages","stargazers_url":"https://api.github.com/repos/omahn/vagrant-libvirt/stargazers","contributors_url":"https://api.github.com/repos/omahn/vagrant-libvirt/contributors","subscribers_url":"https://api.github.com/repos/omahn/vagrant-libvirt/subscribers","subscription_url":"https://api.github.com/repos/omahn/vagrant-libvirt/subscription","commits_url":"https://api.github.com/repos/omahn/vagrant-libvirt/commits{/sha}","git_commits_url":"https://api.github.com/repos/omahn/vagrant-libvirt/git/commits{/sha}","comments_url":"https://api.github.com/repos/omahn/vagrant-libvirt/comments{/number}","issue_comment_url":"https://api.github.com/repos/omahn/vagrant-libvirt/issues/comments{/number}","contents_url":"https://api.github.com/repos/omahn/vagrant-libvirt/contents/{+path}","compare_url":"https://api.github.com/repos/omahn/vagrant-libvirt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/omahn/vagrant-libvirt/merges","archive_url":"https://api.github.com/repos/omahn/vagrant-libvirt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/omahn/vagrant-libvirt/downloads","issues_url":"https://api.github.com/repos/omahn/vagrant-libvirt/issues{/number}","pulls_url":"https://api.github.com/repos/omahn/vagrant-libvirt/pulls{/number}","milestones_url":"https://api.github.com/repos/omahn/vagrant-libvirt/milestones{/number}","notifications_url":"https://api.github.com/repos/omahn/vagrant-libvirt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/omahn/vagrant-libvirt/labels{/name}","releases_url":"https://api.github.com/repos/omahn/vagrant-libvirt/releases{/id}","deployments_url":"https://api.github.com/repos/omahn/vagrant-libvirt/deployments","created_at":"2017-05-16T11:04:13Z","updated_at":"2017-05-16T11:04:15Z","pushed_at":"2017-05-16T11:14:36Z","git_url":"git://github.com/omahn/vagrant-libvirt.git","ssh_url":"git@github.com:omahn/vagrant-libvirt.git","clone_url":"https://github.com/omahn/vagrant-libvirt.git","svn_url":"https://github.com/omahn/vagrant-libvirt","homepage":null,"size":976,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"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":"vagrant-libvirt:master","ref":"master","sha":"772c38a2b30bb7e8fbd531a767995877476a9c05","user":{"login":"vagrant-libvirt","id":18666954,"avatar_url":"https://avatars3.githubusercontent.com/u/18666954?v=3","gravatar_id":"","url":"https://api.github.com/users/vagrant-libvirt","html_url":"https://github.com/vagrant-libvirt","followers_url":"https://api.github.com/users/vagrant-libvirt/followers","following_url":"https://api.github.com/users/vagrant-libvirt/following{/other_user}","gists_url":"https://api.github.com/users/vagrant-libvirt/gists{/gist_id}","starred_url":"https://api.github.com/users/vagrant-libvirt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vagrant-libvirt/subscriptions","organizations_url":"https://api.github.com/users/vagrant-libvirt/orgs","repos_url":"https://api.github.com/users/vagrant-libvirt/repos","events_url":"https://api.github.com/users/vagrant-libvirt/events{/privacy}","received_events_url":"https://api.github.com/users/vagrant-libvirt/received_events","type":"Organization","site_admin":false},"repo":{"id":9043012,"name":"vagrant-libvirt","full_name":"vagrant-libvirt/vagrant-libvirt","owner":{"login":"vagrant-libvirt","id":18666954,"avatar_url":"https://avatars3.githubusercontent.com/u/18666954?v=3","gravatar_id":"","url":"https://api.github.com/users/vagrant-libvirt","html_url":"https://github.com/vagrant-libvirt","followers_url":"https://api.github.com/users/vagrant-libvirt/followers","following_url":"https://api.github.com/users/vagrant-libvirt/following{/other_user}","gists_url":"https://api.github.com/users/vagrant-libvirt/gists{/gist_id}","starred_url":"https://api.github.com/users/vagrant-libvirt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vagrant-libvirt/subscriptions","organizations_url":"https://api.github.com/users/vagrant-libvirt/orgs","repos_url":"https://api.github.com/users/vagrant-libvirt/repos","events_url":"https://api.github.com/users/vagrant-libvirt/events{/privacy}","received_events_url":"https://api.github.com/users/vagrant-libvirt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vagrant-libvirt/vagrant-libvirt","description":"Vagrant provider for libvirt.","fork":false,"url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt","forks_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/forks","keys_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/teams","hooks_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/hooks","issue_events_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/issues/events{/number}","events_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/events","assignees_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/assignees{/user}","branches_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/branches{/branch}","tags_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/tags","blobs_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/git/refs{/sha}","trees_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/statuses/{sha}","languages_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/languages","stargazers_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/stargazers","contributors_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/contributors","subscribers_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/subscribers","subscription_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/subscription","commits_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/commits{/sha}","git_commits_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/git/commits{/sha}","comments_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/comments{/number}","issue_comment_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/issues/comments{/number}","contents_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/contents/{+path}","compare_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/merges","archive_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/downloads","issues_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/issues{/number}","pulls_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls{/number}","milestones_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/milestones{/number}","notifications_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/labels{/name}","releases_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/releases{/id}","deployments_url":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/deployments","created_at":"2013-03-26T23:54:32Z","updated_at":"2017-05-14T23:15:48Z","pushed_at":"2017-05-16T13:42:04Z","git_url":"git://github.com/vagrant-libvirt/vagrant-libvirt.git","ssh_url":"git@github.com:vagrant-libvirt/vagrant-libvirt.git","clone_url":"https://github.com/vagrant-libvirt/vagrant-libvirt.git","svn_url":"https://github.com/vagrant-libvirt/vagrant-libvirt","homepage":null,"size":978,"stargazers_count":1015,"watchers_count":1015,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":276,"mirror_url":null,"open_issues_count":89,"forks":276,"open_issues":89,"watchers":1015,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/781"},"html":{"href":"https://github.com/vagrant-libvirt/vagrant-libvirt/pull/781"},"issue":{"href":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/issues/781"},"comments":{"href":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/issues/781/comments"},"review_comments":{"href":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/781/comments"},"review_comment":{"href":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/pulls/781/commits"},"statuses":{"href":"https://api.github.com/repos/vagrant-libvirt/vagrant-libvirt/statuses/5556b3e0a4ba783ca43a5b1d5dab5c305205bd57"}}}}
{"actor":{"display_login":"electrofelix"}}