{"action":"created","comment":{"url":"https://api.github.com/repos/lyft/envoy/pulls/comments/115297345","pull_request_review_id":36825025,"id":115297345,"diff_hunk":"@@ -11,6 +11,31 @@\n namespace Server {\n \n /**\n+ * Whether to run Envoy in serving mode, or in config-validation mode at one of two levels (in which\n+ * case we'll verify the configuration file is valid, print any errors, and exit without serving.)\n+ */\n+enum class Mode {\n+  /**\n+   * Default mode: Regular Envoy serving process. Configs are validated in the normal course of\n+   * initialization, but if all is well we proceed to serve traffic.\n+   */\n+  Serve,","path":"include/envoy/server/options.h","position":12,"original_position":12,"commit_id":"44e5b5354a3ed064c48541938655d6420b5dde16","original_commit_id":"3e5a64c11999c6be2000b4d9d94e584b1b089c33","user":{"login":"rlazarus","id":504143,"avatar_url":"https://avatars0.githubusercontent.com/u/504143?v=3","gravatar_id":"","url":"https://api.github.com/users/rlazarus","html_url":"https://github.com/rlazarus","followers_url":"https://api.github.com/users/rlazarus/followers","following_url":"https://api.github.com/users/rlazarus/following{/other_user}","gists_url":"https://api.github.com/users/rlazarus/gists{/gist_id}","starred_url":"https://api.github.com/users/rlazarus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlazarus/subscriptions","organizations_url":"https://api.github.com/users/rlazarus/orgs","repos_url":"https://api.github.com/users/rlazarus/repos","events_url":"https://api.github.com/users/rlazarus/events{/privacy}","received_events_url":"https://api.github.com/users/rlazarus/received_events","type":"User","site_admin":false},"body":"It prints the hot restart version and exits immediately (https://github.com/lyft/envoy/blob/master/source/server/options_impl.cc#L63) without serving, validating, or doing anything else.","created_at":"2017-05-08T16:55:13Z","updated_at":"2017-05-08T16:55:13Z","html_url":"https://github.com/lyft/envoy/pull/863#discussion_r115297345","pull_request_url":"https://api.github.com/repos/lyft/envoy/pulls/863","_links":{"self":{"href":"https://api.github.com/repos/lyft/envoy/pulls/comments/115297345"},"html":{"href":"https://github.com/lyft/envoy/pull/863#discussion_r115297345"},"pull_request":{"href":"https://api.github.com/repos/lyft/envoy/pulls/863"}}},"pull_request":{"url":"https://api.github.com/repos/lyft/envoy/pulls/863","id":118252007,"html_url":"https://github.com/lyft/envoy/pull/863","diff_url":"https://github.com/lyft/envoy/pull/863.diff","patch_url":"https://github.com/lyft/envoy/pull/863.patch","issue_url":"https://api.github.com/repos/lyft/envoy/issues/863","number":863,"state":"open","locked":false,"title":"validation: Add config validation mode. (#499)","user":{"login":"rlazarus","id":504143,"avatar_url":"https://avatars0.githubusercontent.com/u/504143?v=3","gravatar_id":"","url":"https://api.github.com/users/rlazarus","html_url":"https://github.com/rlazarus","followers_url":"https://api.github.com/users/rlazarus/followers","following_url":"https://api.github.com/users/rlazarus/following{/other_user}","gists_url":"https://api.github.com/users/rlazarus/gists{/gist_id}","starred_url":"https://api.github.com/users/rlazarus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlazarus/subscriptions","organizations_url":"https://api.github.com/users/rlazarus/orgs","repos_url":"https://api.github.com/users/rlazarus/repos","events_url":"https://api.github.com/users/rlazarus/events{/privacy}","received_events_url":"https://api.github.com/users/rlazarus/received_events","type":"User","site_admin":false},"body":"This adds a `--mode` command-line flag. `--mode=serve` is the default and can be omitted; in that mode Envoy runs as it always has.\r\n\r\nWith `--mode=validate` Envoy checks that the configuration file in --config-file is valid, then exits. \"Valid\" means that it performs the JSON schema check as usual, but also initializes as much of its internal state as possible, exiting with any errors as it would under `--mode=serve`. When initialization is complete, instead of listening for traffic, Envoy prints an \"OK\" message to stderr and exits, returning success.\r\n\r\nIn validation mode, to the extent possible, Envoy avoids interfering with its environment. For example, the hot-restart process is skipped, so validation can safely be run on the same machine as a serving Envoy.  Validation mode also doesn't send any upstream traffic or open any listeners.\r\n\r\nIt *does* attempt to read any files referenced in the config, like certs and private keys, so validation will fail if those files aren't located at the expected paths. A future \"lite validation\" mode, that mocks out the filesystem as well as the network, is not yet implemented as of this patch.","created_at":"2017-04-28T23:41:50Z","updated_at":"2017-05-08T16:55:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba8dffd77a0b5b73ba0dc07d02fea9da17657a33","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/lyft/envoy/pulls/863/commits","review_comments_url":"https://api.github.com/repos/lyft/envoy/pulls/863/comments","review_comment_url":"https://api.github.com/repos/lyft/envoy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lyft/envoy/issues/863/comments","statuses_url":"https://api.github.com/repos/lyft/envoy/statuses/44e5b5354a3ed064c48541938655d6420b5dde16","head":{"label":"rlazarus:validate","ref":"validate","sha":"44e5b5354a3ed064c48541938655d6420b5dde16","user":{"login":"rlazarus","id":504143,"avatar_url":"https://avatars0.githubusercontent.com/u/504143?v=3","gravatar_id":"","url":"https://api.github.com/users/rlazarus","html_url":"https://github.com/rlazarus","followers_url":"https://api.github.com/users/rlazarus/followers","following_url":"https://api.github.com/users/rlazarus/following{/other_user}","gists_url":"https://api.github.com/users/rlazarus/gists{/gist_id}","starred_url":"https://api.github.com/users/rlazarus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlazarus/subscriptions","organizations_url":"https://api.github.com/users/rlazarus/orgs","repos_url":"https://api.github.com/users/rlazarus/repos","events_url":"https://api.github.com/users/rlazarus/events{/privacy}","received_events_url":"https://api.github.com/users/rlazarus/received_events","type":"User","site_admin":false},"repo":{"id":80770608,"name":"envoy","full_name":"rlazarus/envoy","owner":{"login":"rlazarus","id":504143,"avatar_url":"https://avatars0.githubusercontent.com/u/504143?v=3","gravatar_id":"","url":"https://api.github.com/users/rlazarus","html_url":"https://github.com/rlazarus","followers_url":"https://api.github.com/users/rlazarus/followers","following_url":"https://api.github.com/users/rlazarus/following{/other_user}","gists_url":"https://api.github.com/users/rlazarus/gists{/gist_id}","starred_url":"https://api.github.com/users/rlazarus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlazarus/subscriptions","organizations_url":"https://api.github.com/users/rlazarus/orgs","repos_url":"https://api.github.com/users/rlazarus/repos","events_url":"https://api.github.com/users/rlazarus/events{/privacy}","received_events_url":"https://api.github.com/users/rlazarus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rlazarus/envoy","description":"C++ front/service proxy","fork":true,"url":"https://api.github.com/repos/rlazarus/envoy","forks_url":"https://api.github.com/repos/rlazarus/envoy/forks","keys_url":"https://api.github.com/repos/rlazarus/envoy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rlazarus/envoy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rlazarus/envoy/teams","hooks_url":"https://api.github.com/repos/rlazarus/envoy/hooks","issue_events_url":"https://api.github.com/repos/rlazarus/envoy/issues/events{/number}","events_url":"https://api.github.com/repos/rlazarus/envoy/events","assignees_url":"https://api.github.com/repos/rlazarus/envoy/assignees{/user}","branches_url":"https://api.github.com/repos/rlazarus/envoy/branches{/branch}","tags_url":"https://api.github.com/repos/rlazarus/envoy/tags","blobs_url":"https://api.github.com/repos/rlazarus/envoy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rlazarus/envoy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rlazarus/envoy/git/refs{/sha}","trees_url":"https://api.github.com/repos/rlazarus/envoy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rlazarus/envoy/statuses/{sha}","languages_url":"https://api.github.com/repos/rlazarus/envoy/languages","stargazers_url":"https://api.github.com/repos/rlazarus/envoy/stargazers","contributors_url":"https://api.github.com/repos/rlazarus/envoy/contributors","subscribers_url":"https://api.github.com/repos/rlazarus/envoy/subscribers","subscription_url":"https://api.github.com/repos/rlazarus/envoy/subscription","commits_url":"https://api.github.com/repos/rlazarus/envoy/commits{/sha}","git_commits_url":"https://api.github.com/repos/rlazarus/envoy/git/commits{/sha}","comments_url":"https://api.github.com/repos/rlazarus/envoy/comments{/number}","issue_comment_url":"https://api.github.com/repos/rlazarus/envoy/issues/comments{/number}","contents_url":"https://api.github.com/repos/rlazarus/envoy/contents/{+path}","compare_url":"https://api.github.com/repos/rlazarus/envoy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rlazarus/envoy/merges","archive_url":"https://api.github.com/repos/rlazarus/envoy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rlazarus/envoy/downloads","issues_url":"https://api.github.com/repos/rlazarus/envoy/issues{/number}","pulls_url":"https://api.github.com/repos/rlazarus/envoy/pulls{/number}","milestones_url":"https://api.github.com/repos/rlazarus/envoy/milestones{/number}","notifications_url":"https://api.github.com/repos/rlazarus/envoy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rlazarus/envoy/labels{/name}","releases_url":"https://api.github.com/repos/rlazarus/envoy/releases{/id}","deployments_url":"https://api.github.com/repos/rlazarus/envoy/deployments","created_at":"2017-02-02T21:30:57Z","updated_at":"2017-02-02T21:31:00Z","pushed_at":"2017-05-01T17:58:13Z","git_url":"git://github.com/rlazarus/envoy.git","ssh_url":"git@github.com:rlazarus/envoy.git","clone_url":"https://github.com/rlazarus/envoy.git","svn_url":"https://github.com/rlazarus/envoy","homepage":"https://lyft.github.io/envoy","size":8484,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"lyft:master","ref":"master","sha":"ff83aec6d176d1b0bf3d97461b9b0150e4db8671","user":{"login":"lyft","id":4269340,"avatar_url":"https://avatars1.githubusercontent.com/u/4269340?v=3","gravatar_id":"","url":"https://api.github.com/users/lyft","html_url":"https://github.com/lyft","followers_url":"https://api.github.com/users/lyft/followers","following_url":"https://api.github.com/users/lyft/following{/other_user}","gists_url":"https://api.github.com/users/lyft/gists{/gist_id}","starred_url":"https://api.github.com/users/lyft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lyft/subscriptions","organizations_url":"https://api.github.com/users/lyft/orgs","repos_url":"https://api.github.com/users/lyft/repos","events_url":"https://api.github.com/users/lyft/events{/privacy}","received_events_url":"https://api.github.com/users/lyft/received_events","type":"Organization","site_admin":false},"repo":{"id":65214191,"name":"envoy","full_name":"lyft/envoy","owner":{"login":"lyft","id":4269340,"avatar_url":"https://avatars1.githubusercontent.com/u/4269340?v=3","gravatar_id":"","url":"https://api.github.com/users/lyft","html_url":"https://github.com/lyft","followers_url":"https://api.github.com/users/lyft/followers","following_url":"https://api.github.com/users/lyft/following{/other_user}","gists_url":"https://api.github.com/users/lyft/gists{/gist_id}","starred_url":"https://api.github.com/users/lyft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lyft/subscriptions","organizations_url":"https://api.github.com/users/lyft/orgs","repos_url":"https://api.github.com/users/lyft/repos","events_url":"https://api.github.com/users/lyft/events{/privacy}","received_events_url":"https://api.github.com/users/lyft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lyft/envoy","description":"C++ front/service proxy","fork":false,"url":"https://api.github.com/repos/lyft/envoy","forks_url":"https://api.github.com/repos/lyft/envoy/forks","keys_url":"https://api.github.com/repos/lyft/envoy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lyft/envoy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lyft/envoy/teams","hooks_url":"https://api.github.com/repos/lyft/envoy/hooks","issue_events_url":"https://api.github.com/repos/lyft/envoy/issues/events{/number}","events_url":"https://api.github.com/repos/lyft/envoy/events","assignees_url":"https://api.github.com/repos/lyft/envoy/assignees{/user}","branches_url":"https://api.github.com/repos/lyft/envoy/branches{/branch}","tags_url":"https://api.github.com/repos/lyft/envoy/tags","blobs_url":"https://api.github.com/repos/lyft/envoy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lyft/envoy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lyft/envoy/git/refs{/sha}","trees_url":"https://api.github.com/repos/lyft/envoy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lyft/envoy/statuses/{sha}","languages_url":"https://api.github.com/repos/lyft/envoy/languages","stargazers_url":"https://api.github.com/repos/lyft/envoy/stargazers","contributors_url":"https://api.github.com/repos/lyft/envoy/contributors","subscribers_url":"https://api.github.com/repos/lyft/envoy/subscribers","subscription_url":"https://api.github.com/repos/lyft/envoy/subscription","commits_url":"https://api.github.com/repos/lyft/envoy/commits{/sha}","git_commits_url":"https://api.github.com/repos/lyft/envoy/git/commits{/sha}","comments_url":"https://api.github.com/repos/lyft/envoy/comments{/number}","issue_comment_url":"https://api.github.com/repos/lyft/envoy/issues/comments{/number}","contents_url":"https://api.github.com/repos/lyft/envoy/contents/{+path}","compare_url":"https://api.github.com/repos/lyft/envoy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lyft/envoy/merges","archive_url":"https://api.github.com/repos/lyft/envoy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lyft/envoy/downloads","issues_url":"https://api.github.com/repos/lyft/envoy/issues{/number}","pulls_url":"https://api.github.com/repos/lyft/envoy/pulls{/number}","milestones_url":"https://api.github.com/repos/lyft/envoy/milestones{/number}","notifications_url":"https://api.github.com/repos/lyft/envoy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lyft/envoy/labels{/name}","releases_url":"https://api.github.com/repos/lyft/envoy/releases{/id}","deployments_url":"https://api.github.com/repos/lyft/envoy/deployments","created_at":"2016-08-08T15:07:24Z","updated_at":"2017-05-08T15:22:22Z","pushed_at":"2017-05-08T16:05:03Z","git_url":"git://github.com/lyft/envoy.git","ssh_url":"git@github.com:lyft/envoy.git","clone_url":"https://github.com/lyft/envoy.git","svn_url":"https://github.com/lyft/envoy","homepage":"https://lyft.github.io/envoy","size":18883,"stargazers_count":1264,"watchers_count":1264,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":125,"mirror_url":null,"open_issues_count":113,"forks":125,"open_issues":113,"watchers":1264,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lyft/envoy/pulls/863"},"html":{"href":"https://github.com/lyft/envoy/pull/863"},"issue":{"href":"https://api.github.com/repos/lyft/envoy/issues/863"},"comments":{"href":"https://api.github.com/repos/lyft/envoy/issues/863/comments"},"review_comments":{"href":"https://api.github.com/repos/lyft/envoy/pulls/863/comments"},"review_comment":{"href":"https://api.github.com/repos/lyft/envoy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lyft/envoy/pulls/863/commits"},"statuses":{"href":"https://api.github.com/repos/lyft/envoy/statuses/44e5b5354a3ed064c48541938655d6420b5dde16"}}}}
{"actor":{"display_login":"rlazarus"}}