{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments/22981377","id":22981377,"diff_hunk":"@@ -0,0 +1,85 @@\n+---\n+title: \"PuppetDB 2.2 » Configuring PuppetDB Connection\"\n+layout: default\n+canonical: \"/puppetdb/latest/puppetdb_connection.html\"\n+---\n+\n+[puppetdb_root]: ./index.html\n+[connect_to_puppetdb]: ./connect_puppet_master.html\n+[confdir]: /puppet/latest/reference/dirs_confdir.html\n+[puppetdb_conf]: ./connect_puppet_master.html#edit-puppetdb\\.conf\n+[url_prefix_setting]: ./configure.html#url-prefix\n+[web_router_setting]: ./configure.html#:web-router-service\n+\n+The `puppetdb.conf` file contains the hostname and port of the [PuppetDB][puppetdb_root] server. It is only used if you are using PuppetDB and have [connected your Puppet master to it][connect_to_puppetdb].\n+\n+Summary\n+-----\n+\n+The Puppet master makes HTTPS connections to PuppetDB to store catalogs, facts and new reports. It also uses PuppetDB to answer queries such those necessary to support exported resources. If the PuppetDB instance is down, depending on the configuration of the Puppet master, it could cause the Puppet run to fail. This document discusses configuration options for the `puppetdb.conf` file, including settings to make the PuppetDB terminus more tolerant of failures.\n+\n+## Location\n+\n+The `puppetdb.conf` file is always located at `$confdir/puppetdb.conf`. Its location is **not** configurable.\n+\n+The location of the `confdir` varies; it depends on the OS, Puppet distribution, and user account. [See the confdir documentation for details.][confdir]\n+\n+## Example\n+\n+    [main]\n+    server_urls = https://puppetdb.example.com:8081/\n+\n+## Format\n+\n+The `puppetdb.conf` file uses the same INI-like format as `puppet.conf`, but only uses a `[main]` section\n+\n+`[main]` Settings\n+-----\n+\n+The `[main]` section defines all of the PuppetDB terminus settings.\n+\n+### `server_urls`\n+\n+This parameter specifies how the Puppet master should connect to PuppetDB. The configuration should look something like the configuration below:\n+\n+    server_urls = https://puppetdb.example.com:8081/\n+\n+Puppet _requires_ the use of PuppetDB's secure, HTTPS port. You cannot use the unencrypted, plain HTTP port. If you have specified a [`web-router-service` setting in your PuppetDB configuration][web_router_setting], that prefix must be reflected in your URLs. See [`url-prefix`][url_prefix_setting] for the (now deprecated) way of setting the `url-prefix`.\n+\n+Note that a comma separated list of the URLs can be provided if there are more than one PuppetDB instances available. A `server_urls` config that supports two PuppetDBs would look like:\n+\n+    server_urls = https://puppetdb1.example.com:8081/,https://puppetdb2.example.com:8081/\n+\n+The PuppetDB terminus will always attempt to connect to the first PuppetDB instance specified (listed above as puppetdb1). If a server-side exception occurs, or the request takes too long (see [`server_url_timeout`](#server_url_timeout)), the PuppetDB terminus will attempt the same operation on the next instance in the list.\n+\n+The default value is https://puppetdb:8081/\n+\n+### `server_url_timeout`\n+\n+The `server_url_timeout` field sets the maximum amount of time (in seconds) the PuppetDB termini will wait for an HTTP request to be responded to by PuppetDB. If the user has specified more than one PuppetDB URL and a timeout has occurred, it will attempt the same request on the next server in the list.\n+\n+The default value is 30 seconds.\n+\n+### `soft_write_failure`\n+\n+For availability reasons there is a setting named `soft_write_failure` that will cause the PuppetDB termini to fail in a soft-manner if PuppetDB is not accessable for command submission. This will mean that users who are either not using storeconfigs, or only exporting resources will still have their catalogs compile during a PuppetDB outage.\n+\n+The default value is false.\n+\n+### `server`\n+\n+> **Deprecated:** `server_urls` replaces this setting and will be removed in the future","path":"documentation/puppetdb_connection.markdown","position":71,"original_position":71,"commit_id":"08ceb38452bd3b1486978b31cdb2d990f0d51f8d","original_commit_id":"08ceb38452bd3b1486978b31cdb2d990f0d51f8d","user":{"login":"nfagerlund","id":484309,"avatar_url":"https://avatars.githubusercontent.com/u/484309?v=3","gravatar_id":"","url":"https://api.github.com/users/nfagerlund","html_url":"https://github.com/nfagerlund","followers_url":"https://api.github.com/users/nfagerlund/followers","following_url":"https://api.github.com/users/nfagerlund/following{/other_user}","gists_url":"https://api.github.com/users/nfagerlund/gists{/gist_id}","starred_url":"https://api.github.com/users/nfagerlund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nfagerlund/subscriptions","organizations_url":"https://api.github.com/users/nfagerlund/orgs","repos_url":"https://api.github.com/users/nfagerlund/repos","events_url":"https://api.github.com/users/nfagerlund/events{/privacy}","received_events_url":"https://api.github.com/users/nfagerlund/received_events","type":"User","site_admin":false},"body":"This is ambiguous. I'd edit it as:\r\n\r\n    > **Deprecated:** `server_urls` replaces this setting. This setting will be removed in the future.\r\n\r\nAlso, what's the precedence of these settings? If `server_urls` is present, will `server` be ignored?","created_at":"2015-01-14T23:56:27Z","updated_at":"2015-01-14T23:56:27Z","html_url":"https://github.com/puppetlabs/puppetdb/pull/1212#discussion_r22981377","pull_request_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1212","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments/22981377"},"html":{"href":"https://github.com/puppetlabs/puppetdb/pull/1212#discussion_r22981377"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1212"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1212","id":27292909,"html_url":"https://github.com/puppetlabs/puppetdb/pull/1212","diff_url":"https://github.com/puppetlabs/puppetdb/pull/1212.diff","patch_url":"https://github.com/puppetlabs/puppetdb/pull/1212.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1212","number":1212,"state":"open","locked":false,"title":"(PDB-486) Add documentation on terminus failover support","user":{"login":"senior","id":215910,"avatar_url":"https://avatars.githubusercontent.com/u/215910?v=3","gravatar_id":"","url":"https://api.github.com/users/senior","html_url":"https://github.com/senior","followers_url":"https://api.github.com/users/senior/followers","following_url":"https://api.github.com/users/senior/following{/other_user}","gists_url":"https://api.github.com/users/senior/gists{/gist_id}","starred_url":"https://api.github.com/users/senior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senior/subscriptions","organizations_url":"https://api.github.com/users/senior/orgs","repos_url":"https://api.github.com/users/senior/repos","events_url":"https://api.github.com/users/senior/events{/privacy}","received_events_url":"https://api.github.com/users/senior/received_events","type":"User","site_admin":false},"body":"While writing the documentation on new configuration for terminus\r\nfailover, I noticed some out of date documentation on puppetdb.conf in\r\npuppet-docs. I copied the shell of those docs here and updated them to\r\ncurrent and added som failover specific information.","created_at":"2015-01-13T18:28:16Z","updated_at":"2015-01-14T23:56:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"78b6ce60982de39d03138f0a87169051f13d8d61","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1212/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1212/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments/{number}","comments_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1212/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppetdb/statuses/08ceb38452bd3b1486978b31cdb2d990f0d51f8d","head":{"label":"senior:ticket/master/pdb-486-document-terminus-failover","ref":"ticket/master/pdb-486-document-terminus-failover","sha":"08ceb38452bd3b1486978b31cdb2d990f0d51f8d","user":{"login":"senior","id":215910,"avatar_url":"https://avatars.githubusercontent.com/u/215910?v=3","gravatar_id":"","url":"https://api.github.com/users/senior","html_url":"https://github.com/senior","followers_url":"https://api.github.com/users/senior/followers","following_url":"https://api.github.com/users/senior/following{/other_user}","gists_url":"https://api.github.com/users/senior/gists{/gist_id}","starred_url":"https://api.github.com/users/senior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senior/subscriptions","organizations_url":"https://api.github.com/users/senior/orgs","repos_url":"https://api.github.com/users/senior/repos","events_url":"https://api.github.com/users/senior/events{/privacy}","received_events_url":"https://api.github.com/users/senior/received_events","type":"User","site_admin":false},"repo":{"id":13152306,"name":"puppetdb","full_name":"senior/puppetdb","owner":{"login":"senior","id":215910,"avatar_url":"https://avatars.githubusercontent.com/u/215910?v=3","gravatar_id":"","url":"https://api.github.com/users/senior","html_url":"https://github.com/senior","followers_url":"https://api.github.com/users/senior/followers","following_url":"https://api.github.com/users/senior/following{/other_user}","gists_url":"https://api.github.com/users/senior/gists{/gist_id}","starred_url":"https://api.github.com/users/senior/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/senior/subscriptions","organizations_url":"https://api.github.com/users/senior/orgs","repos_url":"https://api.github.com/users/senior/repos","events_url":"https://api.github.com/users/senior/events{/privacy}","received_events_url":"https://api.github.com/users/senior/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/senior/puppetdb","description":"Centralized Puppet Storage","fork":true,"url":"https://api.github.com/repos/senior/puppetdb","forks_url":"https://api.github.com/repos/senior/puppetdb/forks","keys_url":"https://api.github.com/repos/senior/puppetdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/senior/puppetdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/senior/puppetdb/teams","hooks_url":"https://api.github.com/repos/senior/puppetdb/hooks","issue_events_url":"https://api.github.com/repos/senior/puppetdb/issues/events{/number}","events_url":"https://api.github.com/repos/senior/puppetdb/events","assignees_url":"https://api.github.com/repos/senior/puppetdb/assignees{/user}","branches_url":"https://api.github.com/repos/senior/puppetdb/branches{/branch}","tags_url":"https://api.github.com/repos/senior/puppetdb/tags","blobs_url":"https://api.github.com/repos/senior/puppetdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/senior/puppetdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/senior/puppetdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/senior/puppetdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/senior/puppetdb/statuses/{sha}","languages_url":"https://api.github.com/repos/senior/puppetdb/languages","stargazers_url":"https://api.github.com/repos/senior/puppetdb/stargazers","contributors_url":"https://api.github.com/repos/senior/puppetdb/contributors","subscribers_url":"https://api.github.com/repos/senior/puppetdb/subscribers","subscription_url":"https://api.github.com/repos/senior/puppetdb/subscription","commits_url":"https://api.github.com/repos/senior/puppetdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/senior/puppetdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/senior/puppetdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/senior/puppetdb/issues/comments/{number}","contents_url":"https://api.github.com/repos/senior/puppetdb/contents/{+path}","compare_url":"https://api.github.com/repos/senior/puppetdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/senior/puppetdb/merges","archive_url":"https://api.github.com/repos/senior/puppetdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/senior/puppetdb/downloads","issues_url":"https://api.github.com/repos/senior/puppetdb/issues{/number}","pulls_url":"https://api.github.com/repos/senior/puppetdb/pulls{/number}","milestones_url":"https://api.github.com/repos/senior/puppetdb/milestones{/number}","notifications_url":"https://api.github.com/repos/senior/puppetdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/senior/puppetdb/labels{/name}","releases_url":"https://api.github.com/repos/senior/puppetdb/releases{/id}","created_at":"2013-09-27T14:18:50Z","updated_at":"2014-06-21T06:15:55Z","pushed_at":"2015-01-13T19:15:09Z","git_url":"git://github.com/senior/puppetdb.git","ssh_url":"git@github.com:senior/puppetdb.git","clone_url":"https://github.com/senior/puppetdb.git","svn_url":"https://github.com/senior/puppetdb","homepage":"http://docs.puppetlabs.com/puppetdb","size":12136,"stargazers_count":0,"watchers_count":0,"language":"Clojure","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":"puppetlabs:master","ref":"master","sha":"5b65df96b240193051526f21d541d3550397138f","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":2193032,"name":"puppetdb","full_name":"puppetlabs/puppetdb","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/puppetdb","description":"Centralized Puppet Storage","fork":false,"url":"https://api.github.com/repos/puppetlabs/puppetdb","forks_url":"https://api.github.com/repos/puppetlabs/puppetdb/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppetdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppetdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppetdb/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppetdb/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppetdb/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppetdb/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppetdb/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppetdb/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppetdb/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppetdb/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppetdb/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppetdb/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppetdb/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppetdb/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppetdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppetdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppetdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues/comments/{number}","contents_url":"https://api.github.com/repos/puppetlabs/puppetdb/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppetdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppetdb/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppetdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppetdb/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppetdb/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppetdb/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppetdb/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppetdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppetdb/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppetdb/releases{/id}","created_at":"2011-08-11T18:54:46Z","updated_at":"2015-01-14T17:31:06Z","pushed_at":"2015-01-14T17:31:59Z","git_url":"git://github.com/puppetlabs/puppetdb.git","ssh_url":"git@github.com:puppetlabs/puppetdb.git","clone_url":"https://github.com/puppetlabs/puppetdb.git","svn_url":"https://github.com/puppetlabs/puppetdb","homepage":"http://docs.puppetlabs.com/puppetdb","size":16983,"stargazers_count":155,"watchers_count":155,"language":"Clojure","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":119,"mirror_url":null,"open_issues_count":8,"forks":119,"open_issues":8,"watchers":155,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1212"},"html":{"href":"https://github.com/puppetlabs/puppetdb/pull/1212"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1212"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/issues/1212/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1212/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/pulls/1212/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppetdb/statuses/08ceb38452bd3b1486978b31cdb2d990f0d51f8d"}}}}