{"action":"created","issue":{"url":"https://api.github.com/repos/vfarcic/docker-flow-proxy/issues/331","repository_url":"https://api.github.com/repos/vfarcic/docker-flow-proxy","labels_url":"https://api.github.com/repos/vfarcic/docker-flow-proxy/issues/331/labels{/name}","comments_url":"https://api.github.com/repos/vfarcic/docker-flow-proxy/issues/331/comments","events_url":"https://api.github.com/repos/vfarcic/docker-flow-proxy/issues/331/events","html_url":"https://github.com/vfarcic/docker-flow-proxy/issues/331","id":259933589,"number":331,"title":"Check config file before reload","user":{"login":"kungfu71186","id":421589,"avatar_url":"https://avatars2.githubusercontent.com/u/421589?v=4","gravatar_id":"","url":"https://api.github.com/users/kungfu71186","html_url":"https://github.com/kungfu71186","followers_url":"https://api.github.com/users/kungfu71186/followers","following_url":"https://api.github.com/users/kungfu71186/following{/other_user}","gists_url":"https://api.github.com/users/kungfu71186/gists{/gist_id}","starred_url":"https://api.github.com/users/kungfu71186/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kungfu71186/subscriptions","organizations_url":"https://api.github.com/users/kungfu71186/orgs","repos_url":"https://api.github.com/users/kungfu71186/repos","events_url":"https://api.github.com/users/kungfu71186/events{/privacy}","received_events_url":"https://api.github.com/users/kungfu71186/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2017-09-22T20:52:50Z","updated_at":"2017-09-25T19:10:10Z","closed_at":null,"author_association":"NONE","body":"Came across an issue today where I had a valid but bad config. Basically there was a cert I was loading that was good, but it didnt have the key. This made the proxy take out all configurations and continually reload the config going back and forth between the dummy config and gathering information of the services.\r\n\r\nThere was no errors in the log that showed anything out of the ordinary either.\r\n\r\nCome to find out, it was actually an error with the config.\r\n\r\nIs it possible to create a config before reloading, test the config, and then deploy and reload the config?\r\n\r\nI was able to do this by\r\n\r\n`haproxy -c -V -f /cfg/haproxy.cfg`\r\n\r\nThis will not only give an output if the config is wrong or correct, but it will give the proper exit status as well. 0 good, 1 bad.\r\n\r\nOne way to reproduce is, is to simply add a cert to the /certs directory without a key in it. It will try to load and fail."},"comment":{"url":"https://api.github.com/repos/vfarcic/docker-flow-proxy/issues/comments/331982348","html_url":"https://github.com/vfarcic/docker-flow-proxy/issues/331#issuecomment-331982348","issue_url":"https://api.github.com/repos/vfarcic/docker-flow-proxy/issues/331","id":331982348,"user":{"login":"vfarcic","id":5716227,"avatar_url":"https://avatars2.githubusercontent.com/u/5716227?v=4","gravatar_id":"","url":"https://api.github.com/users/vfarcic","html_url":"https://github.com/vfarcic","followers_url":"https://api.github.com/users/vfarcic/followers","following_url":"https://api.github.com/users/vfarcic/following{/other_user}","gists_url":"https://api.github.com/users/vfarcic/gists{/gist_id}","starred_url":"https://api.github.com/users/vfarcic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vfarcic/subscriptions","organizations_url":"https://api.github.com/users/vfarcic/orgs","repos_url":"https://api.github.com/users/vfarcic/repos","events_url":"https://api.github.com/users/vfarcic/events{/privacy}","received_events_url":"https://api.github.com/users/vfarcic/received_events","type":"User","site_admin":false},"created_at":"2017-09-25T19:10:10Z","updated_at":"2017-09-25T19:10:10Z","author_association":"OWNER","body":"I think I found the problem. Services are removed on failed haproxy reload when a request to reconfigure is coming from DFSL directly. However, the same logic is not implemented when DFP starts (e.g. a new replica) and asks for the info from DFSL during initialization. Can that be the use case you experienced?"}}
{"actor":{"display_login":"vfarcic"}}