{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/87011160","pull_request_review_id":7640151,"id":87011160,"diff_hunk":"@@ -88,36 +94,18 @@ public void onModule(DiscoveryModule discoveryModule) {\n                             AzureComputeService.Discovery.ENDPOINT_NAME_SETTING);\n     }\n \n-    /**\n-     * Check if discovery is meant to start\n-     * @return true if we can start discovery features\n-     */\n-    private static boolean isDiscoveryReady(Settings settings, Logger logger) {\n-        // User set discovery.type: azure\n-        if (!AzureDiscoveryPlugin.AZURE.equalsIgnoreCase(DiscoveryModule.DISCOVERY_TYPE_SETTING.get(settings))) {\n-            logger.trace(\"discovery.type not set to {}\", AzureDiscoveryPlugin.AZURE);\n-            return false;\n-        }\n-\n-        if (isDefined(settings, AzureComputeService.Management.SUBSCRIPTION_ID_SETTING) &&\n-            isDefined(settings, AzureComputeService.Management.SERVICE_NAME_SETTING) &&\n-            isDefined(settings, AzureComputeService.Management.KEYSTORE_PATH_SETTING) &&\n-            isDefined(settings, AzureComputeService.Management.KEYSTORE_PASSWORD_SETTING)) {\n-            logger.trace(\"All required properties for Azure discovery are set!\");\n-            return true;\n-        } else {\n-            logger.debug(\"One or more Azure discovery settings are missing. \" +\n-                    \"Check elasticsearch.yml file. Should have [{}], [{}], [{}] and [{}].\",\n-                AzureComputeService.Management.SUBSCRIPTION_ID_SETTING.getKey(),\n-                AzureComputeService.Management.SERVICE_NAME_SETTING.getKey(),\n-                AzureComputeService.Management.KEYSTORE_PATH_SETTING.getKey(),\n-                AzureComputeService.Management.KEYSTORE_PASSWORD_SETTING.getKey());\n-            return false;\n+    @Override\n+    public Settings additionalSettings() {\n+        // For 5.0, the hosts provider was \"zen\", but this was before the discovery.zen.hosts_provider\n+        // setting existed. This check looks for the legacy setting, and sets hosts provider if set\n+        String discoveryType = DiscoveryModule.DISCOVERY_TYPE_SETTING.get(settings);\n+        String hostsProvider = DiscoveryModule.DISCOVERY_HOSTS_PROVIDER_SETTING.get(settings);\n+        if (hostsProvider == null && discoveryType.equals(AZURE)) {","path":"plugins/discovery-azure-classic/src/main/java/org/elasticsearch/plugin/discovery/azure/classic/AzureDiscoveryPlugin.java","position":88,"original_position":88,"commit_id":"a8a4ba91610a251e8dbdb36cbc954aa0c52bb58a","original_commit_id":"a8a4ba91610a251e8dbdb36cbc954aa0c52bb58a","user":{"login":"rjernst","id":289412,"avatar_url":"https://avatars.githubusercontent.com/u/289412?v=3","gravatar_id":"","url":"https://api.github.com/users/rjernst","html_url":"https://github.com/rjernst","followers_url":"https://api.github.com/users/rjernst/followers","following_url":"https://api.github.com/users/rjernst/following{/other_user}","gists_url":"https://api.github.com/users/rjernst/gists{/gist_id}","starred_url":"https://api.github.com/users/rjernst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjernst/subscriptions","organizations_url":"https://api.github.com/users/rjernst/orgs","repos_url":"https://api.github.com/users/rjernst/repos","events_url":"https://api.github.com/users/rjernst/events{/privacy}","received_events_url":"https://api.github.com/users/rjernst/received_events","type":"User","site_admin":false},"body":"What do you mean by \"not used\"? All this does is check if the hosts provider setting has a value.","created_at":"2016-11-08T15:26:19Z","updated_at":"2016-11-08T15:26:19Z","html_url":"https://github.com/elastic/elasticsearch/pull/21398#discussion_r87011160","pull_request_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/21398","_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/87011160"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/21398#discussion_r87011160"},"pull_request":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/21398"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/21398","id":92732144,"html_url":"https://github.com/elastic/elasticsearch/pull/21398","diff_url":"https://github.com/elastic/elasticsearch/pull/21398.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/21398.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/21398","number":21398,"state":"open","locked":false,"title":"Plugins: Convert custom discovery to pull based plugin","user":{"login":"rjernst","id":289412,"avatar_url":"https://avatars.githubusercontent.com/u/289412?v=3","gravatar_id":"","url":"https://api.github.com/users/rjernst","html_url":"https://github.com/rjernst","followers_url":"https://api.github.com/users/rjernst/followers","following_url":"https://api.github.com/users/rjernst/following{/other_user}","gists_url":"https://api.github.com/users/rjernst/gists{/gist_id}","starred_url":"https://api.github.com/users/rjernst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjernst/subscriptions","organizations_url":"https://api.github.com/users/rjernst/orgs","repos_url":"https://api.github.com/users/rjernst/repos","events_url":"https://api.github.com/users/rjernst/events{/privacy}","received_events_url":"https://api.github.com/users/rjernst/received_events","type":"User","site_admin":false},"body":"This change primarily moves registering custom Discovery implementations\r\nto the pull based DiscoveryPlugin interface. It also keeps the cloud\r\nbased discovery plugins re-registering ZenDiscovery under their own name\r\nin order to maintain backwards compatibility. However,\r\ndiscovery.zen.hosts_provider is changed here to no longer fallback to\r\ndiscovery.type. Instead, each plugin which previously relied on the\r\nvalue of discovery.type now sets the hosts_provider to itself if\r\ndiscovery.type is set to itself, along with a deprecation warning.","created_at":"2016-11-08T08:11:21Z","updated_at":"2016-11-08T15:26:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"507af5e6f2f9369cbad0807ff0c0c13a248b0184","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/21398/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/21398/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/21398/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/a8a4ba91610a251e8dbdb36cbc954aa0c52bb58a","head":{"label":"rjernst:pull_discovery","ref":"pull_discovery","sha":"a8a4ba91610a251e8dbdb36cbc954aa0c52bb58a","user":{"login":"rjernst","id":289412,"avatar_url":"https://avatars.githubusercontent.com/u/289412?v=3","gravatar_id":"","url":"https://api.github.com/users/rjernst","html_url":"https://github.com/rjernst","followers_url":"https://api.github.com/users/rjernst/followers","following_url":"https://api.github.com/users/rjernst/following{/other_user}","gists_url":"https://api.github.com/users/rjernst/gists{/gist_id}","starred_url":"https://api.github.com/users/rjernst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjernst/subscriptions","organizations_url":"https://api.github.com/users/rjernst/orgs","repos_url":"https://api.github.com/users/rjernst/repos","events_url":"https://api.github.com/users/rjernst/events{/privacy}","received_events_url":"https://api.github.com/users/rjernst/received_events","type":"User","site_admin":false},"repo":{"id":21088403,"name":"elasticsearch","full_name":"rjernst/elasticsearch","owner":{"login":"rjernst","id":289412,"avatar_url":"https://avatars.githubusercontent.com/u/289412?v=3","gravatar_id":"","url":"https://api.github.com/users/rjernst","html_url":"https://github.com/rjernst","followers_url":"https://api.github.com/users/rjernst/followers","following_url":"https://api.github.com/users/rjernst/following{/other_user}","gists_url":"https://api.github.com/users/rjernst/gists{/gist_id}","starred_url":"https://api.github.com/users/rjernst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjernst/subscriptions","organizations_url":"https://api.github.com/users/rjernst/orgs","repos_url":"https://api.github.com/users/rjernst/repos","events_url":"https://api.github.com/users/rjernst/events{/privacy}","received_events_url":"https://api.github.com/users/rjernst/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rjernst/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/rjernst/elasticsearch","forks_url":"https://api.github.com/repos/rjernst/elasticsearch/forks","keys_url":"https://api.github.com/repos/rjernst/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rjernst/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rjernst/elasticsearch/teams","hooks_url":"https://api.github.com/repos/rjernst/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/rjernst/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/rjernst/elasticsearch/events","assignees_url":"https://api.github.com/repos/rjernst/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/rjernst/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/rjernst/elasticsearch/tags","blobs_url":"https://api.github.com/repos/rjernst/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rjernst/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rjernst/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/rjernst/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rjernst/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/rjernst/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/rjernst/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/rjernst/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/rjernst/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/rjernst/elasticsearch/subscription","commits_url":"https://api.github.com/repos/rjernst/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/rjernst/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/rjernst/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/rjernst/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/rjernst/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/rjernst/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rjernst/elasticsearch/merges","archive_url":"https://api.github.com/repos/rjernst/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rjernst/elasticsearch/downloads","issues_url":"https://api.github.com/repos/rjernst/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/rjernst/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/rjernst/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/rjernst/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rjernst/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/rjernst/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/rjernst/elasticsearch/deployments","created_at":"2014-06-22T07:43:32Z","updated_at":"2014-10-12T08:10:41Z","pushed_at":"2016-11-08T08:09:02Z","git_url":"git://github.com/rjernst/elasticsearch.git","ssh_url":"git@github.com:rjernst/elasticsearch.git","clone_url":"https://github.com/rjernst/elasticsearch.git","svn_url":"https://github.com/rjernst/elasticsearch","homepage":"http://elasticsearch.org","size":225548,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"elastic:master","ref":"master","sha":"6b4280c7be2e3c0aa4da6ef6ce1693ee591f2e11","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":507775,"name":"elasticsearch","full_name":"elastic/elasticsearch","owner":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elastic/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":false,"url":"https://api.github.com/repos/elastic/elasticsearch","forks_url":"https://api.github.com/repos/elastic/elasticsearch/forks","keys_url":"https://api.github.com/repos/elastic/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/elasticsearch/teams","hooks_url":"https://api.github.com/repos/elastic/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/elasticsearch/events","assignees_url":"https://api.github.com/repos/elastic/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/elasticsearch/tags","blobs_url":"https://api.github.com/repos/elastic/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/elastic/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/elastic/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/elastic/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/elastic/elasticsearch/subscription","commits_url":"https://api.github.com/repos/elastic/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/elasticsearch/merges","archive_url":"https://api.github.com/repos/elastic/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/elasticsearch/downloads","issues_url":"https://api.github.com/repos/elastic/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/elastic/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/elastic/elasticsearch/deployments","created_at":"2010-02-08T13:20:56Z","updated_at":"2016-11-08T15:15:53Z","pushed_at":"2016-11-08T15:17:18Z","git_url":"git://github.com/elastic/elasticsearch.git","ssh_url":"git@github.com:elastic/elasticsearch.git","clone_url":"https://github.com/elastic/elasticsearch.git","svn_url":"https://github.com/elastic/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":368664,"stargazers_count":19224,"watchers_count":19224,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6573,"mirror_url":null,"open_issues_count":1151,"forks":6573,"open_issues":1151,"watchers":19224,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/21398"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/21398"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/21398"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/21398/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/21398/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/21398/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/a8a4ba91610a251e8dbdb36cbc954aa0c52bb58a"}}}}
{"actor":{"display_login":"rjernst"}}